1The OR operator || uses the right value if left is falsy,
2 while the nullish coalescing operator ?? uses the right
3 value if left is null or undefined.
1/*
2JavaScript: Easier to learn and run, runs in browser,
3not strictly object-orientated, mainly client-side.
4
5Java: More secure, strict OOP, steeper learning curve,
6used literally everywhere, needs to be compiled.
7*/
1/*
2JavaScript can be used to do neat things like creating
3animation in HTML. ... JavaScript code is run on a
4browser only, while Java creates applications that run
5in a virtual machine or browser. Java is an OOP
6(object-oriented programming) language, and JavaScript is
7specifically an OOP scripting language.
8*/
1(0 == '0') // true
2(0 === '0') // false
3
4('' == 0 ) // true, the string will implicitly be converted to an integer
5('' === 0 ) // false, no implicit cast is being made
6
1java is virtualised and compiled while javascript isn't.
2javascript and java aren't that similar apart from beign
3both OOP.
1/*
2Java script is also better than java when it comes to front-end web development
3server side performmance because node.js runs much faster than both java and
4python
5*/