Skip to content

Instantly share code, notes, and snippets.

@luomichelle
luomichelle / for, while, and dowhile
Created May 16, 2016 21:18
for, while, and dowhile
// example of for,while, and do/while//
var soloLoop = function(){
while(soloLoop){
console.log("Looped once!");
soloLoop = false
};}
//-------------------------------
var getToDaChoppa = function(){
do {
console.log("Maria Get to da choppa")
Handlebars is a semantic web template system, started by Yehuda Katz in 2010.
Handlebars.js is a superset of Mustache, and can render Mustache templates in addition to Handlebars templates.
More: http://handlebarsjs.com/
1. Expressions.
1.1 Basic usage.
@joshbeckman
joshbeckman / animatedScrollTo.js
Created September 30, 2013 14:51
ScrollTo animation using pure javascript and no jquery
document.getElementsByTagName('button')[0].onclick = function () {
scrollTo(document.body, 0, 1250);
}
function scrollTo(element, to, duration) {
var start = element.scrollTop,
change = to - start,
currentTime = 0,
increment = 20;