Call 618.222.5382

CIS 177: JavaScript Frequently Asked Questions

  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 i have a var str = 'hello world', how could i get str.reverse() return 'dlrow olleh'?
  8. How could you make this work [1,2,3,4,5].duplicator(); // [1,2,3,4,5,1,2,3,4,5] ?
  9. If you want to use an arbitrary object as value of this, how will you do that?
  10. If an older browser dont have bind function, how will you shim it
  11. Write a simple function to tell whether 2 is passed as parameter or not?
  12. How could you use Math.max to find the max value in an array?
  13. What the heck is this in JavaScript?
  14. 21+ small but tricky questions
  15. How could you set a prefix before everything you log? for example, if you log('my message') it will log: "(app) my message"
  16. What will you see in the console for the following example?
  17. 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?
  18. 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?
  19. Does JavaScript pass parameter by value or by reference?
  20. How could you implement cache to save calculation time for a recursive fibonacci function?
  21. How could you cache execution of any function?
  22. If you need to implement the following chaining with call back, how will you implement it?
  23. How could you implement moveLeft animation?
  24. How would you implement currying for any functions?
Over 6,000+ links on web design. Free RSS feed maker
More Coming Soon
More Coming Soon
More Coming Soon
More Coming Soon