Evaluating JavaScript Code via Import()

The import() operator lets us dynamically load ECMAScript modules. But they can also be used to evaluate JavaScript code (as Andrea Giammarchi recently pointed out to me), as an alternative to eval(). This blog post explains how that works. Read more

Similar

How to Capitalize Strings in JavaScript

To capitalize a string in Javascript so the first character is in uppercase, we don’t need to add another NPM dependency. We can use plain JavaScript or even CSS if it is solely for presentational purposes. TLDR; const chars = 'hello' chars[0].toUpperCase... (more…)

Read more »