Please help me. anyone

Tell us what’s happening:
Describe your issue in detail here.

  **Your code so far**

\


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

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

return "More Than 24";
}

testLessOrEqual(10);
```\\



**sorry no browser info**

The number there seems to be a little too much

still not working

\ Passed

testLessOrEqual(0) should return the string Smaller Than or Equal to 12

Passed

testLessOrEqual(11) should return the string Smaller Than or Equal to 12

Passed

testLessOrEqual(12) should return the string Smaller Than or Equal to 12

testLessOrEqual(23) should return the string Smaller Than or Equal to 24

testLessOrEqual(24) should return the string Smaller Than or Equal to 24

testLessOrEqual(25) should return the string More Than 24

Passed

testLessOrEqual(55) should return the string More Than 24

Passed

You should use the <= operator at least twice

1

2

3

4

5

6

7

8

9

10

11

12

13

function testLessOrEqual(val) {

if (val <= 24) { // Change this line

return “Smaller Than or Equal to 12”;

}

if (val <= 25) { // Change this line

return “Smaller Than or Equal to 24”;

}

return “More Than 24”;

}

testLessOrEqual(10);

// running tests

testLessOrEqual(23)

should return the string

Smaller Than or Equal to 24
testLessOrEqual(24)

should return the string

Smaller Than or Equal to 24
testLessOrEqual(25)

should return the string

More Than 24

// tests completed \

are you sure the condition and the message are matching?
becase if val equal 13, then val <= 24 is true, but the message is Smaller Than or Equal to 12, which is not the right message for the number

This topic was automatically closed 182 days after the last reply. New replies are no longer allowed.