Stepping forward from JavaScript Basics, the goal of this card is for you to be able to read and write more complex ES6+ code.
===
, never ==
Show archive.org snapshot
_.isEqual
Note
Now that you've learned about
const
andlet
, you shouldn't usevar
anymore in any future code you commit.
Note
Important: For the following exercises, don't simply use a library or Stackoverflow code for this. You can look at other people's code to see how it works, but you must understand the concepts and be able to implement them on your own.
Rectangle
with properties width
and height
. It offers an area
method that returns the product of width and height.average
function that takes an arbitrary number of arguments ("rest parameters") and computes their arithmetic mean.isEqual()
method that compares whether two objects of the following types are equal:
string
literalsnumber
literalsundefined
null
Array
, recursively compared by their elements. Their contents must have the same order.