3 ms·
Mathematical Symbols and JavaScript Equivalents
- austin-cheney 2y agoI believe use of the equal sign character for assignment is a convention that comes from Fortran. It’s so unnecessary because JavaScript has two assignment operators. The colon character serves as an assignment operator in object literals and ternary expressions. If the colon character were the universal assignment character the language wouldn’t need == or === for comparison because = would be enough.
- meiraleal 2y ago> If the colon character were the universal assignment character the language wouldn’t need == or === for comparison because = would be enough. You would need to break a few basic JS premises too: 0 = false 0 != false
- austin-cheney 2y ago0 = false 0 ! false
- meiraleal 2y agoLOL