- screenshots of scores will be posted in comments
- screenshots of completed sections will be posted in comments
This exercise is intended to help you assess your progress with the concepts and techniques we've covered during the week.
For these questions, write a short snippet of code that meets
the requirement. In cases where the question mentions a "given"
data value, use the variable given to refer to it (instead of re-writing
the information).
ES6?ES6?ES6, a tool like Babel would allow you to write in ES6 and have the code compiled to ES5, for environments where ES6 might not yet be supported.ES5 and if it seems useful/superfluous.function and is of particular use when a single-line function is being called. From the examples found here:var bar = foo.map(function(x) { return x.length; });
becomes:
My code: here
year / 100 was greater than 0, and not equal to 0. I assume this was done in place of ensuring that it was not cleanly divisible by 100, but I found it to be a less readable implementation.return statements for true or false, but, as a result, it was easy to follow their thought process. I was intrigued to see usage of an if statement after an else if. It indicated a level of flexibility within JavaScript syntax that I wouldn't have expected.module?
module.exports at the end of a file determines what code is available when using var access = require('path/to/file') in another file that may need it.