Setting a character as the player

Im trying to make a game and I wanna know how to set a character I got as the player, in javascript language

I would like to know too …