Read this tutorial and learn the right method of detecting whether the user pressed the Enter key. The given method provides a cross browser compatibility.
Read the tutorial and find out one of the methods of checking whether the element is visible after scrolling with jQuery. Also, find about utility function.
This tutorial provides the method of checking whether the type of the variable is undefined. Read about the differences between undefined and “undefined”.