JS String Methods
August 23, 2023•192 words
Remember that methods are actions we can perform. JS provides a number of string methods.
We call, or use, these methods by appending an instance (object) with a period (the dot operator), the name of the method, and opening and closing parentheses: e.g. 'Hello'.methodName().
Does that syntax look a little familiar? When we use console.log() we’re calling the .log() method on the console object. Let’s see console.log() and some real string methods in action!
console.log('hello'.toUpperCase());...
Read post