Archived
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");
}
-1
Community Evaluations
Auteur anonyme
29/03/2022
Hello Adrien, could you be more specific ? Your alternative question seems identical.
Adrien
29/03/2022
Hi, in english version ansewers 3 and 4 are "Adversity is not to be feared There is potentially a real danger" where in frensh answer 3 is "Il y a potentiellement un vrai danger" and 4 is "LâadversitĂ© nâest pas Ă craindre Il y a potentiellement un vrai danger". As mentionned in my submition, and from my deductions, the 3rd answer should be "There is potentially a real danger". I also removed the loop keyword from the explaination since an if has nothign to do with loops
Similar QuestionsMore questions about Javascript
65
Understanding the differences between `map()` and `forEach()` methods in JavaScript28
Write a JavaScript function that fetches data from an API and logs it to the console.19
Fix the following Javascript loop:10
The certificate variable is not attainable outside the if loop9
Use spread operator to split an array into two arrays in Javascript