Skip to content

Commit 4fe57e2

Browse files
committed
updates player object
1 parent 9304349 commit 4fe57e2

1 file changed

Lines changed: 3 additions & 3 deletions

File tree

class_3.js

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -1,8 +1,8 @@
11

22
var hands = ["rock", "paper", "scissors"];
33
function getHand() {
4-
var myIndex = parseInt(Math.random()*10)%3;
5-
return hands[myIndex];
4+
5+
return hands[parseInt(Math.random()*10)%3];
66
}
77

88
var playerOne = {
@@ -11,7 +11,7 @@ var playerOne = {
1111
};
1212

1313
var playerTwo = {
14-
name: "minaj"
14+
name: "minaj",
1515
getHand: getHand
1616
};
1717

0 commit comments

Comments
 (0)