Posts Tagged Under: vanilla js



Explaining padStart & padEnd – two ES8 string methods

EcmaScript 2017 or ES8 has introduced two new String prototype methods. padStart and padEnd. Both of them will be used in display related purpose. Even the name says it’s all about “padding”. You can add some extra spaces or dashes (or any other character), before of after a string.

Read More



Explaining async await of ES8 with examples

A much awaited feature async await is available on your browser now (if you’re using chrome 55 or greater). Firefox will start supporting from version 52 an Safari from 10.1. Others will also follow the path. So, we can say we have entered the era of async await and now can

Read More



How to define private variables in EcmaScript 2015 (ES6)

Since the world moved from ES5 to ES6, huge syntactical (not only syntactical) changes took place to make out JavaScript codebase more beautiful. Though every other syntaxes have been improved, but one thing which is troubling the developers is, how to declare the private variables inside a class. But unfortunately

Read More