CODE
function get_name(name)
{
// test to make sure it is a string that isn't empty
// test to make sure that it is at least 3 characters long
// test to make sure that it is either Paul, John or Bob and no one else
alert("Hi " + name);
}
{
// test to make sure it is a string that isn't empty
// test to make sure that it is at least 3 characters long
// test to make sure that it is either Paul, John or Bob and no one else
alert("Hi " + name);
}
How can I tell it what name is? and it would be mice if someone could tell me how to tell it the name too. Something like:
CODE
var name = prompt("What is your name?","");
This is javascript btw. Not php. I keep getting confused too...
I have watched all the lynda.com javascript tutorials and all the w3schools.com javascript tutorials and for some reason I cant solve this. Thanks.
