devxlogo

Using the Triple Equals Sign Operator (===) to Check Variable Type and Value

Using the Triple Equals Sign Operator (===) to Check Variable Type and Value

In some cases, the JavaScript triple equals sign operator can simplify variable type and value checking. The operator tests both type and value for equivalency. Here’s a simple example HTML page that illustrates the technique.

devx-admin

Share the Post: