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

What's wrong with Level 8 lession 5

function greet(name = ' ')
{
if(name != ' ')
{
console.log("Hello "+name+"! Thanks for joining us.");
}
else {
console.log("What is your name?");
}
}
// call the function
greet();
by

1 Answer

kshitijrana14
try this one

function greet(name="NULL")
{
if(name!="NULL")
{
console.log("Hello "+name+"! Thanks for joining us.");
}
else {
console.log("What is your name?");
}
}
greet("studytonight");// call the function

Login / Signup to Answer the Question.