From e2ec1b8363a186618450622fb69d7db8c67ad503 Mon Sep 17 00:00:00 2001 From: Marco Buontempo <88648239+marcobuontempo@users.noreply.github.com> Date: Wed, 5 Oct 2022 10:13:03 +1100 Subject: [PATCH] Add descriptions to JavaScript Built-In Objects, and Defining Calling Functions (#2111) --- .../101-object/102-builtin-objects.md | 15 ++++++++++++++- .../100-defining-calling-functions.md | 19 ++++++++++++++++++- 2 files changed, 32 insertions(+), 2 deletions(-) diff --git a/content/roadmaps/106-javascript/content/102-javascript-datatypes/101-object/102-builtin-objects.md b/content/roadmaps/106-javascript/content/102-javascript-datatypes/101-object/102-builtin-objects.md index 7272cb275..978be4852 100644 --- a/content/roadmaps/106-javascript/content/102-javascript-datatypes/101-object/102-builtin-objects.md +++ b/content/roadmaps/106-javascript/content/102-javascript-datatypes/101-object/102-builtin-objects.md @@ -1 +1,14 @@ -# Builtin objects \ No newline at end of file +# 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` + +Free Content + +Built-in Objects \ No newline at end of file diff --git a/content/roadmaps/106-javascript/content/109-javascript-functions/100-defining-calling-functions.md b/content/roadmaps/106-javascript/content/109-javascript-functions/100-defining-calling-functions.md index 773f00408..11bace290 100644 --- a/content/roadmaps/106-javascript/content/109-javascript-functions/100-defining-calling-functions.md +++ b/content/roadmaps/106-javascript/content/109-javascript-functions/100-defining-calling-functions.md @@ -1 +1,18 @@ -# Defining calling functions \ No newline at end of file +# 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()`. + + +Free Content + +Defining Functions +Calling Functions +Function Definitions + +