1) Difference between setTimeOut and setInterval. setTimeOut will call the function in order just once, setInterval will call it multiple times. The latest Firefox will only call once per second. Since what happens in the called function may take longer to execute than the next time interval, it is recommended to use setTimeOut and wait for the execution to finish in the following fashion:
// logic here
})(); // This way you know loop() finish executing before it gets called again
2) Iterations, and array sorting (see Array Sorting for details. Very important.
3) There are recurring themes of the kind of teasers candidates are asked to complete. You know you know your stuff, but you may be a bit nervous and not in the best position to think things through, so make sure you review the following:
– Write a program that determines if a string is a palindrome
– Write a program that tells you what is the fastest path down a binary tree
4) Memoization: it is simply keeping a cache of results inside functions that perform expensive calculations, so they don’t have to be repeated over and over again.