Exploring String Methods in Javascript


Manipulate and explore strings with built-in methods.

Source Code

let message = 'Hello, world!';
console.log(message.startsWith('Hello')); // true
console.log(message.endsWith('!')); // true
console.log(message.includes('world')); // true
console.log(message.toUpperCase()); // "HELLO, WORLD!"
console.log(message.toLowerCase()); // "hello, world!"
Subscribe
Notify of
guest
0 Comments
Inline Feedbacks
View all comments