Skip to content

done#16

Open
jello2025 wants to merge 1 commit intoJoinCODED:mainfrom
jello2025:main
Open

done#16
jello2025 wants to merge 1 commit intoJoinCODED:mainfrom
jello2025:main

Conversation

@jello2025
Copy link

No description provided.

@shereengh
Copy link

function updateMovieGenre(
movies: Movie[],
title: string,
newGenre: string
): Movie[] {
movies.forEach((movie) => {
if (movie.title == title) {
movies.find((movie) => { //why you use find here you're already on the right movie reference, no need to find
movie.title === title;
});
movie.genre = newGenre;
return movies;
} else {
return movies;
}
});
return movies;
}

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants