function msg(name)
{
alert("Welcome " + your_name_here);
}
// Calling the function
msg("your_name_here");
function msg(name)
{
window.defaultStatus("Welcome " + your_name_here);
}
// Calling the function
msg("your_name_here");
You might ask why we use defaultStatus instead of simply window.status. The reason is that window.status is associated only with event handlers and cannot recognize a variable even if its outside the quotes.