Im a newbie, I can get past this step. Please help.
Hi there. Can someone pls help. I have checked this code over and over again and can not see any errors.
Task 6: Control Structures - Conditional Statements*/
// Define a variable named studentGrade that is of type number.
let studentGrade = 70;
function gradeCommentary() {
// 1. If studentGrade is above or equal to 90, log "Excellent work!".
if (studentGrade >= 90) {
console.log("Excellent work!");
}
// 2. If studentGrade is between 80 and 89 (inclusive), log "Good job!"
else if (studentGrade >= 80 && studentGrade <= 89) {
console.log("Good job!");
}
// 3. If studentGrade is between 70 and 79 (inclusive), log "You passed.".
else if (studentGrade >= 70 && studentGrade <= 79) {
console.log("You passed.");
}
// 4. If studentGrade is below 70, log "Needs improvement.".
else {
console.log("Needs improvement.");
}
}
5 Replies
???
Hey @BrandingLab - the code looks good from here - can you share the error you are getting? Maybe a screenshot?
Hey @BrandingLab I just copy/pasted all of your code in a new project for this lesson and all the tests for Task 6 passed.
![No description](https://cdn.answeroverflow.com/1237131584176394240/Xnapper-2024-05-06-12.58.29.png)
this suggests to me there's an issue with the installation or the test file that may have been made inadvertently. We can hop on a call if that would help!
yes please