totn JavaScript

JavaScript: String big() method

This JavaScript tutorial explains how to use the string method called big() with syntax and examples.

Description

In JavaScript, big() is a string method that is used to create the HTML <big> element. Because the big() method is a method of the String object, it must be invoked through a particular instance of the String class.

Syntax

In JavaScript, the syntax for the big() method is:

string.big();

Parameters or Arguments

There are no parameters or arguments for the big() method.

Returns

The big() method returns a copy of string enclosed in <big> and </big> tags.

Note

  • The big() method does not change the value of the original string.

Example

Let's take a look at an example of how to use the big() method in JavaScript.

For example:

var totn_string = 'TechOnTheNet';

console.log(totn_string.big());

In this example, we have declared a variable called totn_string that is assigned the string value of 'TechOnTheNet'. We have then invoked the big() method of the totn_string variable to return a string that contains the HTML <big> element.

We have written the output of the big() method to the web browser console log, for demonstration purposes, to show what the big() method returns.

The following will be output to the web browser console log:

<big>TechOnTheNet</big>

As you can see, the big() method created a string that contains a <big> element. The value of the totn_string variable (which is 'TechOnTheNet') is enclosed within the <big> and </big> tags.