14.2: The Code (HTML, CSS, and JavaScript) - Hamilton Lottery Simulator with p5.js

Subscribers:
1,740,000
Published on ● Video Link: https://www.youtube.com/watch?v=ZyiYux7Zqzc



Duration: 11:47
16,640 views
148


In this video, I cover the basics of simulating a lottery in JavaScript. How do you pick a random number to determine if you have won or not? How do you keep track of how many times you have played the lottery? How do you display the results on a webp

Source code: https://github.com/shiffman/hamilton-lottery-simulator
website: http://shiffman.github.io/hamilton-lottery-simulator/

Contact: https://twitter.com/shiffman

Next video: https://youtu.be/ZyiYux7Zqzc

Learn JavaScript basics:
https://www.youtube.com/playlist?list=PLRqwX-V7Uu6Zy51Q-x9tMWIv9cueOFTFA

Learn HTML / CSS basics:
https://www.youtube.com/playlist?list=PLRqwX-V7Uu6bI1SlcCRfLH79HZrFAtBvX

Working with Data / APIs:
https://www.youtube.com/playlist?list=PLRqwX-V7Uu6a-SQiI4RtIwuOrLJGnel0r

Help us caption & translate this video!

http://amara.org/v/QbtC/

📄 Code of Conduct: https://github.com/CodingTrain/Code-of-Conduct







Tags:
lottery simulator
probability and javascript
hamilton lottery
html
hamilton
hamilton musical
hamilton musical lottery
dynamic webpage
simulator
lottery
javascript html
probability
mathematics
tutorial
JavaScript
p5.js
p5.dom.js
p5 js
p5
p5 dom
select