trim, trimStart and trimEnd methods | String Object In JavaScript

๐ŸŽ Join my channel to get access to perks:
https://www.youtube.com/channel/UC8n8ftV94ZU_DJLOLtrpORA/join

๐Ÿงก Hello All JavaScript Lovers Outhere!

Today you’re going to learn about the String Object In JavaScript.

This tutorial is a series of videos, in each video we will discuss a method (or more) of the String Object in JavaScript.

In today’s video, you’re going to learn about the trim, trimStart, and trimEnd methods.

The trim() method removes whitespace from both ends of a string and returns a new string, without modifying the original string.

The trimStart() method removes whitespace from the beginning of a string. trimLeft() is an alias of this method.

The trimEnd() method removes whitespace from the end of a string. trimRight() is an alias of this method.

๐ŸŸข๐ŸŸ  The string.trim() string.trimStart() and string.trimEnd().
๐Ÿ”ท Syntax :
trip()
trimStart()
trimEnd()

๐Ÿ”ท Example :
const greeting = ‘ Hello World! ‘;

console.log( greeting.trim() ); // ‘Hello World!’
console.log( greeting.trimStart() ); // ‘ Hello World! ‘
console.log( greeting.trimEnd() ); // ‘ Hello World!’

๐ŸŒ Social Media Links.
โ—พ Facebook : https://www.facebook.com/Code.Explained.Official
โ—พ Twitter : https://twitter.com/code_explained
โ—พ Instagram : https://www.instagram.com/Code.Explained.Official/
โ—พ GitHub : https://github.com/CodeExplainedRepo

๐Ÿ’ฒ Suppport the Channel
Paypal : https://paypal.me/CodeExplained
Buy Me a Coffee: https://www.buymeacoffee.com/CodeExplained

JavaScript For Beginner – How to Learn the Basics

JavaScript for beginner|JavaScript for beginner

JavaScript For Beginner – How to Learn the Basics

If you are a JavaScript for beginner and would like to learn the basics of the language, there are several resources available to help you. You can take a free online course or read a book to learn the basics. While free courses may offer you a quick start, they will likely not provide you with the support that you need. You may have to do your homework before attending the classes, but this will help you learn the language quickly.

You May Also Like