text: Check if given four integers ( or sides ) make rectangle | Function to check if the given integers value make a rectangle ; Square is also a rectangle ; Driver code
code: function isRectangle ( a , b , c , d ) { if ( a == b && a == c && a == d && c == d && b == c && b == d ) return true ; else if ( a == b && c == d ) return true ; else if ( a == d && c == b ) return true ; else if ( a == c && d == b ) return true ; else return false ; } let a = 1 , b = 2 , c = 3 , d = 4 ; if ( isRectangle ( a , b , c , d ) ) document . write ( " " ) ; else document . write ( " " ) ;