Methods
Methods are actions we can perform, JavaScript provides a number of string methods.
These methods are called or used by appending an instance with:
a period (the dot operator)
the name of the method
opening and closing parentheses
e.g. 'example string'.methodName()
Some Methods:
console.log('hello'.toUpperCase())
Output: 'HELLO'console.log('Hey'.startsWith('H'))
Output: trueconsole.log(' Remove Whitespace '.trim())
Output: Remove Whitespace
Last updated