More Frontend Questions - SEIR-59/course-wiki GitHub Wiki
Interview Questions
-
Easy Questions
-
Please share a paragraph evaluating the below CSS. Don’t worry about rewriting it. We just want to know what you like and/or dislike about it.
-
CSS Snippet
.container{ display: flex; flex-flow: row wrap; justify-content: center; } .card{ padding: 1em; width: calc(25% -4rem -2px); border: 1px solid black; margin-left: 1em; margin-right: 1em; margin-top: 2em; } @media (max-width: 500px){ .card{ width: 100% } } h1{ text-decoration: underline; } .card__description{ font-size: 1.5em; }
-
-
What is your favorite project you have worked on?
-
What did you contribute to this project ?
-
What were some of the challenges you faced?
-
What is the difference between
==
and===
? When is it appropriate to use one over the other? -
What is your favorite ES6 feature? Why? What’s an example of how one would use it?
-
What is the difference between Global and Block level scopes?
-
What is an IIFE?
-
DOT Vs Bracket Notation, when to use one or the other?
-
What is hoisting?
-
What is scope?
-
What are the differences between variables created using let, var or const?
-
-
Medium Questions
-
What is NaN? What is its type? How can you reliably test if a value is equal to NaN?
-
What is the difference between a variable that is: null, undefined or undeclared? -
What is the difference between Asynchronous and Synchronous code?
-
What is a “closure” in JavaScript? Provide an example
const add = (a) => { return (b) => { return a + b; } } const adding = add(5) setTimeout(() => adding(4), 3000) [1,2,3].map((i) => { });
-
Name to programming paradigms in JS and provide examples
-
What is the event loop?
-
How do you add an element at the beginning of an array? How do you add one to the end?
-
What are some ways of adding a click event to an element in jQuery?
-
If a variable is defined inside a function, does that variable get hoisted outside of the function?
-
-
Medium/Hard Questions
-
What is a promise? Where and how would you use promise?
-
Can you give an example of a curry function and why this syntax offers an advantage?
const add = (a) => { return (b) => { return (c) => { return a + b + c } } } add(1)(2)(3)
-
What is function hoisting in JavaScript?
-
What is the
instanceof
operator in JavaScript? What would be the output of the code below? -
What is the significance, and what are the benefits, of including 'use strict' at the beginning of a JavaScript source file?
-
What does debounce mean?
-
What is throttling?
-
-
Coding Challenges
-
Write a function that takes a string as an argument and returns the number of vowels contained in that string.
const findVowels = (s) =>{ // .... } findVowels('hello') // --> 2 findVowels('why') // --> 0
-
You can state this challenge in the following terms: write a function that checks if two provided strings are anagrams of each other; letter casing shouldn’t matter
Iceman can form Cinema Listen can form Silent
-
What is the value of
i
each time it is logged to the console? What causes this behavior?for(let i =0; i < 10; i++){ window.setTimeout(function(){ console.log(i) }, i*100) }
-
After the following code, what is the value of names.length?
var names = [“Arthur”, “Madeline”, “Nando” ]; names[100] = "Bruno"
-
Write a function that calculates the nth term in the fibonacci sequence, where this sequence is defined as a series of numbers (0 1 1 2 3 5 8 13 ...), and where the sum of any term is the result of adding the previous two terms. Note: make sure that your solution calculates larger terms (n>30)!
function fib(n){ // …. } fib(0); //0 fib(1); //1 fib(2); //1 fib(3); //2
-
Majority Element:
Given an array of size n, find the majority element. The majority element is the element that appears more than
⌊ n/2 ⌋
times.You may assume that the array is non-empty and the majority element always exist in the array.
Example 1: Input: [3,2,3] Output: 3 Example 2: Input: [2,2,1,1,1,2,2] Output: 2 var majorityElement = function(nums) { };
-
Build a password Strength meter in React
-
Front end code test
-
Create a Progress Bar
- Example Here: https://codepen.io/bruno-dasilva/pen/jOWgpbv
-
Create a carousel
-
Accordion
-
Uncommon Words from Two Sentences
-
String Matching in an Array
-
- What is a promise in JavaScript? How and where would you use promise?
- What is a “closure” in JavaScript? Provide an example?
- What is “recursion” and provide a use case.
- What are the key benefits/shortcomings between choosing inheritance vs composition as a design choice when building an app?
- What's the difference between inline, block and inline-block?
- Can you describe the main difference between a for and a forEach loop and why you would pick one versus the other?
- Can you describe the main difference between a forEach loop and a .map() loop and why you would pick one versus the other?
- How do you force react re-render? Give an example…
- Explain the difference between the onSubmit and onChange event and how are they used together in React. Give one or more examples.
- Describe what MVC is and how have you used it to structure a web server?
- Explain the differences on the usage of foo between function foo() {} and var foo = function() {}
- What are the benefits of using spread syntax and how is it different from rest syntax?
- When should you use the !important property?