Photo by Claudio Schwarz on Unsplash
A 30 sec read that any Javascript beginner will find to be good to know
If you multiply 2 with a string "2" then you will get a 4 !
Unlike Ruby, where any last expression inside a function is by default the return value if return is not explicitly defined, Javascript on the other hand NEEDS you to have a return
keyword if you want to return something.
toLowerCase
method does NOT change the value of the string itself. You need to store the output into a separate variable.
Self-descriptive variable names are super important !
“There are only two hard things in Computer Science: cache invalidation and naming things.” — Phil Karlton