Style Guide

1. Create a code block from the add block button.

2. Paste the formatted code in the code block and give it a class name by going to the block tab on the right under Additional CSS classes(s).

The class name should start with language- with the language name at the end.

For example: if it’s Javascript, the CSS class name would be language-javascript

3. When you preview the code, the format should look something like this.

for (var i = 0; i < 5; i++) {
  var button = document.createElement("button");
  button.innerText = i;
  (function(index){
    button.addEventListener("click", function() {
      console.log(index)
    })
  })(i)
  buttonsContainer.appendChild(button);
}
console.log(i);