good ol ternery operator man. I always feel a sense of "oh yea i could of just done that" everytime i write an if/else statement, than come here to see others solutions.
This is because the expected output is a number, not a string. Also, the given operators are only limited to +-*/, so you do not need to handle invalid operators by returning a Nan string.
Fix: swap Expected and Actual.
you fr just hate typing
he's just lazy to write out all the names lmao
do you teach. you made than very logical and understandable. thank you
good ol ternery operator man. I always feel a sense of "oh yea i could of just done that" everytime i write an if/else statement, than come here to see others solutions.
mine is better
It seems you managed to get it?
Maybe this article can still help? https://docs.codewars.com/training/training-example
i am super confused, am i suppose to actually get a number or just write a program that says value. can someone please help
Approved
nice one bro (:
Your codes are very clean
This is because the expected output is a number, not a string. Also, the given operators are only limited to
+-*/
, so you do not need to handle invalid operators by returning aNan
string.You are using the wrong variable name, should be
operator
, notoperation
That is because you are not handling the default case, Read this for more info
Why does it say that the returned value is not a number. I had to make the type any
Loading more items...