Skip to content

Logical AND lecture: the 'hello' example says both operands are true, but 'hello' is not true #71820

Backlog

Description

@omollohzack

Describe the Issue

The lecture "What Are Binary Logical Operators, and How Do They Work?" gives this example:

const result = true && 'hello';

console.log(result); // hello

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.

Affected Page

https://github.com/freeCodeCamp/freeCodeCamp/blob/main/curriculum/challenges/english/blocks/lecture-working-with-conditional-logic/6732720e95f6a0db526a2e4d.md

Your code

const result = true && 'hello';

console.log(result); // hello

Expected behavior

The fix is one word: "because both operands are truthy."

Screenshots

No response

System

N/A

Additional context

No response

Activity

  1. added
    scope: curriculum
    status: waiting triage
    on Nov 29, 2026
  2. added theissue type on Nov 29, 2026
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

No one assigned

    Labels

    scope: curriculumstatus: waiting triage

    Type

    Projects

    No projects

      Milestone

      No milestone

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions