Hey.
The task is this: there is a line - "12 * 3-4 + 342 / 2.54".
You need to match the last number after the sign, i.e. 2.54, and instead of "/" there can be both "+" and "-" and "*". Tell me if it's easy. Tried like this:
function getLastNumber() { if (lastSymbol == (0 || 1 || 2 || 3 || 4 || 5 || 6 || 7 || 8 || 9 || .)) { lastNumber += lastSymbol; inverse(lastNumber); } getLastNumber() }
But it does not work, throws it out of the application when the function is called. Apparently, something is wrong with recursion. I apologize in advance for the pseudocode ... (: