Question from the Javascript - Fundamentals test

Write a Javascript code that displays 'Adversity is not to be feared' and 'There is potentially a real danger'

Easy

What does the following code display?

let connectedPlayer = true; 
let strongPlayer = false;
if (connectedPlayer && strongPlayer) { 
    console.log("Adversity is harsh\n"); 
} else if (connectedPlayer &&  !strongPlayer) {
     console.log("Adversity is not to be feared\n"); 
} if (connectedPlayer || strongPlayer) { 
    console.log("There is potentially a real danger\n"); 
} 
Author: AdrienStatus: Published(Update)Question passed 3021 times
Edit
5
Community EvaluationsNo one has reviewed this question yet, be the first!