Add descriptions to JavaScript Built-In Objects, and Defining Calling Functions (#2111)
parent
c0af8a8f8a
commit
e2ec1b8363
2 changed files with 32 additions and 2 deletions
@ -1 +1,14 @@ |
|||||||
# Builtin objects |
# Built-in objects |
||||||
|
|
||||||
|
Built-in objects, or "global objects", are those built into the language specification itself. There are numerous built-in objects with the JavaScript language, all of which are accessible at the global scope. Some examples are: |
||||||
|
- `Number` |
||||||
|
- `Math` |
||||||
|
- `Date` |
||||||
|
- `String` |
||||||
|
- `Error` |
||||||
|
- `Function` |
||||||
|
- `Boolean` |
||||||
|
|
||||||
|
<ResourceGroupTitle>Free Content</ResourceGroupTitle> |
||||||
|
|
||||||
|
<BadgeLink colorScheme='yellow' badgeText='Read' href='https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects'>Built-in Objects</BadgeLink> |
@ -1 +1,18 @@ |
|||||||
# Defining calling functions |
# Defining and Calling Functions |
||||||
|
|
||||||
|
**Defining:** |
||||||
|
- JavaScript function *declarations* are made by using the `function` keyword. |
||||||
|
- Functions can also be defined by saving function *expressions* to a variable. "Arrow" functions are commonly used in this way. |
||||||
|
|
||||||
|
**Calling:** |
||||||
|
- When a function is defined, it is not yet executed. |
||||||
|
- To call and invoke a function's code, use the function's name followed by parentheses: `functionName()`. |
||||||
|
|
||||||
|
|
||||||
|
<ResourceGroupTitle>Free Content</ResourceGroupTitle> |
||||||
|
|
||||||
|
<BadgeLink colorScheme='blue' badgeText='Read' href='https://developer.mozilla.org/en-US/docs/Web/JavaScript/Guide/Functions#defining_functions'>Defining Functions</BadgeLink> |
||||||
|
<BadgeLink colorScheme='blue' badgeText='Read' href='https://developer.mozilla.org/en-US/docs/Web/JavaScript/Guide/Functions#calling_functions'>Calling Functions</BadgeLink> |
||||||
|
<BadgeLink colorScheme='yellow' badgeText='Read' href='https://www.w3schools.com/js/js_function_definition.asp'>Function Definitions</BadgeLink> |
||||||
|
|
||||||
|
|
||||||
|
Loading…
Reference in new issue