question-mark
Stuck on an issue?

Lightrun Answers was designed to reduce the constant googling that comes with debugging 3rd party libraries. It collects links to all the places you might be looking at while hunting down a tough bug.

And, if you’re still stuck at the end, we’re happy to hop on a call to see how we can help out.

Possible solution issue Project 180 freecodecamp

See original GitHub issue

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

Issue Analytics

  • State:closed
  • Created 5 years ago
  • Comments:10 (5 by maintainers)

github_iconTop GitHub Comments

1reaction
rsangdoungcommented, Jun 3, 2018

@QuincyLarson I have forked the repo and created a new branch called “fix/#17155”. It looks like I’m ready to fix it.

1reaction
QuincyLarsoncommented, Jun 3, 2018

@Daniel-Michael I agree that we need a curly brace after the else statement.

@rsangdoung Were you able to figure out how to get freeCodeCamp running locally so you can go in and fix it?

Read more comments on GitHub >

github_iconTop Results From Across the Web

Restrict Possible Usernames solution requires knowledge not ...
Edit: This has been reported on Github already and the issue closed beacuse they are working on new project based curriculum.
Read more >
2020 Update: #ProjectEuler100 and The #AWSCertified ...
In this article, I'll explain these challenges briefly and also showcase some of their participants' achievements so far. An Update On The # ......
Read more >
Here are some app ideas you can build to level up your ...
Together with my friend Jim we created a collection of application ideas which is intended to solve this issue once and for all!...
Read more >
Basic Node and Express Challenges: temporary solutions to ...
Open your package.json and remove the package. Wait for Glitch to finish removing it then add it back and wait for the install...
Read more >
How to Have Fun Building React Apps - freeCodeCamp
All of this and much more is available through the next npm library. ... you can still find lots of solutions at the...
Read more >

github_iconTop Related Medium Post

No results found

github_iconTop Related StackOverflow Question

No results found

github_iconTroubleshoot Live Code

Lightrun enables developers to add logs, metrics and snapshots to live code - no restarts or redeploys required.
Start Free

github_iconTop Related Reddit Thread

No results found

github_iconTop Related Hackernoon Post

No results found

github_iconTop Related Tweet

No results found

github_iconTop Related Dev.to Post

No results found

github_iconTop Related Hashnode Post

No results found