filmov
tv
Javascript plus operator, javascript interview question | console.log #javascript #js
Показать описание
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.
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.