Javascript plus operator, javascript interview question | console.log #javascript #js

preview_player
Показать описание
Interviewer may ask this question.
The Unary plus Operator
The unary plus operator can be used to convert a variable to a number.
If the variable cannot be converted, it will still become a number, but with the value NaN (Not a Number).

This is one of the method to convert Strings to Numbers.
Рекомендации по теме