=== in js
0 == false // true
0 === false // false, because they are of a different type
1 == "1" // true, automatic type conversion for value only
1 === "1" // false, because they are of a different type
null == undefined // true
null === undefined // false
'0' == false // true
'0' === false // false// === means equal value and equal type
var x = 5
// true
x === 5
// false
x === "5"5 =='5' // true: ignores type
5 === '5' // false: includes type<!DOCTYPE html>
<html>
<body>
<p id="demo"></p>
<script>
var x = abc;
document.getElementById("demo").innerHTML = (x === "ABC");
</script>
</body>
</html>
x = x || 1
Also in JavaScript:
- bigint type js
- javascript on submit
- onchange value in hidden input
- js image on canvas
- factorial function javascript
- link in discord.js
- node js download file to folder
- date
- javascript how to get every element after the 1st in an array
- for loop javascript
- random number javascript
- javascript date calculations ignore weekends
- js axios progress
- modulus js
- javascript randomly shuffle array
- javascript animate elements
- in in sequelize
- setting property to method in child class javascript
- math random equitative js
- javascript find all href with same value
- Javascript document ready
- js get element by X Y
- javascript function destructuring
- how to create dynamic json?