Skip to content

Modify instruction of challenge Comparison with the Less Than Or Equal To Operator #11663

@1810msr

Description

@1810msr

Challenge Comparison with the Less Than Or Equal To Operator has an issue.
User Agent is: Mozilla/5.0 (Windows NT 6.1) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/44.0.2403.125 Safari/537.36.
Please describe how to reproduce this issue, and include links to screenshots if possible.

My code:

function testLessOrEqual(val) {
  if (val <= 12) {  // Change this line
    return "Smaller Than or Equal to 12";
  }
  
  if (val <= 24) {  // Change this line
    return "Smaller Than or Equal to 24";
  }

  return "25 or More";
}

// Change this value to test
testLessOrEqual(24.99);

image

Issue:
when I input testLessOrEqual(24.99); the answer or the code returns "25 or more " as the outcome which is not correct - this code might need some improvement

Metadata

Metadata

Assignees

No one assigned

    Labels

    first timers onlyOpen for anyone doing contributions for first time. You do not need permission to work on these.help wantedOpen for all. You do not need permission to work on these.

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions