Wednesday, April 26, 2017

ES6: Merge 2 Sorted Arrays

This is a very common coding exercise that may be asked of you when you interview for a tech company that carefully screens their candidates.

If you are going to do this similarly to the way way I do it below, you will need to understand these concepts.

  1. Array instance reduce() parameters and reduce() in general
  2. Array instance sort() parameters and sort() in general

Simply remembering the code will only take you so far. You may be asked to explain. It is a lot easier to remember something and explain it if you understand it. Memorizing might get you through a phone screen but not live coding.

Monday, March 6, 2017

Strict and Correct Equality in ES6 with

If you're targeting ES5 then you will need the polyfill. If you are noding or live in my fantasy world of targeting only ES6, then you are good to go. No need to refactor all your code yet but if you are doing extra work to deal with NaN or zeroes then you might consider it. Certainly you should use with any new code base: