tubeshowcase●1,194,391 videos♡ My collection 0
← Learn to Code

Learn to Code05:27

Learn JS METHOD CHAINING in 5 minutes! ⛓

Bro Code ↗

From the creator

#javascript #tutorial #course // Method Chaining = Calling one method after another // in one continuous line of code. let username = window.prompt("Enter your username: "); // ----- NO METHOD CHAINING ----- /* username = username.trim(); let letter = username.charAt(0); letter = letter.toUpperCase(); let extraChars = username.slice(1); extraChars = extraChars.toLowerCase(); username = letter + extraChars; console.log(username); */ // ----- METHOD CHAINING ----- username = username.trim().charAt(0).toUpperCase() + username.trim().slice(1).toLowerCase(); console.log(username);

Published 2023-12-19 · Watch on YouTube ↗
Availability and playback restrictions are controlled by the original channel.

Keep exploring Learn to Code