Piggybacking on this, ==2?'':x could also be changed to ^2?x:'' to drop another character. The join could also be dropped in favor of (...+'') to drop a few more characters.
Hello ! Your solution is not taking into account parentheses : is not working for this example (22 - 2) / 5
In this example the priority is 22 - 2 and than result / 5
Piggybacking on this,
==2?'':x
could also be changed to^2?x:''
to drop another character. Thejoin
could also be dropped in favor of(...+'')
to drop a few more characters.It cannot interpret the parentheses
Nice one!
Also realizing that the order of operation matters exactly, division and minus should go before multiply and plus...
I believe that makes it into an integer, instead of string type.
https://stackoverflow.com/questions/6682997/what-is-the-purpose-of-a-plus-symbol-before-a-variable
ashelkov, your solution is brilliant!
Can you explain, what does mean a '+' character in this record: '+args[i + 1]' ? Thanks!
yeah you right - parentheses i dont count
but u shouldnt count it in this task
u should pass the tests - that what i do in elegant way :)
Hello ! Your solution is not taking into account parentheses : is not working for this example (22 - 2) / 5
In this example the priority is 22 - 2 and than result / 5
You magician
your solution nice too
thank you!
your solution also nice and laconic.
Good coding
no no no. react key you should use when you map some array/list. separate component dont know nothing about react key.
EasterEgg should not return
<li key={key}>{name}</li>
?dont remember exactly. maybe the same:)
How long did it take ? :) I came up with the same solution in few days actually.
Loading more items...