Memory game using javascript