Skip to content

Instantly share code, notes, and snippets.

@jacobthemyth
Created September 21, 2015 21:50
Show Gist options
  • Save jacobthemyth/ce436227add8a09a0d78 to your computer and use it in GitHub Desktop.
Save jacobthemyth/ce436227add8a09a0d78 to your computer and use it in GitHub Desktop.
// -> Define an object called 'Robot'
// -> Define a method called 'new' in Robot
// -> When Robot.new is called it should return a new object with Robot as its prototype
// e.g. var robby = Robot.new();
// Robot should be the prototype of robby
var Robot = {
new: function() {
return Object.create(this);
}
}
// ------------------------------------------------
// Common JS exports for verification, don't modify
module.exports = {
Robot: Robot
}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment