Driver program to test above function
let p1 = { x : 20 , y : 10 } let p2 = { x : 10 , y : 20 } let p3 = { x : 20 , y : 20 } let p4 = { x : 10 , y : 10 } isSquare ( p1 , p2 , p3 , p4 ) ? document . write ( " " ) : document . write ( " " ) ;