Skip to content

Commit

Permalink
codeschool-projects#6 Make sure the hidden input answer's value is ex…
Browse files Browse the repository at this point in the history
…actly 4 characters long
  • Loading branch information
Javier Bertos committed Aug 21, 2017
1 parent e4fead1 commit 3272b10
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion src/assets/main.js
Original file line number Diff line number Diff line change
Expand Up @@ -8,5 +8,5 @@ function guess() {

//implement new functions here
function setHiddenFields() {
answer.value = Math.floor(Math.random() * 9999);
answer.value = ("0000" + Math.floor(Math.random() * 9999).toString()).slice(-4);
}

0 comments on commit 3272b10

Please sign in to comment.