Help the front End community to rock interview
HTML JavaScript CSS
Latest commit e8380b4 Jan 2, 2017 @khan4019 committed on GitHub Merge pull request #67 from deadcoder0904/master
Typo 'permutaitons' fixed
Permalink
Failed to load latest commit information.
css created a file hastable and some intro for Trie Jan 5, 2015
fonts initial commit Jan 1, 2014
images description about red black tree Jan 4, 2015
js added extension related question May 17, 2014
resources other changes Jan 18, 2015
slides some other stuff Dec 8, 2014
.gitattributes initial commit Jan 1, 2014
.gitignore initial commit Jan 1, 2014
README.md Merge pull request #67 from deadcoder0904/master Jan 2, 2017
ab5722ba-25d6-4987-b242-ff16ca09acc5.dmp some unknown changes Jan 18, 2015
algorithm.html added new file oop Jul 26, 2014
browser.html added float related question Jan 2, 2014
bst.html implement BFS for binarySearchTree Oct 16, 2015
css.html Change <option> and <html> elements both into escape character in css… Jan 2, 2017
css2.html some unknown changes Jan 18, 2015
dom.html Update dom.html Oct 11, 2014
graph.html other changes Jan 18, 2015
hashtable.html other changes Jan 18, 2015
hrRelated.html draft outline for sample answer Apr 20, 2014
html.html Update html.html Jan 3, 2016
index.html chanbed read me link for bst Dec 27, 2014
js1.html added explanation about permutation Jul 1, 2014
js2.html making minor sentence tweaks Aug 22, 2015
js3.html some questions Nov 16, 2015
linkedList.html updated page link for social media Jun 7, 2014
oop.html slides to talk about front end interview process Oct 26, 2014
questions.html moved files upward Jan 2, 2014
search.html just love to add files Dec 5, 2014
sort.html minor changes Dec 21, 2014
template.html created a file hastable and some intro for Trie Jan 5, 2015
timeComplexity.html just love to add files Dec 5, 2014
todo.html Create todo.html Jun 3, 2016
tree.html created a file hastable and some intro for Trie Jan 5, 2015

README.md

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.

JavaScript: Basics and Tricky Questions

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

css: Basics and Tricky Questions

21+ questions and answers


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

CSS: Answer for Basics and Tricky Questions

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
  2. How would u implement modularity in css?
  3. If something doesn't work in a specific browser (IE8), you would u approach this problem?
  4. How do you test cross-browser compatibility of your site?
  5. What is the greatest hack you did in css so far?
  6. What is grid layout?
  7. How can you make a site responsive?
  8. Why reset css is useful? or how normalize.css works?
  9. What do you know about text shadows, box shadows?

JavaScript: Algorithm Beginners Level

20 questions and answers (for beginners)


  1. Verify a prime number?
  2. Find all prime factors of a number?
  3. Get nth Fibonacci number?
  4. Find the greatest common divisor of two numbers?
  5. Remove duplicate members from an array?
  6. merge two sorted array?
  7. Swap two numbers without using a temp variable?
  8. Reverse a string in JavaScript?
  9. How would you reverse words in a sentence?
  10. Reverse words in place?
  11. Find the first non repeating char in a string?
  12. Remove duplicate characters from a sting?
  13. How will you verify a word as palindrome?
  14. Generate random between 5 to 7 by using defined function.
  15. Find missing number from unsorted array of integers.
  16. Get two numbers that equal to a given number?
  17. Find the largest sum of any two elements?
  18. Total number of zeros from 1 upto n?
  19. Check whether a given string is a substring of bigger string
  20. Get permutations of a string

JS: Answer for Algorithm Beginners Level

JavaScript: DOM related Questions

21+ questions and answers (for intermediate JS Developers)


  1. Is there any difference between window and document?
  2. Does document.onload and window.onload fire at the same time?
  3. Is attribute similar to property?
  4. What are the different ways to get an element from DOM?
  5. What is the fastest way to select elements by using css selectors?
  6. How come, I can't use forEach or similar array methods on a NodeList?
  7. If you need to implement getElementByAttribute, how would you implement it?
  8. How would you add a class to an element by query selector?
  9. How could I verify whether one element is child of another?
  10. What is the best way to create a DOM element? Set innherHTML or use createElement?
  11. What is createDocumentFragment and why you might use it?
  12. What is reflow? What causes reflow? How could you reduce reflow?
  13. What is repaint and when does this happen?
  14. How could you make sure to run some JavaScript when DOM is ready like $(document).ready?
  15. What is event bubble? How does event flows in DOM?
  16. How would you destroy multiple list items with one click handler?
  17. Create a button that is destroyed by clicking in it but two new buttons are created in it's place.
  18. How could you capture all clicks in a page?
  19. How can you get all the texts in a web page?
  20. What is defer and async keyword does in a script tag?
  21. 10 rapid fire questions

JS: Answers for DOM related Questions

html: Basic Questions for Beginners

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

JavaScript: LinkedList (part 4: work in process)

Very rough stage..need to finish (for intermediate)

JavaScript: search and Sort (part 5: work in process)

Very rough stage..need to finish (for expert)

JavaScript: Binary Search Tree (part 6: work in process)

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 werent 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 prefere to work individually or in a team
    7. Sell this pen/coke/something to me
    8. How much salary do you want
    9. What you dont like you current job
    10. What you like least in your current job
  4. Tree Data Structure in JavaScript
  5. Graph and high order data structure in JavaScript ___________________

Inpsired by, darcyclarke, css-tricks, david shariff and some google results. If you want to add any question to this let me know.