Find the Next perfect square greater than a given number | Function to find the next perfect square ; Driver Code
function nextPerfectSquare ( N ) { let nextN = Math . floor ( Math . sqrt ( N ) ) + 1 ; return nextN * nextN ; } let n = 35 ; document . write ( nextPerfectSquare ( n ) ) ;