Pen Settings

HTML

CSS

CSS Base

Vendor Prefixing

Add External Stylesheets/Pens

Any URLs added here will be added as <link>s in order, and before the CSS in the editor. You can use the CSS from another Pen by using its URL and the proper URL extension.

+ add another resource

JavaScript

Babel includes JSX processing.

Add External Scripts/Pens

Any URL's added here will be added as <script>s in order, and run before the JavaScript in the editor. You can use the URL of any other Pen and it will include the JavaScript from that Pen.

+ add another resource

Packages

Add Packages

Search for and use JavaScript packages from npm here. By selecting a package, an import statement will be added to the top of the JavaScript editor for this package.

Behavior

Auto Save

If active, Pens will autosave every 30 seconds after being saved once.

Auto-Updating Preview

If enabled, the preview panel updates automatically as you code. If disabled, use the "Run" button to update.

Format on Save

If enabled, your code will be formatted when you actively save your Pen. Note: your code becomes un-folded during formatting.

Editor Settings

Code Indentation

Want to change your Syntax Highlighting theme, Fonts and more?

Visit your global Editor Settings.

HTML

              
                <h1>For</h1>
<div class="pokemon">
  <h2>7세대 돌팀</h2>
</div>

<h1>For in</h1>
<h2>주어진 배열에서 4의 배수만 찾아보자! </h2>
<div class="for_in"></div>

<h1>For of</h1>
<h2>주어진 배열에서 3의 배수만 찾아보자! </h2>
<div class="for_of"></div>
              
            
!

CSS

              
                * {
  margin: 0;
  padding: 0;
}

div {
  margin-bottom:10px;
}

p {
  font-size:14pt;
  color:#999999;
}
              
            
!

JS

              
                let pokemon_div = document.querySelector('.pokemon')
let for_in_div = document.querySelector('.for_in')
let for_of_div = document.querySelector('.for_of')
//div 드가자

let pokemon = ['김부추씨','김상추씨','김배추씨','김양상추씨','김양배추씨','김후추씨']

for (let i = 0;i < pokemon.length;i++) {
  let p_tag = document.createElement('p')
  p_tag.innerText = pokemon[i]
  pokemon_div.appendChild(p_tag)
}
//for

let num_list = [806, 26, 607, 601, 752, 504, 485, 162, 885, 361, 309, 480, 401, 313, 771, 141, 9, 526, 390, 237]

for (let i in num_list) {
  let p_tag = document.createElement('p')
  if (num_list[i] % 4 == 0) {
    p_tag.innerText = num_list[i]
    for_in_div.appendChild(p_tag)
  }
}
// for in

for (let i of num_list) {
  let p_tag = document.createElement('p')
  if (i % 3 == 0) {
    p_tag.innerText = i
    for_of_div.appendChild(p_tag)
  }
}
//for of
              
            
!
999px

Console