18:381.4 Static Functions - The Nature of Code
From the creator
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 🖋️ Twit
Published 2020-03-20 · Watch on YouTube ↗
Availability and playback restrictions are controlled by the original channel.





