JavaScript Functions 101 - Part 4: WHERE to store functions in your script

preview_player
Показать описание
This short screencast continues the JavaScript Functions 101 series that covers the WHY, WHAT, and now WHERE of JavaScript functions. Inline, embedded, and external JavaScript will be compared, including the pros and cons of each. The "on" HTML attributes such as onclick that run inline JavaScript are explained.
Functions passed as arguments to the addEventListener() method will be discussed including the use of anonymous functions to protect code so that functions with parameters may be passed as arguments to methods. Finally, a short discussion of the fantastic Airbnb JavaScript style guide is provided.
Thank you for viewing! Happy Coding!
Рекомендации по теме