Years of Experience: 5
Position: Web dev
Location: NYC
Round 1: Avg HR screening, your background, who you are, why do you want to switch jobs
Round 2: Technical question 1hr. first part (40 mins) was for 380. Insert Delete GetRandom O(1). Second part (20 mins), interviewer showed some code and asked to you what it does. the code i think was the source code of one of these
Because it used polyfills, k.length >>> 0 (32bit trick), Object(thing), callbacks. It was similar to this code below:
if (!Array.prototype.forEach) {
Array.prototype.forEach = function(callback, thisArg) {
var T, k;
if (this == null) {
throw new TypeError('this is null or not defined');
}
var O = Object(this);
var len = O.length >>> 0;
if (typeof callback !== "function") {
throw new TypeError(callback + ' is not a function');
}
k = 0;
while (k < len) {
if (k in O) {
callback.call(thisArg, O[k], k, O);
}
k++;
}
};
}
Second round was a curve ball, interviewer was super nice though.
Outcome: rejected