Software Engineer Front End Interview Questions

946 software engineer front end interview questions shared by candidates

The coding exercise consisted of creating a JavaScript class called Model that would expose the following methods: get, set, has, on, trigger. The class signature would be something like the following: const Woof = new Model({id:133, type: 'dog', name:'Spot' }); The has method would take a property name and check if the model has that particular property, return true or false. The get method would take a property name and return it's value if it exists. Return null if not. The set method would take a property name and a value and set that property's value if the property exists. The on method would allow for the addition of an event to the class and a callback function. The trigger method would allow the "triggering" of a particular event and pass any number of parameters to the callback function. You can use ES5 or ES6 syntax.
avatar

Front-end Software Engineer

Interviewed at Pinterest

3.6
Jul 22, 2016

The coding exercise consisted of creating a JavaScript class called Model that would expose the following methods: get, set, has, on, trigger. The class signature would be something like the following: const Woof = new Model({id:133, type: 'dog', name:'Spot' }); The has method would take a property name and check if the model has that particular property, return true or false. The get method would take a property name and return it's value if it exists. Return null if not. The set method would take a property name and a value and set that property's value if the property exists. The on method would allow for the addition of an event to the class and a callback function. The trigger method would allow the "triggering" of a particular event and pass any number of parameters to the callback function. You can use ES5 or ES6 syntax.

Viewing 291 - 300 interview questions

Glassdoor has 946 interview questions and reports from Software engineer front end interviews. Prepare for your interview. Get hired. Love your job.