JS & Node

3 Ways To Do Case Insensitive String Comparison In Javascript

Welcome to a quick tutorial on how to do case-insensitive string comparison in Javascript. By default, the == comparison operator in Javascript is case-sensitive. Just how can we do a case-insensitive comparison in Javascript then? The common ways to do a case-insensitive string comparison in Javascript are: Change both strings to lowercase – if (FIRST.toLowerCase()

3 Ways To Do Case Insensitive String Comparison In Javascript Read More »

5 Ways to Pass Variables Between Pages In Javascript

Welcome to a tutorial on how to pass variables between pages in Javascript. Need to pass some data between different pages? An easy way to pass variables between pages is to use a query string: On the first page: var para = new URLSearchParams(); para.append(“KEY”, “VALUE”); location.href = “HTTP://SITE.COM/PAGE.HTML?” + para.toString(); On the second page:

5 Ways to Pass Variables Between Pages In Javascript Read More »