Skip to content

Possible solution issue Project 180 freecodecamp #17155

@Daniel-Michael

Description

@Daniel-Michael

Challenge Name

Introducing else if statements

link to challenge

https://www.freecodecamp.org/challenges/introducing-else-if-statements

Issue Description

I believe there is a missing parentheses after the second else statement which should not pass the test, however it currently does.

If you see the screenshots attached, without the closing parenthese the code passes, but add it in as per the example code and it won't pass the test.

Browser Information

  • Browser Name, Version: Chrome 4.3
  • Operating System: Android
  • Mobile, Desktop, or Tablet: Tablet

Your Code

function testElseIf(val) {
  if (val > 10) {
    return "Greater than 10";
  } else if (val < 5) {
    return "Smaller than 5";
  } else 
  
  return "Between 5 and 10";
}

// Change this value to test
testElseIf(7);

Screenshot

screenshot_20180513-101907

screenshot_20180513-101927

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions