- Object/Oriented JavaScript
- Stoyan Stefanov
- 155字
- 2021-08-13 19:25:53
Chapter 3. Functions
Mastering functions is an important skill when you learn any programming language and even more so when it comes to JavaScript. This is because JavaScript has many uses for functions, and much of the language's flexibility and expressiveness comes from them. Where most programming languages have a special syntax for some object-oriented features, JavaScript just uses functions. This chapter will cover:
- How to define and use a function
- Passing parameters to a function
- Pre-defined functions that are available to you "for free"
- The scope of variables in JavaScript
- The concept that functions are just data, albeit a special type of data
Understanding these topics will provide a solid base that will allow you to dive into the second part of the chapter, which shows some interesting applications of functions:
- Using anonymous functions
- Callbacks
- Self-invoking functions
- Inner functions (functions defined inside functions)
- Functions that return functions
- Functions that redefine themselves
- Closures
推薦閱讀
- Learning SQL Server 2008 Reporting Services
- CorelDRAW X6圖形設計立體化教程
- Procreate繪畫創作從入門到精通
- Photoshop CS6中文版基礎培訓教程
- 中文版Rhino 5.0完全自學教程(第3版)
- 輕松玩轉3D One AI
- Joomla! 1.5 Site Blueprints: LITE
- Instant Flask Web Development
- Photoshop CC入門與提高
- Flash CC動畫制作與應用(第3版)
- WordPress MU 2.8: Beginner's Guide
- Building Websites with Mambo
- 中文版Photoshop CS6經典自學教程(培訓教材版)
- Python Geospatial Development
- 速學Axure RP:產品原型設計從入門到進階