Signup/Sign In
Ask Question
Not satisfied by the Answer? Still looking for a better solution?

Level 8 Lesson 5 Problem

What's wrong with my code? It's running on the code console but when I was trying to submit, it's giving me this error messege: ( Provide name parameter with default value for greet() funciton. )
Here is my code below:
function greet(name = "NULL"){
if(name !== "NULL")
{
console.log(`Hello...${name}`);
}
else {
console.log("What is your name?");
}
}
// call the function
greet('Shahed');
by

0 Answers

No Answer posted yet.

Login / Signup to Answer the Question.