Js variable type conversion
Js variable type conversion 1. js variable operation//When adding a string and a number, the number is converted to a string, and then concatenated 1 + 2 +3 // 6 1 + 2 + '3' // '33' '1' + 2 + 3 // '123' true + '10' // 'true10' //However, the subtraction, multiplication and division calculation will automatically convert its string to a number for calculation 4 - '2' // 2 4 / '2' // 2 4 * '2' // 8 //Therefore, when the front end receives the results from the back end, it must remember to convert them to digital types when performing addition calculation to avoid unexpected problems 4+parseInt ('2 ')//62. Double==//About the symbol of==