Skip to content

Instantly share code, notes, and snippets.

var foo = function (person) {
// stuff happens
// perhaps a breakpoint is added here
// or they attempt to log the object
console.log(person);
}
var person = {};
person[‘\t’] = ‘Nicholas’;
if (!val) { … }
Math.floor(.5 + ((Math.cos(val)*.5)))
function foo (x) {
if (x=true) {
// no matter what value is
// passed in for x, this
// will always execute
}
}
foo(false);
var i = 27 // 27
var j = 027 // 23
(function () {
var a=1,
b=2,
c=3
d=4,
e=5,
f=6;
}());
console.log(d,e,f); // 4,5,6