You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
{{ message }}
Repository navigation
Logical AND lecture: the 'hello' example says both operands are true, but 'hello' is not true #71820
scope: curriculumLessons, Challenges, Projects and other Curricular Content in curriculum directory.status: waiting triageThis issue needs help from moderators and users to reproduce and confirm its validity and fix.
and explains it with: "In the example above, the text hello is logged to the console because both operands are true."
The second operand is the string 'hello'. It is truthy, but it is not true. && returns the second value because both operands are truthy, and the page itself says that two sentences earlier: "If both operands are truthy, it returns the second value." The explanation contradicts the page's own correct sentence.
The fix is one word: "because both operands are truthy."
File: curriculum/challenges/english/blocks/lecture-working-with-conditional-logic/6732720e95f6a0db526a2e4d.md, line 24. The same file also sits under lecture-working-with-conditional-logic-and-math-methods.
The JavaScript Math review has a similar line: "This operator checks if both operands are true. If both are true, then it will return the second value." (curriculum/challenges/english/blocks/review-javascript-math/6723c463e51a2d9b747d7529.md, line 247), followed by the same true && 'hello' example.
scope: curriculumLessons, Challenges, Projects and other Curricular Content in curriculum directory.status: waiting triageThis issue needs help from moderators and users to reproduce and confirm its validity and fix.
Activity