Putting '+' before a string which represents a number will coerce that string into a number, but that's not best practice as it isn't as readable as other methods.
Wouldn't that depend on what your expected behavior on having a non-integer input is? Depending on context, returning without raising an exception could just create problems.
writing it in 1 line doesn't make it better...
not the best solution and not very clever.
sum
for the result of the addition makes the code more self explenatoryOkay, thanks for that !
Great solution but it has me a little confused.
How does the last section of code convert the sum into binary ?
Thanks
Love this. Clearly written. Clean. Maybe consider renaming your "removed" var to "moved".
How long did it take you to write this? Just curious.
There're already enough.
Thanks man, this is really helpful for noobies like me.
Putting '+' before a string which represents a number will coerce that string into a number, but that's not best practice as it isn't as readable as other methods.
This comment is hidden because it contains spoiler information about the solution
What is the reason you put base ten in the parseInt function?
This comment is hidden because it contains spoiler information about the solution
Wouldn't that depend on what your expected behavior on having a non-integer input is? Depending on context, returning without raising an exception could just create problems.
This comment is hidden because it contains spoiler information about the solution
\m/
Loading more items...