How Well Are You Known?

  • The FTB Forum is now read-only, and is here as an archive. To participate in our community discussions, please join our Discord! https://ftb.team/discord

lenscas

Over-Achiever
Jul 31, 2013
2,015
1,801
248
NaN/undefined/null <- because a language really needs 3 things to say that it has not a real value >_<
 

lenscas

Over-Achiever
Jul 31, 2013
2,015
1,801
248
0/10
I also love how NaN is considered a number when it stands for not a number >_<
 

lenscas

Over-Achiever
Jul 31, 2013
2,015
1,801
248
0/10

yes, but it makes it "harder" to check if you are dealing with a number or not.

It doesn't really make it harder its just something you will always need to think about.
 

lenscas

Over-Achiever
Jul 31, 2013
2,015
1,801
248
If I remember correctly
Code:
var lolz ="test lolz"*1
console.log(lozl) //should give NaN
console.log(typeof(lozl)) //should give number

var test2 = "test"+1
console.log(test2)//gives test1
console.log(typeof(test2))//gives string
 

lenscas

Over-Achiever
Jul 31, 2013
2,015
1,801
248
you get why I hate javascript now?
oh and you can also only use numbers for the keys of arrays
thus testArray['test'] is not possible, if you want that you need to make an object