0

Hi I have the following code, even if I want to make the variable number, the type is still string, any ideas? Thanks in advance.

  var status = 100
  alert(status) 
  alert(typeof(status)) gives string
  • Just tried and it shows up as a string in FF and Chrome, but as a number in IE-11. – Yogi May 16 '15 at 01:12
  • Confirmed answer in duplicate question. If you change the name to something other than status the typeof returns as "number" in FF, IE, and Chrome. – Yogi May 16 '15 at 01:29

0 Answers0