I understand that functions in JavaScript can take any number of arguments. Yep.
I can describe the similarity between blocks in Ruby and anonymous functions in JavaScript. Yep. Anonymous functions are similar to Ruby Blocks.
Where are the methods available to all arrays (e.g. forEach
, map
, etc.) defined?
Array.prototype.methods
I can explain the difference between using a for
loop and the forEach
method.
forEach is faster and easier to write and can be used on JS Objects. for
can only be called on Array.
I can explain the difference between forEach
and map
.
Yep. map
has the ability to return a modified Array
Can you explain the process of taking a plain JavaScript objects, transforming them into DOM nodes, and appending them to the page.
in Vanilla JS, it would be something like:
- create a dom element (var elem = document.createElement)
2.use
elem.alt
,elem.src
etc to define the element - return the element
How comfortable are you using the forEach()
method?
Yes
How comfortable are you using the map()
method?
Yes
How comfortable are you using the filter()
method?
Yes
How comfortable are you using the reduce()
method?
Yes
How comfortable are you using the sort()
method?
7/10. sort()
gotcha... sort will sort by first digit by default
How comfortable are you working with simple unit tests in Mocha in the browser? not quite.