[Where do I belong] Right results but not pass the test
See original GitHub issueChallenge Where do I belong has an issue.
User Agent is: Mozilla/5.0 (Macintosh; Intel Mac OS X 10_12_3) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/56.0.2924.87 Safari/537.36
.
Please describe how to reproduce this issue, and include links to screenshots if possible.
My code:
function getIndexToIns(arr, num) {
arr = arr;
for (var i in arr.sort(function(a,b){return a-b;})){
if (arr[i] >= num) {return i;}
}
return arr.length;
}
getIndexToIns([3, 10, 5], 3);
I got in the return all the right value from the test, it just don’t get it right.
Issue Analytics
- State:
- Created 7 years ago
- Comments:11 (9 by maintainers)
Top Results From Across the Web
Political Typology Quiz | Pew Research Center
Take our quiz to find out which one of our nine political typology groups is your best match.
Read more >IQ Test: Which Shape Doesn't Belong to the Group? And Why?
Whether you are getting ready for job Interview and Assessment Test or just trying to solve IQ puzzles you will enjoy this question....
Read more >How to Pass Pre-Employment Cognitive Abilities ... - YouTube
Learn how to get ready for job Interview and pass Cognitive Ability Assessment test for job application. In this tutorial you will learn ......
Read more >Multiple Choice & Matching Test - UW-Whitewater
Go through the test once and answer all the questions you can. ... instruct students to select the "best answer" rather than the...
Read more >Test - The Political Compass
That's how we can show you whether you lean towards extremism or moderation on the Compass. Your responses should not be overthought. Some...
Read more >Top Related Medium Post
No results found
Top Related StackOverflow Question
No results found
Troubleshoot Live Code
Lightrun enables developers to add logs, metrics and snapshots to live code - no restarts or redeploys required.
Start FreeTop Related Reddit Thread
No results found
Top Related Hackernoon Post
No results found
Top Related Tweet
No results found
Top Related Dev.to Post
No results found
Top Related Hashnode Post
No results found
Top GitHub Comments
These tests evaluate to
string
and the===
check fails to capture this even though result from the function is resolved as anumber
@BhaveshSGupta go ahead, I havent started work on it.