Andrew ParkUsing “Guard Clause”I tend to use if statements “if (true) {do something}”a lot. And sometimes I end up with too many nested blocks that is not easy to read.Jul 4, 2021Jul 4, 2021
Andrew ParkWhat is “require”?You may have seen a statement with “require” command, as an example below in ”script.js” file. First time I saw it, it threw me off.Jun 27, 2021Jun 27, 2021
Andrew Park“forEach()” and “this”On my last blog, I wrote about binding “this” to an “EventListener”.Jun 18, 2021Jun 18, 2021
Andrew ParkJavaScript EventListener and “this”Not knowing what “this” referring to can cause a big headache in Object Oriented Programming in JavaScript.Jun 13, 2021Jun 13, 2021
Andrew ParkShort Circuiting (part 2 “&&”)In my previous blog, I wrote about Short Circuiting, using or (“||”) operator.Jun 5, 2021Jun 5, 2021
Andrew ParkShort Circuiting (part 1 “||”)The other day, I ran into code that I did not quite understood. And it looked something like below:May 30, 2021May 30, 2021
Andrew Park“Sort()” of confusedI was reviewing javaScript .sort() method, and I got confusion.May 16, 2021May 16, 2021
Andrew Park“Closure” explainedI wrote a blog on Scope a couple of blogs before, and it took some time for me to understand the difference between Scope and Closure.May 9, 2021May 9, 2021
Andrew ParkHoisting, where to declare variablesRule of thumb is all variables (const, let) must be declared before it can be used (var has slightly different rule, but we should never…May 2, 2021May 2, 2021