javascript map function creates extra comma
This is my html file : function showMovies(){ const movies = [ {title: 'a nice movie', year: 2020, rating: 4.5}, {title: 'another nice movie', year: 2021, rating: 4.8}, {title: 'just another movie', year: 2022, rating: 4.2} ]; let html ="";…