Driver Code
let arr = [ 1 , 3 , 5 , 7 , 9 ] ; n = arr . length ; k = 2 ; leftRotate ( arr , n , k ) ; document . write ( " " ) ; k = 3 ; leftRotate ( arr , n , k ) ; document . write ( " " ) ; k = 4 ; leftRotate ( arr , n , k ) ; document . write ( " " ) ;