7 kyu

isAN(value)

1,703 of 1,705wthit56

Description:

isNaN doesn't work very well. We want us to tell us whether the value or object we're dealing with is a number or not. Instead, it tells us if the value is equal to the NaN value it has on-record.

So let's make a proper function, called isAN, for is A Number. If you pass it a value, it will return true if a value is a valid primitive number or Number object, and false if not.

Fundamentals

Stats:

CreatedApr 15, 2014
PublishedApr 15, 2014
Warriors Trained3813
Total Skips795
Total Code Submissions34402
Total Times Completed1705
JavaScript Completions1703
Total Stars41
% of votes with a positive feedback rating85% of 157
Total "Very Satisfied" Votes121
Total "Somewhat Satisfied" Votes26
Total "Not Satisfied" Votes10
Ad
Contributors
  • wthit56 Avatar
  • jhoffner Avatar
Ad