Greetings - more things to try

Reset the counter

Add a button to reset the greetings counter to 0.

Count different greetings

Change your greetings counter to count how many different people have been greeted. For example if Xola is greeted for the first time, the counter should increase. If he is greeted again the counter should not increase.

Use a global Object Literal variable, to keep track of all the names greeted.

Use code like this:

// add a global variable
var namesGreeted = {};

//when the greet button is pressed
//check if this user was already greeted before

if (namesGreeted[userName] === undefined){
    greetingsCounter++;
    //update the DOM to display the counter
}