Skip to content

Instantly share code, notes, and snippets.

(def name "Kristin")
(def number 2)
(def words ["run" "ball" "cat"])
String name = "Kristin";
int number = 2;
String[] words = {"run", "ball", "cat"};
debugger;
Stick this in you code and you have the ability to step through code in the inspector console. (CTRL click, inspector)
variable
function
referencing the DOM
document.getElementById
document.getElementsByClassName
.style.visibility
.innerHTML
logic
if/else
for
background
color
padding
margin
font-family
font-style
font-weight
border
@kzkaed
kzkaed / tags
Last active February 1, 2016 12:14
tag
element
attribute
<html>
<head>
<body>
<div>
<p>
<a>
@kzkaed
kzkaed / function
Last active February 1, 2016 03:07
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);
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';
@kzkaed
kzkaed / variable-javascript
Last active February 5, 2016 21:05
variable
var name = 'kristin';
var number = 2;
var words = ['run' ,'ball' , 'cat'];
@kzkaed
kzkaed / console
Last active February 5, 2016 20:22
var variable = 'hello';
console.log(variable);
This is viewable in the console. (CTRL click, inspect)