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
// Usage | |
<Router> | |
<Provider store={store}> | |
<ListeningRouter> | |
<Main /> | |
</ListeningRouter> | |
</Provider> | |
</Router> |
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
/* A Queue object for queue-like functionality over JavaScript arrays. */ | |
var Queue = function() { | |
this.items = []; | |
}; | |
Queue.prototype.enqueue = function(obj) { | |
console.log("enqueue: ", obj); | |
this.items.push(obj); | |
}; | |
Queue.prototype.dequeue = function() { | |
return this.items.shift(); |
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
#!/bin/bash | |
# | |
# This script will transplie our code using babel and evaluates it using node.js | |
# | |
# Steps: | |
# 1) Install babel globally: | |
# npm install -g babel-cli | |
# or | |
# yarn global add babel-cli | |
# 2) Create a new language in Coderunner preferences (eg. Javascript (Babel)). |