A front end engineer is focused on the user experience of software or an app. During an interview, you will need to demonstrate that you understand UX/UI design principles, a commitment to clean code optimized for the product offering, and a willingness to work with backend engineers to solve problems. Expect to be asked about your technical experience, as well as your people management and design skills.
Here are three top front end engineer interview questions and how to answer them:
How to answer: Outline what tools and methodologies you use to manage the development of a product. Talk about the strategies you use to work with a diverse range of stakeholders, including clients, sales and marketing, and back end engineers. Use specific examples to show how your workflow has been successful, and also express a willingness to adapt and change when necessary.
How to answer: A lot of a front end engineer's role involves the nitty gritty details that make sure a user's experience is seamless. Highlight that you understand the importance of good clean code, testing protocols, and version management. Use examples of methodologies you have used and what problems they addressed or solved.
How to answer: A question like this is your opportunity to show that you are passionate about front end engineering. Explain how you integrate user-centered design in your projects and the philosophies that you follow. Outline any books or articles you have read and what you agree with. If possible, talk about what changes you foresee and how you think design and technology will adapt to those changes.
↳
A callback function is a piece of JavaScript code that executes after the main function that the callback is attached to executes successfully. Less
↳
udaykanth, I would say that a .forEach() would be the most common and most basic use of a callback function. I'm just writing this to help anyone that might have a hard time thinking up a quick example if the come across this question themselves. Example: var numArray = [ 1, 2, 3 ] ; numArray.forEach( function( i ) { console.log( arr[ i - 1 ] ) } ) ; // logs out // 1 // 2 // 3 Less
↳
I don't think Bloomberg is a very good company. I am an excellent web developer and have gotten multiple offers from other companies with big names, but was rejected by Bloomberg. They are too demanding during the job interview and it becomes a game of how well you can interview as opposed to how talented an employee you are and how much you can contribute to the growth of the company. Less
↳
Provide top and left 50% then off set the div with -100px margin top and left. A more scaleable solution would be to use transform: translate(-50%, -50%) to make it not matter what size the div is. Less
↳
<div> <div> Inner </div> <div> .outer { width: 100vw; height: 100vh; position: relative; } .inner{ width: 200px; height: 200px; position: absolute; left: 0; right: 0; top: 0; bottom: 0; margin: auto; }</div></div> Less
↳
I let them know that while design is a creative field, I have always been interested in designing for the user, and coding is no different. Whether creating a design or writing code the interesting part to me was the end result for the user. Less
↳
n+1 is prime, n+2 is prime... all prime numbers are odd, so n must be even (i.e., divisible by 2) in any set of 3 numbers (consider 1,2,3 or 4,5,6 or 20,21,22) at least one number is divisible by 3. since n+1 and n+2 can't be divisible by anything, n must be divisible by 3. therefore n is div by 6 Less
↳
Build a system that would run the functions concurrently.
↳
Place a JavaScript event listener for all clicks at the document level. Perform actions based on the details of the click. This problem had multiple branches and sub-questions, but the gist is that you would want to capture the events as they bubbled back up to the document level. There are other acceptable answers to this question. Less
↳
Essentially the same as Anh's answer but less code, assuming ES5 is available var arr = ["a","b","c","d","e","f"]; var indices = [2, 3, 4, 0, 5, 1]; arr = indices.map(function (item, index) { return arr[indices.indexOf(index)]; }); Less
↳
function reposition(arr, indices) { var newArr = []; // I'm not sure if extra space is allowed. If it is, the solution should be this simple. for(var i = 0; i < arr.length; ++i) { var newIndex = indices[i]; newArr[newIndex] = arr[i]; } return newArr; } var arr = ["a", "b", "c", "d", "e", "f"]; var indices = [2, 3, 4, 0, 5, 1]; reposition(arr, indices); // returns: ["d", "f", "a", "b", "c", "e"] Less
↳
function repositionElements(arr, indices) { // assert(arr.length === indices.length) var moved = []; for (var i = 0; i < arr.length; i++) { moved.push(false); } var moveFrom, moveTo, itemToMove; for (moveFrom = 0; moveFrom < arr.length; moveFrom++) { itemToMove = arr[moveFrom]; while (!moved[moveFrom]) { moveTo = indices[moveFrom]; var tmpItem = arr[moveTo]; arr[moveTo] = itemToMove; itemToMove = tmpItem; moved[moveFrom] = true; moveFrom = moveTo; } } return arr; } var arr = ["a", "b", "c", "d", "e", "f"], indices = [2, 3, 4, 0, 5, 1]; repositionElements(arr, indices); // returns: ["d", "f", "a", "b", "c", "e"] Less
↳
I agree with converting the excludes to an object, but in order to get linear performance that doesn't depend on the number of excluded things, you have to concatenate the k and v into one value to be used as the key in the object: let excludesObject = {}; excludes.forEach(pair => excludesObject[`${pair.k}_${pair.v}`] = true); Then you can check if an item should be excluded in O(k) time where k is the number of keys in an item. And the whole thing will run in O(nk) where n is the number of items. // if there is some key which is found in the excludesObject, the filter will return false items = items.filter(item => !Object.keys(item).some(key => excludesObject[`${key}_${item[key]}`]); ); Facebook, hire me! lol Less
↳
function excludeItems(items, excludes) { let excludesMap = excludes.reduce((entry, result)=>{ entry[result.k + result.v] = true; return entry; },{}); return items.reduce( (result, item) => { let updatedObject = Object.keys(item).reduce( (result,key) => { if(!excludesMap[key + item[key]]){ result[key] = item[key] } return result; }, {}) result.push(updatedObject) return result; }, []) } Less
↳
This solution will give much faster and immutable result. You can test with performance.now items.reduce((allItems, item) => { if(!excludes.some(exclude=>item[exclude.k] === exclude.v)){ allItems.push(item); } return allItems; }, []); Less
↳
ary.join().split(',');
↳
array.toString().split(',').map(Number), map need because input array has only integer types. Less
↳
var flatten = function(arr, resultArr) { var result = resultArr || []; for(var i = 0; i < arr.length; i++) { if(Array.isArray(arr[i])) { flatten(arr[i], result); } else { result.push(arr[i]); } } return result; }; Less