Easy Tutorial
❮ Prop Style Quotes Jsref Charcodeat ❯

JavaScript exp() Method

JavaScript Math Object

Example

Returns E raised to the power of

Output result:


Definition and Usage

The exp() method returns the value of e raised to the power of x. E is the base of natural logarithms (approximately 2.7183).


Browser Support

All major browsers support the exp() method.


Syntax

Parameter Values

Parameter Description
x Required. A number

Return Value

Type Description
Number Returns e raised to the power of x. e represents the base of natural logarithms, with a value approximately equal to 2.71828.

Technical Details

| JavaScript Version: | 1.0 | | --- | --- |


More Examples

Example

In the following example, we will apply exp() to different numbers:

a, b, and c Output result:


JavaScript Math Object

❮ Prop Style Quotes Jsref Charcodeat ❯