Skip to content
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

Open
wants to merge 5 commits into
base: main
Choose a base branch
from
Open

Initial commit #5

wants to merge 5 commits into from

Conversation

a-rhys
Copy link

@a-rhys a-rhys commented Nov 6, 2023

All tests passed 🤙

All tests passed
Copy link
Collaborator

@learyjk learyjk left a 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!

}

function countByTwos() {
// 2. Using a while loop, log even numbers from 2 to 20.
let i = 2;
while (i <= 2) {
console.log(i)
Copy link
Collaborator

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!

// Your code here
if (length * width < 0) {
return Nan;
Copy link
Collaborator

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.
@a-rhys
Copy link
Author

a-rhys commented Nov 8, 2023

Had some wifi issues when committing the pull request so apologies if there is a duplicate.

@learyjk
Copy link
Collaborator

learyjk commented Nov 9, 2023

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 :)

if (typeof word !== "string" || word === "null") {
return "";
}
return word.charAt(0).toUpperCase() + word.slice(1).toLocaleLowerCase();
Copy link
Collaborator

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 😀
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants