Skip to content

Commit

Permalink
codeschool-projects#6. Adding zeros to answer.value
Browse files Browse the repository at this point in the history
  • Loading branch information
AleTorres committed May 2, 2017
1 parent 2b4af4a commit 13640c3
Showing 1 changed file with 6 additions and 1 deletion.
7 changes: 6 additions & 1 deletion src/assets/main.js
Original file line number Diff line number Diff line change
Expand Up @@ -8,5 +8,10 @@ function guess() {

//implement new functions here
function setHiddenFields(){
answer.value = Math.floor((Math.random() * 10000));
answer.value = Math.floor((Math.random() * 10000)).toString();

while (answer.length<4) {
answer.value = "0" + answer.value;

}
}

0 comments on commit 13640c3

Please sign in to comment.