Pythagorean Quadruple | function for checking ; Driver code
function pythagorean_quadruple ( a , b , c , d ) { let sum = a * a + b * b + c * c ; if ( d * d == sum ) return true ; else return false ; } let a = 1 , b = 2 , c = 2 , d = 3 ; if ( pythagorean_quadruple ( a , b , c , d ) ) document . write ( " " ) ; else document . write ( " " ) ;