Skip to content

Instantly share code, notes, and snippets.

View ryanflach's full-sized avatar

Ryan Flach ryanflach

View GitHub Profile

Leap

My code: here

  • Responder #1 (here) - This individual took a similar approach, though they did not utilize a ternary. Additionally, they used an interesting check with the modulo to ensure that the remainder for the 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.
  • Responder #2 (here) - This individual's approach was verbose with regard to usage of 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.
  • Responder #3 ([here](http://exercism.io/submissions/
  • In the context of Node, what is a module?
    • A chunk of code that can be shared (required) between files, much like classes and modules can be shared between files in Ruby. There is no syntax required when creating what may become a module. Instead, use of 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.
  • The code examples from the second blog post look very different from the first. Why?
    • The first is using the syntax from node to export modules, whereas the second is using a file and module loader called RequireJS.