my first JavaScript homework, about a pos