Driver code
let n = 642 ; document . write ( n + " " ) ; if ( isSandwitched ( n ) ) document . write ( " " + " " ) ; else document . write ( " " + " " ) ; n = 9 ; document . write ( n + " " ) ; if ( isSandwitched ( n ) ) document . write ( " " + " " ) ; else document . write ( " " + " " ) ;