text: Write a program to calculate pow ( x , n ) | Javascript program for the above approach ; Math . pow ( ) is a function that return floating number ; Driver Code
code: function power ( x , y ) { return parseInt ( Math . pow ( x , y ) ) ; } let x = 2 ; let y = 3 ; document . write ( power ( x , y ) ) ;