Exponentiation Operator
Multiple Choice Medium
Question
What does 2 ** 10 return in JavaScript?
Hint
** is exponentiation, not multiplication.
Explanation
2 10 returns 1024. The operator (introduced in ES2016) performs exponentiation, raising the left operand to the power of the right. It is equivalent to Math.pow(2, 10). Note that -2 2 is a syntax error; you need (-2) 2 to get 4.
Related Resources
Related Lessons
- Numbers and Math
Learn about numbers.
Look up unfamiliar terms
A beginner-friendly glossary explains jargon in plain English — variables, functions, DOM, Promise, and more.
Decode error messages
Plain-English explanations of common errors — what they mean, why they happen, and how to fix them.
Build real projects
Apply what you learned by building guided projects with starter code and solutions.