Applied in February, I am in Canada, the position is AWS Fee L5 in TRT remote, team in NYC.
had a prep call with recruiter.
Initially, the recruiter who contacted me said my experience might fit L4, but later another recruiter reached out saying they received my resume and thought I could interview for L5. If I didn’t do well, they could consider me for L4.
Interview.
Used Amazon Chime for the interview. The interviewer didn’t have the camera on the whole time and seemed to be doing other things. When I asked questions, there was a delay in response.
It started with a self-introduction. It was just me introducing myself; he didn’t introduce himself at all.
I thought a front-end interview would involve writing a UI and some front-end related questions based on what I read on Glassdoor, but the question was completely different.
The question was about:
Write a custom event listener in JavaScript and implement it as follows:
bus.registerListener('start', (evt) => console.log('START', evt.data));
bus.registerListener('pause', (evt) => console.log('STOP', evt.data));
bus.emit('start', { data: 'start' });
bus.emit('stop', { data: 1 });
It was about implementing a registerListener
and an emit
. I had never looked into how the source code of a JS event listener works, so I was puzzled by the question. After several failed attempts and numerous hints from the interviewer, I came up with this answer:
function Bus() {
this.handlers = {};
}
Bus.prototype.registerListener = function(type, handler) {
if (this.handlers[type]) this.handlers[type] = [handler];
return;
this.handlers[type].push(handler);
}
Bus.prototype.emit = function(type, data) {
if (this.handlers[type]) {
this.handlers[type].forEach((listener) => listener(data));
}
}
Also, a complaint about Amazon’s front-end interview format. They have many live coding editors, why not use them? Instead, they used an editor similar to Google Docs with syntax highlighting. Even I wasn’t sure if what I wrote was correct after receiving hints.
In the end, time seemed tight, so I didn’t ask behavioral questions. I prepared so many examples for nothing.
Newbie here, seeking advice.
Hope everyone gets their desired offer. I will continue learning.