Program to find the surface area of the square pyramid | function to find the surface area ; Driver program ; surface area of the square pyramid
function surfaceArea ( b , s ) { return 2 * b * s + parseInt ( Math . pow ( b , 2 ) ) ; } var b = 3 , s = 4 ; document . write ( surfaceArea ( b , s ) ) ;