0
Please can you explain
Why alert(typeof(typeof(3.14))) will have output string? Why not a number? Thanks.
5 Antworten
+ 7
because
typeof 3.14
is "number"
so
typeof "number"
is string
please use appropriate question title and tags.
https://www.sololearn.com/Discuss/1316935/?ref=app
priya, you can highlight that star at lower left of question to follow a thread without answering 😉
+ 2
alert(typeof(3.14)) // outputs number because 3.14 is a number
alert(typeof(typeof(3.14))) //outputs string because "number" is a string
alert(typeof(typeof(typeof(3.14)))) // outputs string because "string" is a string
+ 1
Thank you all
0
Following
0
Ok, got it. It gives answer to the word number...
alert(typeof(typeof(3.14)))
alert(typeof(number))
alert(string)
👍