The answer keeps coming out as "35" even though we're using the parenthesis technique.
This is because the prompt function is unambiguously returning a string, and we need to force Javascript to convert oranges from a string to a number. Fortunately, there's a built-in function called Number().
Try altering the program below to use the Number() function on the oranges variable, and check it does the right thing.
|