Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- var arrGenres = genre.split(', ');
- console.log(arrGenres);
- for (var i = 0; i < arrGenres.length; i++) {
- if (arrGenres[i] === 'Comedy') {
- console.log('Es comedia');
- } else if (arrGenres[i] === 'Drama') {
- console.log('Es drama');
- } else if (arrGenres[i] === 'Action') {
- console.log('Es acción');
- }
- }
- if (title !== 'N/A') {
- $('.container-genre').append('<p>' + title + '</p>');
- $('#movie').append($('.container-genre'));
- }
Add Comment
Please, Sign In to add comment