JavaScript_Methods
JavaScript_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() {