Method chaining in JavaScript ⛓️【1 minute】

71 Views
Published
#Javascript #method #chaining

// method chaining = calling one method after another
// in one continuous line of code

let userName = "bro";

let letter = userName.charAt(0).toUpperCase().trim();

console.log(letter);
Category
Bro Code
Be the first to comment