number square n times in typescript

The solution for “number square n times in typescript” can be found here. The following code will assist you in solving the problem.

Math.pow(x1, 2)
x1 * x1
x1 ** 2 // ES6 syntax

function square(firstNumber: number, secondNumber: number):number{
return firstNumber ** secondNumber

// For example



Thank you for using DeclareCode; We hope you were able to resolve the issue.

More questions on [categories-list]

inline scripts encapsulated in