Advertisement
Neri0817

05.Gramophone

Jan 15th, 2022
55
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
  1. function gramophone(band, album, song) {
  2.   let sum = (band.length * album.length * song.length) / 2;
  3.   let timesPlayed = 0;
  4.  
  5.   for (let i = 1; i <= sum; i += 2.5) {
  6.     timesPlayed++;
  7.   }
  8.   console.log(`The plate was rotated ${timesPlayed} times.`);
  9. }
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement