Driver Code
let n = 13 ; let m = 4 ; document . write ( closestNumber ( n , m ) + " " ) ; n = - 15 ; m = 6 ; document . write ( closestNumber ( n , m ) + " " ) ; n = 0 ; m = 8 ; document . write ( closestNumber ( n , m ) + " " ) ; n = 18 ; m = - 7 ; document . write ( closestNumber ( n , m ) + " " ) ;