1.4 Static Functions - The Nature of Code

1.4 Static Functions - The Nature of Code

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



Duration: 9:36
47,234 views
1,231


In this video, I discuss the difference between static and instance functions in JavaScript and how they are used in the p5.Vector class. Code: https://thecodingtrain.com/tracks/the-nature-of-code-2/noc/1-vectors/4-static-functions

πŸš€ Watch this video ad-free on Nebula https://nebula.tv/videos/the-coding-train-yt-1-4-static-functions-the-nature-of-code

πŸŽ₯ Previous video: https://youtu.be/jupjuq9Jl-M?list=PLRqwX-V7Uu6ZV4yEcW3uDwOgGXKUUsPOM
πŸŽ₯ Next video: https://youtu.be/ttz05d8DSOs?list=PLRqwX-V7Uu6ZV4yEcW3uDwOgGXKUUsPOM
πŸŽ₯ All videos: https://www.youtube.com/playlist?list=PLRqwX-V7Uu6ZV4yEcW3uDwOgGXKUUsPOM

References:
πŸ”— Math.random(): https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/Math/random
πŸ”— p5.Vector add Reference: https://p5js.org/reference/#/p5.Vector/add

Timestamps:
0:00 Introduction
1:14 Instance functions
2:00 Static functions
3:20 Name-spaced functions
4:30 Instance/Static versions of the same function
7:09 Using the static version of a function to store the result of an operation

Editing by Mathieu Blanchette
Animations by Jason Heglund
Music from Epidemic Sound

πŸš‚ Website: http://thecodingtrain.com/
πŸ‘Ύ Share Your Creation! https://thecodingtrain.com/guides/passenger-showcase-guide
🚩 Suggest Topics: https://github.com/CodingTrain/Suggestion-Box
πŸ’‘ GitHub: https://github.com/CodingTrain
πŸ’¬ Discord: https://thecodingtrain.com/discord

πŸ’– Membership: http://youtube.com/thecodingtrain/join
πŸ›’ Store: https://standard.tv/codingtrain
πŸ–‹οΈ Twitter: https://twitter.com/thecodingtrain
πŸ“Έ Instagram: https://www.instagram.com/the.coding.train/
βœͺ Nebula: https://go.nebula.tv/codingtrain
πŸŽ₯ Coding Challenges: https://www.youtube.com/playlist?list=PLRqwX-V7Uu6ZiZxtDDRCi6uhfTH4FilpH
πŸŽ₯ Intro to Programming: https://www.youtube.com/playlist?list=PLRqwX-V7Uu6Zy51Q-x9tMWIv9cueOFTFA

πŸ”— p5.js: https://p5js.org
πŸ”— p5.js Web Editor: https://editor.p5js.org/
πŸ”— Processing: https://processing.org

πŸ“„ Code of Conduct: https://github.com/CodingTrain/Code-of-Conduct

This description was auto-generated. If you see a problem, please open an issue: https://github.com/CodingTrain/thecodingtrain.com/issues/new

#forbeginners #javascript #p5js