Chapter 6

The Secret Life of Objects

So objects do more than just hold their own properties. They have prototypes, which are other objects.

A vector type

Display a square with the given size, increase or decrease the size and display its length with the buttons below

Groups

Display a list, add or remove members and if the member is already in the list, it will not be added
  • Oscar
  • Luis
  • Maria

Borrowing a method

Evaluates if the input is included in the list, if it does, it will display a warning message
  • hotdog

    chips

    hamburger

    hasOwnProperty

Adding and subtracting vectors

Create new vectors and see how they are added and subtracted in the graph
x (150px)
y (150px)
Vector position(0, 0)
Distance to center (length)0

Party parrots!

Press on the buttons to toggle the parrots