Exponentiation(**) Arithmetic Operator in JavaScript Last Updated : 23 Jul, 2025 Comments Improve Suggest changes 5 Likes Like Report JavaScript exponentiation(**) operator in JavaScript is represented by "**" and is used to find the power of the first operator raised to the second operator. This operator is equal to Math.pow() but makes the code simpler and can even accept BigInt primitive data type. The exponentiation operator is right associative which means that x**y**z will give the same result as x**(y**z). Syntax: a**b Return: It returns the result of raising the first operand to the power of the second operand. Example 1: In this example, we will use the exponentiation operator on positive numbers. JavaScript let a=4; let b=3; let c=-2 console.log(a**b); console.log(b**a); console.log(c**a); console.log(a**c) Output: 64 81 16 0.0625 Example 2: In this example, we will try to find the powers of a negative number before assigning it to a variable JavaScript console.log(-2**3) Output: Explanation: Like other languages, JavaScript does not allow a unary operator before exponentiation expression to run this program. To overcome this problem we will have to put -2 in parenthesis like (-2) Example 3: In this example, we will try to find the power of NaN JavaScript console.log(NaN**3) console.log(NaN**0) Output: NaN 1 Note: In some languages, '^' operator is used as an exponentiation operator but JavaScript uses this operator as bitwise logical XOR operator. Supported Browser: ChromeEdgeFirefoxOperaSafari Create Quiz Comment S shobhit_sharma Follow 5 Improve S shobhit_sharma Follow 5 Improve Article Tags : JavaScript Web Technologies Explore JavaScript BasicsIntroduction to JavaScript4 min readVariables and Datatypes in JavaScript6 min readJavaScript Operators5 min readControl Statements in JavaScript4 min readArray & StringJavaScript Arrays7 min readJavaScript Array Methods7 min readJavaScript Strings5 min readJavaScript String Methods9 min readFunction & ObjectFunctions in JavaScript5 min readJavaScript Function Expression3 min readFunction Overloading in JavaScript4 min readObjects in JavaScript4 min readJavaScript Object Constructors4 min readOOPObject Oriented Programming in JavaScript3 min readClasses and Objects in JavaScript4 min readWhat Are Access Modifiers In JavaScript ?5 min readJavaScript Constructor Method7 min readAsynchronous JavaScriptAsynchronous JavaScript2 min readJavaScript Callbacks4 min readJavaScript Promise4 min readEvent Loop in JavaScript4 min readAsync and Await in JavaScript2 min readException HandlingJavascript Error and Exceptional Handling6 min readJavaScript Errors Throw and Try to Catch2 min readHow to create custom errors in JavaScript ?2 min readJavaScript TypeError - Invalid Array.prototype.sort argument1 min readDOMHTML DOM (Document Object Model)8 min readHow to select DOM Elements in JavaScript ?3 min readJavaScript Custom Events4 min readJavaScript addEventListener() with Examples9 min readAdvanced TopicsClosure in JavaScript4 min readJavaScript Hoisting6 min readScope of Variables in JavaScript3 min readJavaScript Higher Order Functions7 min readDebugging in JavaScript4 min read Like