or vs ?? javascript code example
Example 1: java vs javascript
/*
JavaScript can be used to do neat things like creating
animation in HTML. ... JavaScript code is run on a
browser only, while Java creates applications that run
in a virtual machine or browser. Java is an OOP
(object-oriented programming) language, and JavaScript is
specifically an OOP scripting language.
*/
Example 2: != vs !== javascript
(0 == '0') // true
(0 === '0') // false
('' == 0 ) // true, the string will implicitly be converted to an integer
('' === 0 ) // false, no implicit cast is being made