-
Notifications
You must be signed in to change notification settings - Fork 36
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Initial commit #5
base: main
Are you sure you want to change the base?
Conversation
All tests passed
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
two comments for you. Major thing is an infinite loop which is preventing all tests from running locally and crashing the remote tests :).
Keep up the great work!
src/01-1-basics.js
Outdated
} | ||
|
||
function countByTwos() { | ||
// 2. Using a while loop, log even numbers from 2 to 20. | ||
let i = 2; | ||
while (i <= 2) { | ||
console.log(i) |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
you need to increment i here something like i+=2
right now you have an 'infinite loop' scenario which causes the remote testing to fail!
src/01-1-basics.js
Outdated
// Your code here | ||
if (length * width < 0) { | ||
return Nan; |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
use NaN
not Nan
fix infinite loop error and updated type in NaN.
Fixed infinite loop error and fixed NaN typo.
Had some wifi issues when committing the pull request so apologies if there is a duplicate. |
no problem - commits are free so do it all you want :) |
src/01-2-basics.js
Outdated
if (typeof word !== "string" || word === "null") { | ||
return ""; | ||
} | ||
return word.charAt(0).toUpperCase() + word.slice(1).toLocaleLowerCase(); |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
this return statement should be outside the second if statement - then I think you will pass all the tests 💯
toLowerCase had auto filled to toLocaleLowerCase. return bandName added. All tests passed 😀
All tests passed 🤙