Edit in JSFiddle

var name = prompt('What is your name?');
if(name=='Joe') //If the user’s name is ‘Joe’
{
    alert('Wow, cool – my name is Joe too!');
}
else if(name=='Fred') //If the user’s name is ‘Fred’
{
    alert('Fred is a pretty generic name...');
}
else if(name=='John') //If the user’s name is ‘John’
{
    alert('Alright, John?');
}
else if(name=='George') //If the user’s name is ‘George’
{
    alert('George is a pretty decent name.');
}
else
{
    alert('I have no opinion on your name.');
}