Basic JavaScript - Comparisons with the Logical Or Operator?

Tell us what’s happening:

Describe your issue in detail here.

Your code so far

Hi! Where is mistake, please?

function testLogicalOr(val) {
  // Only change code below this line
if (val > 20 || val < 10) {
  return "Outside";
}
  // Only change code above this line
  return "Inside";


testLogicalOr(15);
  • Passed:You should use the || operator once

  • Passed:You should only have one if statement

  • Passed:testLogicalOr(0) should return the string Outside

  • Passed:testLogicalOr(9) should return the string Outside

  • Failed:testLogicalOr(10) should return the string Inside

  • Failed:testLogicalOr(15) should return the string Inside

  • Failed:testLogicalOr(19) should return the string Inside

  • Failed:testLogicalOr(20) should return the string Inside

  • Passed:testLogicalOr(21) should return the string Outside

  • Passed:testLogicalOr(25) should return the string Outside

Your browser information:

User Agent is: Mozilla/5.0 (Windows NT 10.0; Win64; x64) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/120.0.0.0 Safari/537.36

Challenge Information:

Basic JavaScript - Comparisons with the Logical Or Operator

You appear to have created this post without editing the template. Please edit your post to Tell us what’s happening in your own words.

  • its passing for me!!
  • maybe try disabling any “dark theme” kindda browser extension and try again

happy coding :slight_smile:

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