5 JavaScript interview questions What is Scope? What does the new keyword do? What are the falsy values in JavaScript? What is an IIFE, what is the use of it? What's the value of this in JavaScript?
4 Random coding tips Write useful comments Stay humble Don't be afraid to ask for help Keep practicing
JavaScript's falsy values: - false - undefined - null - The number 0 - The number NaN - The empty string
"Computer science education cannot make anybody an expert programmer any more than studying brushes and pigment can make somebody an expert painter." - Eric Raymond
Check for if (-1 == x) instead of if (x == -1) to avoid bugs like if(x = -1)
Theory is when you know something, but it doesn't work Practice is when something works, but you don't know why Programmers combine theory and practice Nothing works and they don't know why
"Every program has (at least) two purposes: the one for which it was written, and another for which it wasn't." - Alan J. Perlis
"The only constructive theory connecting neuroscience and psychology will arise from the study of software." - Alan J. Perlis
"Program testing can be a very effective way to show the presence of bugs, but is hopelessly inadequate for showing their absence." - Edsger Dijkstra
"There are no significant bugs in our released software that any significant number of users want fixed." - Bill Gates
"Test doubles are objects that replace real dependencies to enable automated testing. They are the automated testing equivalent of movie stunt people: they take the place of the original since having the real one is expensive or impractical." Excellent analogy by @venkat_s
In JavaScript, a function always returns a value. If the return value is not specified, then it returns undefined.
"Part of the inhumanity of the computer is that, once it is competently programmed and working smoothly, it is completely honest." - Isaac Asimov