Live Stream #80: Prototypes in Javascript and Butterfly Wings Generator

In this episode, I attempt to explain the concept of “Prototype” in the JavaScript programming language. I also create a Butterfly Generator inspired by Katie Rose Pipkin’s moth generator (

*I misspoke during the introduction of the butterfly generator: Katie Rose Pipkin is referred to with the pronouns they/them/their. This portion has been re-recorded for the edited tutorial.

3:14 – Presenting today’s topic
22:32 – Prototypes in JavaScript
57:11 – Butterfly Wings Generator

Support this channel on Patreon:

Send me your questions and coding challenges!:

The Coding Train website:

Links discussed in this video:
Douglas Crockford’s video on prototypes(and many more subjects):
Prototypes on MDN:
Katie Rose Pipkin’s moth generator:
Katie’s website:
Rose (mathematics):
My video on Polar Coordinates:
My playlist on Perlin Noise:
This Dot Song:

Source Code for the all Video Lessons:


For an Introduction to Programming:
For my Nature of Code videos:
For More Live Streams:
For More Coding Challenges:

Help us caption & translate this video!






27 responses to “Live Stream #80: Prototypes in Javascript and Butterfly Wings Generator”

  1. kartikey srivastava Avatar

    This guy is one of the best teachers out here. Thank you for sharing your knowledge πŸ™‚

  2. Joe Nap Avatar

    I'm surprised that no one has mentioned Class from ecma6. 27:19 Dan's from Java so this should be more natural to him as well as easier to use and read and Class automatically sticks class functions into it's prototype.

  3. Tazza DK Avatar

    If I use p5 will I also be learning JavaScript at the same time?

  4. UnitSe7en Avatar

    "Smell the butterflies." – Daniel Shiffman

    Choo Choo!

  5. Semyon Kamoza Avatar

    Daniel, you're getting it wrong :O
    The excitement you have is much appreciated!
    The guest tutorials that sometimes can be seen on the channel show it dramatically where they lack the excitement. So keep that going!!

  6. Max Scribner Avatar

    3:35 We'd never leave you, Dan!

  7. Zeratul Rahl Avatar

    Please do something with quaternions πŸ˜€

  8. Bryn Laidlaw Avatar

    I am imagining Dan's wife checking the livestream whenever he stays late.

  9. Phirdeline Avatar

    do these streams go live on youtube?
    I mean not on twitch or anything else

  10. Art Work c Avatar

    77513, 3820, 86864, 29901, 68414, 82774, aren't those the same random digits as in the #79 ? πŸ˜€

  11. Breathless Vision Avatar

    i love this!!!! i was looking at prototypes and was looking for a video on them and this is perfect!!! thank you dan

  12. Kamakaze0001 Avatar

    Hey Dan, would it be likely that you'd do anything Ruby focused/ related in the future?

  13. Luca Avatar

    15:00 somebody else in germany is watching this at 3:26 am xD

  14. Gabriel Cyrillo Avatar

    This is funny. I did the Butterfly Code before this tutorial πŸ˜›

    My moths don't flap their wings, but they've a really cool style. I did it without p5.js (thus without that beautiful perlin function). I also used polar coordinates in my code πŸ˜€

    Hope you like it, Dan:

  15. Stephen Vainglory Avatar

    Yes! please make tutorial videos, I am a 14 years old and im very interested in coding, you make it look really fun, thank you!

  16. Kunal Sharma Avatar

    can you make some example on this website.

  17. Walter Serio Avatar

    so prototypes are like static stuff, but with access to the data of object instances

  18. Kenneth Greer Avatar

    After your silly yet endearing warm up, you explained prototypes is a way that clicked in my head. Seriously the few minutes before the 30 minute mark broke it all open in my mind. Your channel is awesome. You could have a show on PBS.

  19. CHERAIT Ramzi Avatar

    l love watching your videos Dan!
    thanks man for your enthousiasme and the way you make coding useful and enjoyable

  20. Kristian Welsh Avatar

    My rss feed lets me see these unlisted videos.

  21. 2stefan2000 Avatar

    What about the Earthquake 3D project from yesterday?

  22. Dave Babcock Avatar

    are u going to use a commodore 64??

  23. zacontraption Avatar

    I'm not sure how I'm viewing this unlisted video, but it's great!

Leave a Reply

Your email address will not be published. Required fields are marked *