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

LEVEL 8 > LESSON 5 JS

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

2 Answers

iamabhishek
Your code looks ok to me, can you share what error you get?
Here is what worked for me:

function greet(name="NULL")
{
if(name!="NULL")
{
console.log("Hello "+name+"! Thanks for joining us.");
}
else {
console.log("What is your name?");
}
}
// call the function
greet("Abhishek");
USMANflka8
can you help with how you solve for level8 /lesson1

Login / Signup to Answer the Question.