Ecosyste.ms: Awesome

An open API service indexing awesome lists of open source software.

Awesome Lists | Featured Topics | Projects

https://github.com/khan4019/front-end-Interview-Questions

Help the front End community to rock interview
https://github.com/khan4019/front-end-Interview-Questions

css-interview-questions designer-interview-questions front-end-interview frontend-interview html html-interview-questions interview-questions javascript javascript-interview javascript-interview-questions

Last synced: about 2 months ago
JSON representation

Help the front End community to rock interview

Awesome Lists containing this project

README

        

Front end Interview Questions
=============================
-------
To rock the interview to achieve what you deserve and to improve your concepts about front end technologies, I have consolidated a list of questions and answers. It's a one stop solution for front end interview process.

## Table of Contents
* [JavaScript: Basics and Tricky Questions](#javascript-basics-and-tricky-questions)
* [Algorithm Beginners Level](#javascript-algorithm-beginners-level)
* [Intermediate Level Questions](#javascript-for-intermediate-level-developer)
* [css: Basics and Tricky Questions](#css-basics-and-tricky-questions)
* [DOM related Questions](#javascript-dom-related-questions)
* [html: Basic Questions for Beginners](#html-basic-questions-for-begginers)

### [Angular Interview Questions](https://github.com/khan4019/angular-interview-questions)
An exclusive list of Angular interview Questions are [here](https://github.com/khan4019/angular-interview-questions)

## [JavaScript: Basics and Tricky Questions](http://www.thatjsdude.com/interview/js2.html)
21+ questions and answers (for intermediate)
__________________
1. What are the differences between ` null ` and ` undefined `?
2. What are the differences between `==` and `===`?
3. How would you compare two objects in JavaScript?
4. 11+ true false related questions that will trick you.
5. As `[]` is true, `[] == true` should also be true. right?
6. How could you write a method on instance of a date which will give you next day?
7. If you want to use an arbitrary object as value of this, how will you do that?
8. Write a simple function to tell whether 2 is passed as parameter or not?
9. How could you use Math.max to find the max value in an array?
10. What the heck is this in JavaScript?
11. 21 quick questions that will trick you.
12. How could you set a prefix before everything you log? for example, if you log('my message') it will log: "(app) my message"
13. What will you see in the console for the following example?
14. Look at the code below, you have a for loop if you have setTimeout inside it. If log the loop counter inside setTimeout, what will be logged?
15. Look at the code below, I have a property in a object and I am creating a new object where I am setting it to a new value. If I delete that property what will i get if I try to access that property?
16. Does JavaScript pass parameter by value or by reference?
17. How could you implement cache to save calculation time for a recursive fibonacci function?
18. How could you cache execution of any function?
19. If you need to implement the following chaining with call back, how will you implement it?
20. How could you implement moveLeft animation?
21. How would you implement currying for any functions?

#### [JS: Answer for Basics and Tricky Questions](http://www.thatjsdude.com/interview/js2.html)

## [css: Basics and Tricky Questions](http://www.thatjsdude.com/interview/css.html)
21+ questions and answers
____________
1. What does float do?
1. How can you clear sides of a floating element?
1. How can you clear sides of a floating element?
1. some tricky questions in rapid fire style
1. Are CSS rule names case sensitive?
1. Why css selectors mixed up with cases don't apply the styles?
1. Does margin-top or margin-bottom has effect on inline element?
1. Does padding-top or padding-bottom has effect on inline element?
1. Does padding-left or padding-right or margin-left or margin-right has effect on inline element?
1. If you have a <p> element with font-size: 10rem, will the text be responsive when the user resizes / drags the browser window?
1. The pseudo class :checked will select inputs with type radio or checkbox, but not <option> elements.
1. In a HTML document, the pseudo class :root always refers to the <html> element.
1. The translate() function can move the position of an element on the z-axis.
1. Which one would you prefer among px, em % or pt and why?
1. How absolute, relative, fixed and static position differ?
1. What are the differences between visibility hidden and display none?
1. What are the differences between inline, block and inline-block?
1. What are the properties related to box model?
1. Does overflow: hidden create a new block formatting context?
1. How could you apply css rules specific to a media?
1. What is the use of only?
1. Does the screen keyword apply to the device's physical screen or the browser's viewport?
1. What are the some pseudo classed u have used?
1. How do you align a p center-center inside a div?
1. How do you optimize css selectors?
1. How can you load css resources conditionally?
1. Why would you use sprites?
1. What is specificity? How do u calculate specificity?
1. What is shadow DOM?
1. What do you know about transition?
1. What are the different css filter you can use?
1. What are the reasons to use preprocessor?
1. [Show you couple of style example and you have to tell what does it do](http://www.thatjsdude.com/interview/css.html#seeAndTell).

#### [CSS: Answer for Basics and Tricky Questions](http://www.thatjsdude.com/interview/css.html)

### css Deleted questions!
Looks like these are for hardcore designer. Hence, didn't make for developers.
______
1. How descendant css selectors are matched? [get answer](https://www.youtube.com/watch?v=EW8Bg_H_P7M)
1. How would u implement modularity in css?
1. If something doesn't work in a specific browser (IE8), you would u approach this problem?
1. How do you test cross-browser compatibility of your site?
1. What is the greatest hack you did in css so far?
1. What is grid layout?
1. How can you make a site responsive?
1. Why reset css is useful? or how normalize.css works?
1. What do you know about text shadows, box shadows?

## [JavaScript: Algorithm Beginners Level](http://www.thatjsdude.com/interview/js1.html)
20 questions and answers (for beginners)
__________________
1. Verify a prime number?
1. Find all prime factors of a number?
1. Get nth Fibonacci number?
1. Find the greatest common divisor of two numbers?
1. Remove duplicate members from an array?
1. merge two sorted array?
1. Swap two numbers without using a temp variable?
1. Reverse a string in JavaScript?
1. How would you reverse words in a sentence?
1. Reverse words in place?
1. Find the first non repeating char in a string?
1. Remove duplicate characters from a sting?
1. How will you verify a word as palindrome?
1. Generate random between 5 to 7 by using defined function.
1. Find missing number from unsorted array of integers.
1. Get two numbers that equal to a given number?
1. Find the largest sum of any two elements?
1. Total number of zeros from 1 upto n?
1. Check whether a given string is a substring of bigger string
2. Get permutations of a string

#### [JS: Answer for Algorithm Beginners Level](http://www.thatjsdude.com/interview/js1.html)

## JavaScript for Intermediate Level Developer

1. What is the event loop? Can you draw a simple diagram to explain event loop?
1. How to you explain closure?
3. How would you make sure value of `this` works correctly inside `setTimeout`?
1. What are the different possible values for `this`?
1. What is debounce and how could you implement debounce?
6. How would you communicate with server
1. Explain Promise to your grandmother
1. If and website is slow how what would you do to make it faster?
9. What ES6 feature do you use other than let, var and arrow?
1. What build tool you use and tell me some advantages to use that build tool

## [JavaScript: DOM related Questions](http://www.thatjsdude.com/interview/dom.html)
21+ questions and answers (for intermediate JS Developers)
__________________
1. Is there any difference between window and document?
1. Does document.onload and window.onload fire at the same time?
1. Is attribute similar to property?
1. What are the different ways to get an element from DOM?
1. What is the fastest way to select elements by using css selectors?
1. How come, I can't use forEach or similar array methods on a NodeList?
1. If you need to implement getElementByAttribute, how would you implement it?
1. How would you add a class to an element by query selector?
1. How could I verify whether one element is child of another?
1. What is the best way to create a DOM element? Set innherHTML or use createElement?
1. What is createDocumentFragment and why you might use it?
1. What is reflow? What causes reflow? How could you reduce reflow?
1. What is repaint and when does this happen?
1. How could you make sure to run some JavaScript when DOM is ready like $(document).ready?
1. What is event bubble? How does event flows in DOM?
1. How would you destroy multiple list items with one click handler?
1. Create a button that is destroyed by clicking in it but two new buttons are created in it's place.
1. How could you capture all clicks in a page?
1. How can you get all the texts in a web page?
1. What is defer and async keyword does in a script tag?
1. 10 rapid fire questions

#### [JS: Answers for DOM related Questions](http://www.thatjsdude.com/interview/dom.html)

## [html: Basic Questions for Begginers](http://www.thatjsdude.com/interview/html.html)

15 basic questions and asnwers
______
1. Why do you need doctype?
2. What are data-* attributes used for?
3. How can you generate a public key in html?
4. How do you change the direction of html text?
5. How can you highlight text in html?
6. Can you apply css to a part of html document only?
7. Will a browser make http request for the following cases?
8. Which resource would be downloaded first?
9. What is an optional tag?
10. What are the differences between div and span?
11. How would you differentiate between div, section, and article?
12. How would you select svg or canvas for your site?
13. How to serve html in multiple languages?
14. Explain standard and quirks mode.
15. What is a semantic tag?

#### [HTML: Answers for Basic Questions](http://www.thatjsdude.com/interview/html.html)

## [JavaScript: LinkedList (part 4: work in process)](http://www.thatjsdude.com/interview/linkedList.html)
Very rough stage..need to finish (for intermediate)

## [JavaScript: search and Sort (part 5: work in process)](http://khan4019.github.io/front-end-Interview-Questions/sort.html)
Very rough stage..need to finish (for expert)

## [JavaScript: Binary Search Tree (part 6: work in process)](http://khan4019.github.io/front-end-Interview-Questions/bst.html)
Very rough stage..need to finish (for expert)
__________________

## TODO list
1. CSS: Generate mock up from provided layout
2. JavaScript: Programming challenges for expert
3. HR related questions like
1. What is your weakness
2. Why are you leaving your current job
3. Tell me about a project that you weren't able to finish on time
4. How you resolve conflict among team members
5. How will you introduce a new technology to the team
6. Do you prefer to work individually or in a team
7. Sell this pen/coke/something to me
8. How much salary do you want
3. What you don't like you current job
4. What you like least in your current job
3. Tree Data Structure in JavaScript
4. Graph and high order data structure in JavaScript
___________________

Inpsired by, [darcyclarke](https://github.com/darcyclarke/Front-end-Developer-Interview-Questions), [css-tricks](http://css-tricks.com/interview-questions-css/), [david shariff](https://gist.github.com/jesspoemape/87665d65cde3980485ec27cef1602a0d) and some google results. If you want to add any question to this let me know.