Ad
  • Custom User Avatar

    The left side of the comparison determines if the variable is NOT an "existing"true or an "integer""not a decimal", the result is undefined

    If the left of the comparison fails, then we move to the right comparison

    If the integer is odd then return false, else return true.

  • Custom User Avatar

    Because this is kumite. Here it's about showing off skills related to the knowledge of tricks to reduce the length of the code as much as possible, I think. Of course, in "normal" code readability is very important.

  • Custom User Avatar

    Why you dont return simple undefined instead od {}.a ?

    I mean:
    isEven=n=> n%1==0 ? !(n%2) : undefined

    and this is more readability. When you put some whitespace beetween

  • Custom User Avatar
  • Custom User Avatar

    Well done! I didn't know the trick {}.a for undefined...