Javascript Tutorials

How to use localStorage and sessionStorage in JavaScript?

World Wide Web Consortium or W3C introduced two storage object mechanisms to store data in the browser which are localStorage and sessionStorage objects

2021-07-28

How to check if a string contains a substring or not in JavaScript?

There are two methods in JavaScript to find if a string contains another string or not. The includes() method returns true or false after a search and indexOf() method returns index of a string or -1 if it does not find a match

2021-08-08

What is http cookie and how it works?

The HTTP protocol is stateless which means that the server does not remember about any response it sent to the user’s browser. It executes each request independently without knowing past requests that are already executed.

2021-07-26

How to check if a string is null, blank, empty or undefined using JavaScript?

Instead of using any library function, in this post we are going to learn how to check if a string is null, blank, empty or undefined with just one line instruction

2021-08-10