-
Notifications
You must be signed in to change notification settings - Fork 2
Interview Questions
- "How would you approach building ______?"
- "Can you describe big O notation and how to classify a given implementation or functions efficiency?" - See https://www.youtube.com/watch?v=v4cd1O4zkGw
- "How would you go about creating a search capability for small data sets from various screens that need to search local data sets (eg search my contacts or order history)?"
- https://github.com/lydiahallie/javascript-questions
- 70+ JavaScript quiz questions with explanation
- https://medium.com/javascript-in-plain-english/facebook-on-site-technical-interview-1264cacad263
- https://blog.canumeet.com/2016/09/16/101-javascript-interview-question/
- https://github.com/young/frontend-interviewing
- "Show how you would swap the values of two variables."
- "Write a function that reverses the words of a sentence. Ex: "live eat play" -> "play eat live". Punctuation can be ignored."
-
Implement Stack "Design and implement a stack WITHOUT using Array.push() and Array.pop(). Implement the different methods: push, pop & length."
-
Implement Purchasing Options (SubSet of Sums)
One Solution: https://codesandbox.io/s/basicjavascriptdomexample-6i49y
"Create a screen that allows editing a single user where user property passed into screen in contains {firstname, lastname, email}"
Requirements:
1. Add textboxes to edit first/last/email data.
2. Add save/cancel buttons.
3. Save button should be disabled if any field is empty or data is unchanged.
4. Cancel button should revert any changes made.
5. Save button should console.log updated user object and allow saving if any of the values are empty.
One Solution: https://codesandbox.io/s/reactbasicinterviewexample-3drnz
"Given a list of menu items that each have a name and price, and a budget amount that you have to spend, implement a solution to return ALL the possible menu item combinations that can be purchased with a given target budget"
One Solution: https://codesandbox.io/s/example-coding-subsetsum-complex-fcmnx
"Create an implementation that takes 1) an array of JSON objects and 2) a set of properties to search and 3) search term and returns collection of results whose properties have values that contain given search term. Search should be case insensitive and match on values that contain the input search term."
Solutions: https://github.com/spinningideas/resources/wiki/JavaScript-Searching
Create a function with a string as an argument, make it return results that specify amount of times each letter occurs in the string sorted by its original order
example: word is "bananas"
result should be: { b: 1, a: 3, n: 2, s: 1}
https://www.freecodecamp.org/news/two-ways-to-check-for-palindromes-in-javascript-64fea8191fd7/
- palindrome(“race car”) should return true
- palindrome(“not a palindrome”) should return false
- palindrome(“A man, a plan, a canal. Panama”) should return true
What would the console display if this code was run?
(function(w) {
console.log('STEP: 1');
})(window);
setTimeout(function() {
console.log('STEP: 2');
}, 0);
console.log('STEP: 3');
ANS:
'STEP: 1'
'STEP: 3'
'STEP: 2'
Show how you would swap the values of two variables.
let x = 1;
let y = 2;
let z = 0;
z=y
y=x
x=z
Write a function that reverses the words of a sentence. Ex: "bob likes dogs" -> "dogs likes bob". Punctuation can be ignored.
ANS:
var val = "bob likes dogs"
var data = val.split(' ');
var results = []
for(let i = data.length; i < 0; i--){
results.push(data[i]);
}
return results.join(' ');
Design and implement a stack. Implement the different methods: push, pop & length. Do not simply use Array.push() and Array.pop()
-
"What would an average workday for this position look like?"
-
"What are the biggest challenges I’ll face in the first 90 days, and how will success be measured?"
-
"Is there anything about my background that makes you hesitant to move me forward in the interview process that I can address or elaborate on?"