You are viewing a single comment's thread. Return to all comments →
JavaScript
Just use Array.reduce() and keep multiplying
accumulator (a) by element (b) modulo 1234567
Note: Set initial value to 1, by giving it a second argument
routes.reduce((a, b) => a * b % 1234567, 1);
Seems like cookies are disabled on this browser, please enable them to open this website
Connecting Towns
You are viewing a single comment's thread. Return to all comments →
JavaScript
Just use Array.reduce() and keep multiplying
accumulator (a) by element (b) modulo 1234567
Note: Set initial value to 1, by giving it a second argument