" 123" + "456" = " 123456"
Therefore, if you want prompt to input a number that can be used for operation, you need to use parseInt for forced type conversion, so as to avoid program errors (if it is a number with a decimal, such as an amount, use parseFloat instead).
If prompt enters a non-numeric string (such as name, address, etc.). ) or numbers that do not need to participate in mathematical operations (such as ID number, mobile phone number, order number, etc. ), don't use parseInt, or you will make a mistake!