Parameters or Arguments
There are no parameters or arguments for the trimStart() method.
The trimStart() method returns a string with whitespace characters removed from the begin of the string.
The trimStart() approach does no longer alternate the cost of the authentic string. The trimStart() method can be aliased as the trimLeft() technique which also gets rid of whitespace characters from the left side or start of the string.
var totn_string = ' TechOnTheNet '; console.log(totn_string.trimStart());
In this example, we have declared a variable called totn_string that is assigned the string price of ‘TechOnTheNet’. We have then invoked the trimStart() technique of the totn_string variable to eliminate the whitespace characters from the start of the string.
We have written the output of the trimStart() approach to the web browser console log, for demonstration purposes, to exhibit what the trimStart() approach returns.
The following will be output to the internet browser console log:
In this example, the trimStart() method eliminated the whitespace characters from the start of the string and lower back a string value of ‘TechOnTheNet ‘.