12. Quiz M

(back13) Take each multiple of 13 that appears in the array and change all of the numbers before it to be that multiple of 13, until you come to another multiple of 13.

Examples:

  1. back13([11,12,13,14]) => [13,13,13,14]
  2. back13([40,39,50,52,60]) => [39,39,52,52,60]
  3. back13([21,23,25,26,90,65,17]) => [26,26,26,26,65,65,17]
Last modified August 18, 2023: 2022-2023 End State (7352e87)