Articles tagged in: JavaScript



JavaScript — How to Fix “Uncaught SyntaxError: Cannot use import statement outside a module”

JavaScript programs started small by being used here and there. Over time, the usage of JavaScript increased and we’re writing full applications that run in the browser. These large applications can be hard to maintain. It makes sense to think about ways of splitting them up into modules. Modern …

Continue Reading

JavaScript — How to Convert URLSearchParams to Object

Modern JavaScript ships with the dedicated URLSearchParams class to interact with URL query parameters. This class parses query parameters from a given string and provides methods to interact with the parameters. For example, you may append, delete, get, sort, or iterate through all items using the forEach, keys, or values …

Continue Reading

Get Yesterday's Date in JavaScript or Node.js

Sometimes it’s helpful to translate dates into labels in your web application. For example, the human brain perceives the label „yesterday“ easier than translating the string of yesterday’s date to „yesterday“. This tutorial shows you how to calculate yesterday’s date in JavaScript. {{outline}} How Do You Get …

Continue Reading
Page 1 of 4

Explore the Library

Find interesting tutorials and solutions for your problems.