Debugging Code


#1

https://www.codecademy.com/en/courses/javascript-beginner-en-ZA2rb/0/5?curriculum_id=506324b3a7dffd00020bf661

The computer states that I have an "unexpected token {"


var user = prompt('what is your favourite type of book to read?').toUpperCase();

switch(user) {
    case 'BUSINESS':
    
    console.log('oh really? so youre the next mark zuckerburg eh?');
    var money = prompt('have you read about capitalism and socialism before? Which one?').toUpperCase();
    if(money == "CAPITALISM"){
        console.log('your a smart individual; may the market be kind to you');
        }
        else if(money == "CAPITALISM" && money == "SOCIALISM"){
            console.log('thats really good.. hopefully you understand that socialism and business do not go hand in hand!');
            }
        else(money == "SOCIALIST") {
            console.log('you should probably re-evaluate your economic philosophy, if you want to succeed in the business world!');
            }
    break;
    
    case 'SCI-FI':
    
    var author = prompt('have you ever heard of robert heinlein?').toUpperCase();
    console.log('science-fiction eh? Elon Musks favourite genre was also science fiction...great things lay ahead for you!');
    if(author == 'YES'){
        console.log('thats wonderful. he is a very interesting man, and, his books are great!');
        }
        else (author == "NO"){
            console.log('well, I guess we now know what author you will be reading next chance you get!');
            }
    break;
    
    case 'SELF-HELP':
    
    console.log('that is a very important genre of book. a lot of great knowledge and insight about the world can be found in self-help books!');
    var selfHelp = prompt('Tony Robbins and Napolean Hill, are two of the most accomplished self-help mentors in the world. Have you heard of either them before?').toUpperCase();
    if(selfHelp == "YES" || selfHelp == "NO"){
        console.log('everything, is everything!');
        }
    break;
    
    default:
    console.log('thats really cool! reading is a very enlightening experience.');
    break;
}


#2

HI you should remove the condition to all your else statement