This file contains hidden or 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
// Prototypeless objects in JS | |
var map = Object.create(null); // null has no protype or properties | |
"toString" in map; | |
// false |
This file contains hidden or 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
/* source: http://toddmotto.com/avoiding-anonymous-javascript-functions */ | |
(function (window, document, undefined) { | |
// la la la | |
})(window, document); |
This file contains hidden or 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
// source code for a quine (excluding this comment). | |
console.log(function(string, delimiter) {return string.slice(0, -27) + delimiter + string + delimiter + string.slice(-27)}("console.log(function(string, delimiter) {return string.slice(0, -27) + delimiter + string + delimiter + string.slice(-27)}(, String.fromCharCode(34)))", String.fromCharCode(34))) |
This file contains hidden or 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 range = function(a, b) { | |
var array, | |
direction; | |
array = new Array(); | |
direction = ( b - a ) / Math.abs( b - a ); | |
var i; | |
for ( i = a; i <= b; i += direction ) | |
array.push( i ); |
NewerOlder