Skip to content Skip to sidebar Skip to footer
Showing posts with the label Implicit Conversion

Autoconversion In Javascript: Isn't It Supposed To Convert A String To A Number When Done Like Stringvar = 1+stringvar?

(Firefox32, Win 7) When using the scratchpad: leads in the console to: '02' 'string… Read more Autoconversion In Javascript: Isn't It Supposed To Convert A String To A Number When Done Like Stringvar = 1+stringvar?

Why + Sign Is The Exception In Javascript?

i did this > 5 + 2 // 7, this is correct > 5 - 2 // 3 , obviously > 5 - '2' /… Read more Why + Sign Is The Exception In Javascript?

Implicit Data Type Conversion In Javascript When Comparing Integer With String Using ==

The code: var num = 20; if(num == '20') { alert('It works'); } else { aler… Read more Implicit Data Type Conversion In Javascript When Comparing Integer With String Using ==