Skip to content

Instantly share code, notes, and snippets.

Embed
What would you like to do?
Object JavaScript - Using Constructors
var laundryTask = new Task("get shirts", 1, "low", false);
var shoppingTask = new Task("groceries", 3, "high", false);
console.log(JSON.stringify(laundryTask));
console.log(JSON.stringify(shoppingTask));
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment