Two interviewers had a Skype interview with me and asked some basic FE questions:
- What is event bubbling?
- What is the difference between prototypal vs classical inheritance?
- What is a CSS preprocessor and what are its pros and cons?
- What is the difference between a promise and a callback?
- How do we make applications more accessibility-friendly? What are some general guidelines when designing for the disabled? (ARIA, etc.)
- Differences between let, const, and var
Then one of the interviewers pasted a code sample and asked me to predict the output:
var Foo = function (a) {
function bar() {
return a;
}
this.baz = function () {
return a;
};
};
Foo.prototype = {
biz: function () {
return a;
}
};
var f = new Foo(7);
f.bar();
f.baz();
f.biz();
Finally, I was asked to create a list of <a>
elements in one of the divs in the DOM, and they also inquired about event delegation and its purpose.