Questions d'entretiens - Front End | Glassdoor.ca

Questions d'entretiens - Front End

380

Questions d'entretien de Front end partagées par les candidats

Le top des questions d'entretien

Trier: PertinencePopulaires Date

1. In JavaScript, write a function that takes an array as input that can contain both ints and more arrays (which can also contain an array or int) and return the flattened array. ex. [1, [2, [ [3, 4], 5], 6]] => [1, 2, 3, 4, 5, 6] 2. Using HTML and CSS, show how you would create an image that would display another image (aligned to the bottom, right) when the user hovers over the image. ex. The Facebook "edit profile picture" icon

13 réponses

1.Flatten an array using JavaScript : var flatten = function(input, output) { if(!output) output = []; var i= 0, l= input.length; for (; i < l; i++){ var value = input[i], isArray = toString.call(value) === "[object Array]"; if(isArray) { flatten(value, output); }else { output.push(value); } }; return output; } var arr = [4, [3, 6, [9, 1, 9, [5, 1]]], 8, [5]]; console.log(flatten(arr)); 2. Use CSS Sprites.

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; };

/* * Similar to Vinnie's answer, but more performant with fewer accessors */ function flattenArray(arr, dest) { var flatArray = dest || [], n = arr.length, i, val; for (i = 0; i < n; i++) { val = arr[i]; if (Array.isArray(val)) { flattenArray(val, flatArray); } else { flatArray.push(val); } } return flatArray; }

Q2. Take the web application you wrote in Q1 and re-write it using the framework(s) of your choice.

1 réponse

Q1. Complete the following Front End tasks using only HTML, CSS, JavaScript and/or jQuery. ● Create a single responsive web page with the following characteristics: ○ A menu at the top of the page with the following items: ■ Add ■ Delete ■ Update ■ Display ○ Also at the top of the page a statistics display area with the following statistics: ■ Total number of records in the database. ■ Average records added per hour. ■ Ratio of records added per hour versus deleted per hour. ■ NOTE: Assume others may also be using this system, and the statistics must keep up with changes without refreshing the page. ○ Each menu item clicked should bring up a responsive overlay to add, delete, update, or display a record respectively. Assume records are stored and retrieved from a back end system. ● Each record is just first name, last name, and phone number. ● Once a record is added it is assigned a unique 10 digit id. ● Define the form of the APIs. In other words, assume you will give the form of the API to the back-end developer for implementation.

1 réponse

Q3. Add testing to either Part 1 or Part 2 of this assignment.

1 réponse

Tell us a bit about yourself

1 réponse

About myself and travel

1 réponse

"Why do you want to work at Costco"

1 réponse

Having a table on the front end, how would you sort the names in the table? How would you filter that information?

1 réponse

Why did you apply?

1 réponse

Build an email sign up form HTML/CSS/JS following a given spec. Include validation, proper colors, etc. make it look as close to the 'mock-up' as possible

1 réponse
110 de 380 Questions d'entretien d'embauche