📅  最后修改于: 2022-03-11 14:48:17.646000             🧑  作者: Mango
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