Answers for "number square n times in typescript"

0

number square n times in typescript

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

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

// For example
console.log(square(4,2))

//output.:

16
Posted by: Guest on December-04-2020

Code answers related to "TypeScript"

Browse Popular Code Answers by Language