Categories
Codes Javascript

7 Tricks of JavaScript Spread (…) Operator

One of the most useful operators introduced in ES6 in the spread (…) operator. It spreads an iterable object to a new list of elements. In this post, I will share about how to implement the spread operator in some use cases.

Categories
Codes Javascript

Use This Instead Of If-Else and Switch-Case in JavaScript

Sometimes, you will meet cases where there’s too much if-else. Then, you would use switch-case. But it’s still too much. Is there another way? In JavaScript, there is. Read more to find out.

Categories
Habits Humans

Humans = Habit-based Programs (Part 2/3)

In this second part of Humans = Habit-based Programs post, I share about the ‘how’ to consciously program a new habit.

Categories
Codes Javascript

JavaScript: var, let, const

What is the difference between var, let, and const in JavaScript? In this post, I will share about the difference in them, and recommendation on which to use.

Categories
Codes Regex

Regex: Lookahead

I made this post as a sub-topic for the main “Simple Regex Implementation in JavaScript” post, but it was getting too long as I covered quite a lot about regex lookahead. This post includes step-by-step understanding of lookahead in regex and code snippets to practice and implement yourself. Click on the title to read more…

Categories
Codes Regex

Regex For Starters

My first tutorial in this blog! Regex might seem difficult to understand, but if we break it down to little pieces, it’s actually quite easy. I covered some basic things with examples beginners need to know about regex: the base syntax, flags, and character classes. Click on the title to read more…