Javascript


#1

`
let favoritePhrase = ‘Love That!’;
favoritePhrase = (‘Love that!’) ? console.log(‘I love that!’) : console.log(“I don’t love that!”);

if (favoritePhrase === ‘Love That!’) {
console.log(‘I love that!’);
} else {
console.log(“I don’t love that!”);
}
`

trying to figure out how to change the format of the if else statement


#2

This topic was automatically closed 7 days after the last reply. New replies are no longer allowed.