Generally, I start by getting an idea of how well a candidate understands JavaScript with a problem like this: Write a function that enables the following API... createOlympian() .name('Katie Ledecky') .sport('Swimming') .country('USA') .log() // Katie Ledecky, Swimming, USA Next, if things are going well, I have the candidate transform a JSON collection response to match some arbitrary requirements using Lodash/Unde…
Pointers on how to improve this (while maintaining your API) would be great :) var createOlympian = function() { return (function() { var attrs = []; // private variable for our olympian attributes var olympian = { name: function(name){ attrs['name'] = name; return this; }, sport: function(sport) { attrs['sport'] = sport; return this; }, country: function(country) { attrs['country'] = country; return this; }, log: fu…
Ask HN: How to prepare for a Front-end Developer interview?
141–146 of 146 posts
Re: Ask HN: How to prepare for a Front-end Developer interview?
#142Here are a few questions/problems I was asked in from-end interviews a couple months ago: Write a function that accepts an array of ints and a target number. If two of the numbers in the array can add up to the target, return their indices. (aka Two Sum) Write a function that accepts an int x and prints a spiral of "#"s so that the number of "arms" in the spiral equals x. Write a function that accepts a month and a y…
>>The good interviewers, IMO, gave me a "take-home" problem of building some mini front-end app that hit an API, and the really fun one involved reverse engineering an unpublished API - that's how I got my current job. I agree with you, but whenever this subject comes up, a lot of folks here on HN complain that they have full-time jobs and families and don't have time for "take-home" questions.
Re: Ask HN: How to prepare for a Front-end Developer interview?
#143You should at least be familiar with the major front-end libraries and frameworks - React, Angular and Ember. You don't necessarily need to "know" them, but at least know about them. You should be familiar with what ES6 is and what Babel does. These technologies probably won't be specific questions per se but if they come up and you can't speak about them, it'd be a red flag. Even for a front-end developer you should…
Can somebody provide a real example of where you'd need to use "linked lists, binary trees, min/max heaps, depth/breadth first search, tries, recursion, hash tables, etc" in your typical everyday front end angular/react/ember project?
Re: Ask HN: How to prepare for a Front-end Developer interview?
#144Earlier quoted context omitted.
Pointers on how to improve this (while maintaining your API) would be great :) var createOlympian = function() { return (function() { var attrs = []; // private variable for our olympian attributes var olympian = { name: function(name){ attrs['name'] = name; return this; }, sport: function(sport) { attrs['sport'] = sport; return this; }, country: function(country) { attrs['country'] = country; return this; }, log: fu…
Bonus points for being meta? function createOlympian() { let props = ['name', 'sport', 'country'] let olympian = { log() { console.log(props.map(prop => this[prop]).join(', ')) } } props.forEach(prop => { olympian[prop] = function(value) { this[prop] = value return this } }) return olympian }
Re: Ask HN: How to prepare for a Front-end Developer interview?
#145Re: Ask HN: How to prepare for a Front-end Developer interview?
#146Earlier quoted context omitted.
Can you clarify what you mean by xhr throttling? Implementing something like _.throttle to wrap requests?
Hopefully not! Surely _.debounce would be more appropriate to avoid locking out your UI - or worse, returning out of date responses - but even then you would potentially want to handle the responses more robustly. Not to mention needing to handle .fetch()s lack of abort if you're not using xhr.