Comment on page
🖋
Logical Operators Practice
/*
< Logical operators basic 1 >
💬 를 적절한 값으로 고쳐주세요!
*/
const seven = 7;
const trueOrFalse = !!"";
const result = (seven && trueOrFalse);
if (result === 💬) {
alert("🎉");
}
/*
< Logical operators basic 2 >
💬 를 적절한 값으로 고쳐주세요!
*/
const empty = null;
const trueOrFalse = !0;
const str = "Vanillacoding";
const result = (empty || trueOrFalse || str);
if (result === 💬) {
alert("🎉");
}
/*
< Logical operators basic 3 >
💬 를 적절한 값으로 고쳐주세요!
*/
const trueOrFalse = !null;
const zero = 0;
const str = "Vanillacoding";
const result = (trueOrFalse && zero && str);
if (result === 💬) {
alert("🎉");
}
/*
Ken은 토론회에 참석하였습니다.
두 가지 의견의 토론 결과는 logical operator에 따라 결정됩니다.
토론의 최종 결과가 truthy 값이 되도록 💬 를 적절한 값으로 고쳐주세요!
*/
const Ryan = false;
const Blake = true;
const Scott = false;
const Ken = true;
const result = (Ryan || Blake) 💬 (Scott && Ken);
if (result) {
alert("🎉");
}
Last modified 1yr ago