blog.kherashanu.comJavascript notes - Part 4 - Shorthand syntaxES2015 introduced a shorthand syntax that is simply convenient syntactical sugar to write less, it helps developers write little more DRY code and is easy on the eyes once we know how it works. function getUserInfo({name, email, isActive, lastLogin})...Feb 20, 2021·1 min read
blog.kherashanu.comJavascript notes - Part 5 - Computed property namesIf you have written javascript for a few weeks at least, You might have come across the issue of using a variable value as the key for an object, see the example below. // Wrong code function setObject(key, value) { return { key: value } } c...Feb 20, 2021·1 min read
blog.kherashanu.comJavascript notes - Part 6 - Template literalsTemplate literal is one of the best features in modern Javascript if not the best. Once You start using them, you will forget the old way of concatenating strings together just for including values from variables, etc. Before var welcome_message = "H...Feb 20, 2021·1 min read
blog.kherashanu.comJavascript notes - Part 2 - Variable declarationES2015 introduced two new keywords for declaring variables - var and const. Thus including the original var. Thus, now we have three keywords for declaring variables in Javascript. Before we understand the difference between var, let, and const, we n...Feb 19, 2021·4 min read