austin-cheney 2 months ago |

I 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.