4 ms·
> 2. = and ==. Ugh. The Bug Maker. You mean == and === ?
by avinassh 5y ago
> 2. = and ==. Ugh. The Bug Maker.
You mean == and === ?
- ryanchants 5y agoI believe they are referring to: let x = 5; if (x=3) { foo(); } The common defensive way of handling this is: if(3=x) { so it errors and catches the missing =
- mimixco 5y agoYes, that. = is for assignment and == is a test. The test inside your if needs == to work.