Skip to content

Commit

Permalink
All iterations done and bonus tried!
Browse files Browse the repository at this point in the history
  • Loading branch information
RickyJary committed Oct 4, 2024
1 parent a2763fd commit 50f5b91
Showing 1 changed file with 10 additions and 1 deletion.
11 changes: 10 additions & 1 deletion src/movies.js
Original file line number Diff line number Diff line change
Expand Up @@ -72,7 +72,16 @@ console.log(orderAlphabetically(movies))
// BONUS - Iteration 7: Time Format - Turn duration of the movies from hours to minutes
function turnHoursToMinutes(moviesArray) {
const timeToMinutes = moviesArray.map((movie) => {
movie.duration
const duration = movie.duration;
let hours = 0;
let mins = 0;
if(duration.includes("h")){
// hours =
}
if (duration.includes("min")){
// mins =
}
let totalMins = hours *60 + mins;
})
}

Expand Down

0 comments on commit 50f5b91

Please sign in to comment.