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.

I think this challenge have a bug.

See original GitHub issue

Challenge Return Early Pattern for Functions has an issue. User Agent is: Mozilla/5.0 (Windows NT 10.0; WOW64) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/47.0.2526.80 Safari/537.36 Core/1.47.933.400 QQBrowser/9.4.8699.400. Please describe how to reproduce this issue, and include links to screenshots if possible.

My code:


// Setup
function abTest(a, b) {
  // Only change code below this line
  if(a<0||b<0)
    {
      return typeof(c);
    }


  // Only change code above this line

  return Math.round(Math.pow(Math.sqrt(a) + Math.sqrt(b), 2));
}

// Change values below to test your code
abTest(2,-2);

The Console return “undefined”, but this challenge submit fail.

Issue Analytics

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

github_iconTop GitHub Comments

2reactions
ooadecommented, Sep 8, 2016

@JamsonKwok It returns “undefined” not undefined. Your if statement should just return undefined not the typeof of some undefined variable which will result in a stringified undefined 😄

Don’t forget a typeof(typeof(undefined)) is a string.

There’s nothing wrong with the challenge, you can close it.

1reaction
dhcodescommented, Sep 8, 2016

@marhyorh good catch! @JamsonKwok as @marhyorh has said, the test requires that the return be the key word undefined.

Read more comments on GitHub >

github_iconTop Results From Across the Web

Alphabet Hunt - Bugs Challenge / JustJordan33 - YouTube
Today my family, cousins, and I did the Alphabet Hunt, but with a twist! We get crazy with bugs from Newport Jerky Company!...
Read more >
Has the Quick Thinking challenge bug been reported and is ...
I'm doing old tome challenges and on Tome 4 - Level 1 there is a challenge called Quick Thinking and this is where...
Read more >
Looks like we've once again got the bug where your Seasonal ...
Looks like we've once again got the bug where your Seasonal Challenges are flashing and you can't stop it. https://i.imgur.com/I5hBq1I.png.
Read more >
Challenges not Counting Progress AT ALL now - Bug Report
First these challenges kept resetting and now they are not counting any progress AT ALL!.. “The Best Defense”, “Hold The Line” and “The...
Read more >
bug of apple watch series SE
Hi,. I got an apple watch series SE at 27th December. The watch doesn't show the monthly challenges. I thought it will be...
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