Skip to content

Instantly share code, notes, and snippets.

@sebabelmar
Created November 24, 2016 01:02
Show Gist options
  • Save sebabelmar/5b93e68b913a6a22a727cef91c03403e to your computer and use it in GitHub Desktop.
Save sebabelmar/5b93e68b913a6a22a727cef91c03403e to your computer and use it in GitHub Desktop.
// ----------------------- Driver Code -----------------------
var b1 = {brand: "scott", year: 2016, color: "red"}
var b2 = {brand: "specialized", year: 2016, color: "blue"}
var b3 = {brand: "Releigh", year: 2016, color: "white"}
arr = Bike.create_bikes_array([b1, b2, b3])
console.log(arr); // => [< Instance of Bike 1>, <Instance of Bike 2>, <Instance of Bike 3>]
//Stretch print: ["scott", "specialized", "Releigh"]
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment