azat-co / react-quickly

Source code for React Quickly [Manning, 2017]: Painless Web Apps with React, JSX, Redux, and GraphQL 📕
http://reactquickly.co
MIT License
544 stars 422 forks source link

ch16/password/js/generate-password.js, needed to use semi-colon after randomIndex #22

Open cavapoo2 opened 6 years ago

cavapoo2 commented 6 years ago

let randomIndex = Math.floor(Math.random() * value);

otherwise i get ReferenceError: can't access lexical declaration`X' before initialization

cmchenry commented 6 years ago

This fixed it, thanks!