The ** operator is used for exponentiation in modern JavaScript (introduced in ES2016/ES7). For example, 2 ** 3 evaluates to 8 (2 raised to the power of 3). Before ES2016, exponentiation had to be performed using the Math.pow() function: Math.pow(2, 3). The caret (^) operator is commonly used for exponentiation in many other programming languages but in JavaScript, it performs the bitwise XOR operation, not exponentiation.