You didn't specify if you were allowed to use [tag:ecmascript-6] features or not but presumably you were, since you used `let` and arrow functions. As an interviewer, I would note that you used those features, yet you iterated over the array using a regular `for` loop instead of using [`for...of`](https://developer.mozilla.org/en/docs/Web/JavaScript/Reference/Statements/for...of). That isn't necessarily a bad thing since it demonstrates that you know how to increment a counter in a standard loop and then use that for indexing into the array, but you don't have to if you use a `for...of` loop.

The technique for sorting the array is good, though because [`Array.prototype.sort()`](https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/Array/sort) "sorts the elements of an array in place and returns the array"<sup>[1](https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/Array/sort)</sup> there isn't really a need to store the value in `newArr` because `resultArr` is sorted.

>     let newArr = resultArr.sort((a,b)=>{
        return a[0]-b[0];
    });

You could have just returned the first two elements of `resultArr`.

Also, `const` could have been used for any variable that is never re-assigned - including arrays that merely have elements pushed into them - to avoid accidental re-assignment. 

<sup>1</sup><sub>https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/Array/sort</sub>