VOOZH about

URL: https://www.geeksforgeeks.org/javascript/javascript-arithmetic-unary-plus-operator/

⇱ JavaScript Arithmetic Unary Plus(+) Operator - GeeksforGeeks


  • Courses
  • Tutorials
  • Interview Prep

JavaScript Arithmetic Unary Plus(+) Operator

Last Updated : 23 Jul, 2025

The Unary plus(+) operation is a single operand operator (which means it worked with only a single operand preceding or succeeding to it), which is used to convert its operand to a number, if it isn't already a number. 

Syntax:

+Operand

Below examples illustrate the Unary plus(+) Operator in JavaScript:

Example 1:This example shows the use of the JavaScript Unary plus(+) Operator. It converts a string into a number.

Output:

10
number

Example 2: The following example demonstrates a unary method with numbers.

Output:

 100
-100
 20

Example 3: The following example demonstrates a unary method with non-numbers.

Output:

1
0
0
NaN

We have a complete list of Javascript Operators, to check those please go through the Javascript Operators Complete Reference article.

Supported Browsers:

  • Chrome
  • Edge
  • Firefox
  • Safari
  • IE
  • Opera
Comment