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 nanoscope = require('nanoscope'); | |
| var _ = require('lodash'); | |
| var game = { | |
| player: { | |
| x: 0 | |
| }, | |
| board: { | |
| width: 10 | |
| } |
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 test = require('tape'); | |
| test('timing test', function (t) { | |
| t.plan(2); | |
| t.assert(true); | |
| t.assert(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
| { | |
| init: function (elevators, floors) | |
| { | |
| var requestQueue = []; | |
| var request = function (floor, direction) | |
| { | |
| requestQueue.push({ | |
| floor: floor, | |
| direction: direction | |
| }); |
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 legacyScriptsArr = [ | |
| './path/to/legacy-script1.js', | |
| './path/to/legacy-script2.js', | |
| './path/to/legacy-script3.js', | |
| './path/to/legacy-script4.js', | |
| './path/to/legacy-script5.js', | |
| ]; |
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 $body = $(document.body); | |
| var $welcome = $('<h1>My Website!!!</h1>'); | |
| $body.append($welcome); | |
| var $awesome = $('<p>This is so awesome!</p>'); | |
| $body.append($awesome); |
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
| (function (root, factory) { | |
| if (typeof define === 'function' && define.amd) { | |
| define(['lodash'], factory); | |
| } else { | |
| root.amdWeb = factory(root._); | |
| } | |
| }(this, function (b) { | |
| var Fond = function(options) { | |
| this.update = function() {}; | |
| this.draw = function() {}; |
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 age_group = | |
| age > 70 ? 'se' : | |
| age > 60 ? 'si' : | |
| age > 50 ? 'fi' : | |
| age > 40 ? 'fo' : | |
| age > 30 ? 'th' : | |
| age > 20 ? 'tw' : | |
| 'un'; |
NewerOlder