Location via proxy:   [ UP ]  
[Report a bug]   [Manage cookies]                
0% found this document useful (0 votes)
11 views

JavaScript_Methods

The document outlines various JavaScript methods for strings, arrays, and classes. It lists numerous string methods such as charAt(), includes(), and toUpperCase(), as well as array methods like concat(), filter(), and map(). Additionally, it explains that class methods are defined within the class body, with examples of constructor and static methods provided.

Uploaded by

cricteam352
Copyright
© © All Rights Reserved
Available Formats
Download as PDF, TXT or read online on Scribd
0% found this document useful (0 votes)
11 views

JavaScript_Methods

The document outlines various JavaScript methods for strings, arrays, and classes. It lists numerous string methods such as charAt(), includes(), and toUpperCase(), as well as array methods like concat(), filter(), and map(). Additionally, it explains that class methods are defined within the class body, with examples of constructor and static methods provided.

Uploaded by

cricteam352
Copyright
© © All Rights Reserved
Available Formats
Download as PDF, TXT or read online on Scribd
You are on page 1/ 4

JavaScript String, Array, and Class Methods

String Methods

- charAt()

- charCodeAt()

- codePointAt()

- concat()

- includes()

- endsWith()

- indexOf()

- lastIndexOf()

- localeCompare()

- match()

- matchAll()

- normalize()

- padEnd()

- padStart()

- repeat()

- replace()

- replaceAll()

- search()

- slice()

- split()

- startsWith()

- substring()

- toLocaleLowerCase()

- toLocaleUpperCase()
- toLowerCase()

- toString()

- toUpperCase()

- trim()

- trimStart()

- trimEnd()

- valueOf()

Array Methods

- concat()

- copyWithin()

- entries()

- every()

- fill()

- filter()

- find()

- findIndex()

- findLast()

- findLastIndex()

- flat()

- flatMap()

- forEach()

- from()

- includes()

- indexOf()

- isArray()

- join()
- keys()

- lastIndexOf()

- map()

- of()

- pop()

- push()

- reduce()

- reduceRight()

- reverse()

- shift()

- slice()

- some()

- sort()

- splice()

- toLocaleString()

- toString()

- unshift()

- values()

Class Methods

Classes in JavaScript do not have predefined methods like strings and arrays.

Instead, methods are defined within the class body, such as constructor(), getters, and setters.

Here is an example:

class Example {

constructor(param) {

this.param = param;

}
method1() {

return this.param;

static staticMethod() {

return 'Static method called';

You might also like