JavaScript String link() Method
Definition and Usage
The string link() is deprecated in JavaScript.
Avoid using it.
It may stop running in your browser at any time.
link()
The method returns the string embedded in the <a> tag:
<a href="url">string</a>
Example
let text = "Free Web Technology Tutorials!"; let result = text.link("https://www.codew3c.com");
Syntax
string.link("url")
Parameters
Parameters | Description |
---|---|
url | Required. The URL to be linked to. |
Return Value
String embedded in the <a> tag.