This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
(def name "Kristin") | |
(def number 2) | |
(def words ["run" "ball" "cat"]) |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
String name = "Kristin"; | |
int number = 2; | |
String[] words = {"run", "ball", "cat"}; |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
debugger; | |
Stick this in you code and you have the ability to step through code in the inspector console. (CTRL click, inspector) |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
variable | |
function | |
referencing the DOM | |
document.getElementById | |
document.getElementsByClassName | |
.style.visibility | |
.innerHTML | |
logic | |
if/else | |
for |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
background | |
color | |
padding | |
margin | |
font-family | |
font-style | |
font-weight | |
border |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
function add (x , y) { | |
return x + y; | |
} | |
function buildSentence (adjective, noun, verb, adverb) { | |
return 'The' + adjective + noun + verb + adverb; | |
} | |
function madlib (adjective, noun, verb, adverb) { | |
var sentence = buildSentence(adjective, noun, verb, adverb); |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
function hideShape(number) { | |
document.getElementById('shape' + number).style.visibility = 'hidden'; | |
} | |
function showShape(number) { | |
document.getElementById('shape' + number).style.visibility = 'visible'; | |
} | |
function hideElement(elementName, id) { | |
document.getElementById(elementName + id).style.visibility = 'hidden'; |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
var name = 'kristin'; | |
var number = 2; | |
var words = ['run' ,'ball' , 'cat']; |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
var variable = 'hello'; | |
console.log(variable); | |
This is viewable in the console. (CTRL click, inspect) |