Parameters or Arguments
There are no parameters or arguments for the sub() method.
The sub() method returns a reproduction of string enclosed in and tags.
The sub() technique does now not change the cost of the unique string.
var totn_string = 'TechOnTheNet'; console.log(totn_string.sub());
In this example, we have declared a variable called totn_string that is assigned the string cost of ‘TechOnTheNet’. We have then invoked the sub() technique of the totn_string variable to return a string that includes the HTML element.
We have written the output of the sub() technique to the net browser console log, for demonstration purposes, to show what the sub() method returns.
The following will be output to the web browser console log:
As you can see, the sub() method created a string that consists of a element. The value of the totn_string variable (which is ‘TechOnTheNet’) is enclosed inside the and tags.