Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Important JavaScript Methods #224

Open
wants to merge 1 commit into
base: master
Choose a base branch
from
Open
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
41 changes: 41 additions & 0 deletions Important Javascript Methods
Original file line number Diff line number Diff line change
@@ -0,0 +1,41 @@
This article entails a listing of all JavaScript methods alphabetically.

1.abs: The Math.abs() function returns the absolute value of a number.
2.bind: The bind() method creates a new function that, when called, has its this keyword set to the provided value,
with a given sequence of arguments preceding any provided when the new function is called.
3.ceil: The Math.ceil() function returns the smallest integer greater than or equal to a given number.
4.charAt: The charAt() method returns the specified character from a string.
5.concat: The concat() method combines the text of one or more strings and returns a new string.
6.every: The every() method tests whether all elements in the array pass the test implemented by the provided function.
7.fill: The fill() method fills all the elements of an array from a start index to an end index with a static value.
8.filter: The filter() method creates a new array with all elements that pass the test implemented by the provided function.
9.find: The find() method returns a value in the array, if an element in the array satisfies the provided testing function.
Otherwise undefined is returned.
10.findIndex: The findIndex() method returns an index in the array, if an element in the array satisfies the provided testing function.
Otherwise -1 is returned.
11.getDate: The getDate() method returns the day of the month for the specified date according to local time.
12.has: The has() method returns a boolean indicating whether an element with the specified key exists or not.
13.includes: The includes() method determines whether an array includes a certain element, returning true or false as appropriate.
14.indexOf: The indexOf() method returns the first index at which a given element can be found in the array, or -1 if it is not present.
15.isNaN: The Number.isNaN() method determines whether the passed value is NaN. It is a more robust version of the original,
global isNaN().
16.join: The join() method joins all elements of an array into a string.
17.lastIndexOf: The lastIndexOf() method returns the last index at which a given element can be found in the array, or -1 if it is not
present. The array is searched backwards, starting at fromIndex.
18.log10: The Math.log10() function returns the base 10 logarithm of a number, that is
19.map: The map() method creates a new array with the results of calling a provided function on every element in this array.
20.max: The Math.max() function returns the largest of zero or more numbers.
21.parseInt: The Number.parseInt() method parses a string argument and returns an integer of the specified radix or base.
22.pow: The Math.pow() function returns the base to the exponent power, that is, baseexponent.
23.random: The Math.random() function returns a floating-point, pseudo-random number in the range [0, 1) that is, from 0 (inclusive)
up to but not including 1 (exclusive), which you can then scale to your desired range. The implementation selects the initial seed to
the random number generation algorithm; it cannot be chosen or reset by the user.
24.reduce: The reduce() method applies a function against an accumulator and each value of the array (from left-to-right) to reduce it
to a single value.
25.repeat: The repeat() method constructs and returns a new string which contains the specified number of copies of the string on which
it was called, concatenated together.
26.slice: The slice() method returns a shallow copy of a portion of an array into a new array object.
27.splice: The splice() method changes the content of an array by removing existing elements and/or adding new elements.
28.test: The test() method executes a search for a match between a regular expression and a specified string. Returns true or false.