So you think you wanna be a web developer... Fork this, update your copy with answers. They don't need to be precise - pseudo-code is fine in most cases. Some questions don't have correct answers.
This file contains 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 | |
fs = require('fs'), | |
path = '/path/to/example.txt', | |
stat = fs.statSync(path), // so we can get file size | |
request = require('request'), // npm install request | |
authEndpoint = 'https://dal05.objectstorage.softlayer.net/auth/v1.0/', // region specific endpoint | |
apiKey = "your Api Key", | |
user = "your Username", | |
container = "your container", | |
filename = "example.txt" |
This file contains 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 (n) { // function has no name, is therefore "anonymous" | |
var i=n*2; | |
if (i > 4) { | |
return undefinedFunc(); // causes a "ReferenceError: undefinedFunc is not defined at Object.<anonymous>" | |
} else { | |
arguments.callee(i); // recurses, adding the anonymous function to the call stack | |
} | |
})(1); | |
This file contains 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
Backbone.View.extend({ | |
tagName:'div', | |
id:'cart', | |
// this.$el is created and events are initially delegated to it during view instantiation | |
events:{ | |
"click .checkout":"onClick" | |
} | |
renderCount:0, |