Skip to content

Instantly share code, notes, and snippets.

/**
* Booleans
*
* Can eather be true or false
*/
var myBoolean = true;
/**
* Numbers
*
/**
* Functions
*
* Think of functions as reusabel code blocks.
* The code inside is something that you want to call often.
* And you can pass them a value.
*/
function renderComment(comment) {
/**
* If Statements
*
* They have a condition, that is true or false.
* Think of them as boolean.
*/
var condition = true;
if (condition) {
/**
* Manipulate the DOM
*
* Therefor we have to find the element in the DOM and then we can change it
*/
// vanilla
var element = document.getElementById('my-id');
element.innerHTML = 'Hello World!';
/**
* Objects can have propperties and methods.
*
* Think of it as an abstraction of real world objects.
*
* There is much more to cover about objects!-)
*/
var person = {
age: 32,
git clone https://github.com/uniquename/gulp_starter_light
cd gulp_starter_light
npm install
gulp
var myArray = ['Apples', 'Bananas', 'Pears', 'Oranges'];
/*
var myArray = [{
id: 55675,
title: 'hey there',
body: 'that where really great news!'
}, {