var play= play();
You have assigned the return value of play
to a variable called play, but the play
function returns nothing (undefined).
Another problem is that you now have two objects in the same scope called play
, so when play()
returns a value, the variable play
no longer references the play
function, so it can't be called again.