Formatting Text from APIs in JavaScript

const replaceTags = ['<p>', '</p>', '<b>', '</b>', '<i>', '</i>', '<br />', '<br />']
currentShow = await getShows()let description = currentShow.summaryreplaceTags.forEach(element => description = description.replace(element, ''))
showGenres.textContent = 'Genre(s): '
for(let i=0; i<genres.length; i++){}
if(genres.length>=1 && genres[i] !== genres[genres.length-1]){      showGenres.textContent += genres[i] += ', '}else if(genres[i] == genres[genres.length-1]){       showGenres.textContent +=  genres[i]}
if(genres.length===0){showGenres.textContent = 'Genres: N/A'}
showGenres.textContent = showGenres.textContent.toUpperCase()

--

--

Get the Medium app

A button that says 'Download on the App Store', and if clicked it will lead you to the iOS App store
A button that says 'Get it on, Google Play', and if clicked it will lead you to the Google Play store