🚧unary plus (+)

🚧 under construction -> not not (!!)

JSstatementexpressionoperatorarithmeticunary ⟩ +

convert any value (except Symbol, BigInt) to Number.

// any -> number
+x

// except Symbol, BigInt
+Symbol()   // ⛔️ TypeError
+40n        // ⛔️ TypeError
// TypeError: Cannot convert a Symbol/BigInt value to a number

🌟 table of operators,

Last updated