Skip to content

Navigation Menu

Sign in
Appearance settings

Search code, repositories, users, issues, pull requests...

Provide feedback

We read every piece of feedback, and take your input very seriously.

Saved searches

Use saved searches to filter your results more quickly

Sign up
Appearance settings

Commit 11e0262

Browse files
committed
Function STAUS: Done
1 parent c0c579c commit 11e0262

File tree

1 file changed

+52
-0
lines changed

1 file changed

+52
-0
lines changed

‎10-JavaScript-Functions.md

Lines changed: 52 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1,3 +1,24 @@
1+
**Table of Content**
2+
3+
- [Functions](#functions)
4+
- [Function Declarations and Function Expression](#function-declarations-and-function-expression)
5+
- [Difference between function declaration and function expression](#difference-between-function-declaration-and-function-expression)
6+
- [Function Parameters](#function-parameters)
7+
- [Default Parameter](#default-parameter)
8+
- [Rest Parameter](#rest-parameter)
9+
- [Difference Between Arguments and Rest Parameter](#difference-between-arguments-and-rest-parameter)
10+
- [Arrow Functions](#arrow-functions)
11+
- [Function Scope](#function-scope)
12+
- [Lecxical Scoping](#lecxical-scoping)
13+
- [Closures](#closures)
14+
- [IIFEs](#iifes)
15+
- [Recursion](#recursion)
16+
- [JavaScript Built-In Functions](#javascript-built-in-functions)
17+
- [Number Methods](#number-methods)
18+
- [Boolean Methods](#boolean-methods)
19+
- [String Object](#string-object)
20+
- [Array Methods](#array-methods)
21+
122
# Functions
223

324
A `function` is a block of code that runs when the function is called.
@@ -358,3 +379,34 @@ function power(a, n) {
358379
- `toFixed()`: formats a number with a specific number of digits to the right of decimal.
359380
- `toString()`: returns the string representation of the number's value
360381
- `valueOf()`: returns the number's value
382+
383+
### Boolean Methods
384+
385+
- `toSource()`: returns a string containing the source of the Boolean object
386+
- `toString()`: returns a string of either `true` or `false` depending upon the value of object
387+
- `valueOf()`: returns the primitive value of a Boolean object
388+
389+
### String Object
390+
391+
- `charAt()`: returns the character at specified index
392+
- `concat()`: combines the text of two strings and returns a new string
393+
- `indexOf()`: returns the index of first occurence of specified value within an array of string (`-1` if not found)
394+
- `lastIndexOf()`: returns the index of last occurence od specified calue within an array of string (`-1` if not found)
395+
- `length()`: returns the length of string
396+
- `match()`: used to match regular expression against a string
397+
- `replace()`: used to find a match between regular expression and a string, and replace the matched substring with a new substring
398+
- `slice()`: splits a string object into array of string by seperating the string into substrings
399+
400+
### Array Methods
401+
402+
- `concat()`: returns a new array compromised of the array joined with other array(s)
403+
- `every()`: returns `true` if every element in this array satisfies the provided testing fucntion
404+
- `filter()`: creates a new array with all elements of this array for which the provided filtering function returns `true`
405+
- `indexOf()`: returns the first index of an element within the array equal to specified value (`-1` if not found)
406+
- `join()`: joins all the elements of an array into string
407+
- `pop()`: removes and returns the last element from an array
408+
- `push()`: adds one or more elements to the end of an array and returns the new length of the array
409+
- `shift()`: removes and returns the first element of the array
410+
- `unshift()`: adds one or more elements to the front of array and returns the new length of array
411+
- `slice()`: extracts a section of array and returns a new array
412+
- `splice()`: add, remove or replace elements in an array based on their index

0 commit comments

Comments
(0)

AltStyle によって変換されたページ (->オリジナル) /