1Shubham7 / Wife-Predictor-v2

This is a fun project that predicts your wife. The web app has been deployed on Netlify.
https://wife-predictor.netlify.app/
MIT License
31 stars 43 forks source link

Change generatorRandomNumber() #21

Closed theQuery closed 1 year ago

theQuery commented 1 year ago

Change generatorRandomNumber() in Confirm.js to be based on the length of the wives array instead of a hardcoded number. That way it won't have to be changed with each image added to the wives array.

 function generatorRandomNumber() {
-    return Math.floor(Math.random() * 40);
+    return Math.floor(Math.random() * wives.length);
 }
1Shubham7 commented 1 year ago

LGTM, go ahead!