Driver Code
let rectangle = [ ] ; let points = [ ] ; let triangle = [ ] ; rectangle . push ( [ 6 , 5 ] ) ; rectangle . push ( [ 2 , 2 ] ) ; rectangle . push ( [ 2 , 1 ] ) ; rectangle . push ( [ 5 , 5 ] ) ; points . push ( [ 1 , 1 ] ) ; points . push ( [ 6 , 1 ] ) ; points . push ( [ 6 , 6 ] ) ; points . push ( [ 1 , 6 ] ) ; triangle . push ( [ 4 , 4 ] ) ; triangle . push ( [ 0 , 4 ] ) ; triangle . push ( [ 0 , - 2 ] ) ; countPoints ( points , triangle , rectangle ) ;