Ad
  • Custom User Avatar

    you really wrote -, ?

  • Custom User Avatar

    This comment is hidden because it contains spoiler information about the solution

  • Custom User Avatar

    Please, always format your code (triple backtick before and after it), as it makes things much easier to read.

    Your code returns a falsey value for 0s and can't work for values which are not decimal numbers; at matt stated, I would test for numbers otherwise and there are plenty of ways, from regexes (do yourself a favour and learn them soon if you don't know about them), from merely checking if the given value is in the array ['0', '1', '2', '3', '4', '5', '6', '7', '8', '9'].

  • Default User Avatar

    I don't really know why it doesn't work but I recommend using a different method to find out if the value is a number or not.