Horje
What is a String in JavaScript ?

In JavaScript, a string is a data type used to represent a sequence of characters. Strings are typically used to store and manipulate text-based data. Strings can contain letters, numbers, symbols, and whitespace characters.

Example: Here, the variable greeting is assigned a string value "Hello, world!", which represents a common greeting message. The string is enclosed within double quotes ("), indicating its beginning and end.

Javascript

let greeting = "Hello, world!";
console.log(greeting); // Output: Hello, world!

Output

Hello, world!



Reffered: https://www.geeksforgeeks.org


JavaScript

Related
What is an Array in JavaScript ? What is an Array in JavaScript ?
What is the use of the Array.sort() method in JavaScript ? What is the use of the Array.sort() method in JavaScript ?
What is the use of && operator in JavaScript ? What is the use of && operator in JavaScript ?
What is the use of the += operator in JavaScript ? What is the use of the += operator in JavaScript ?
What are Comparison Operators in JavaScript ? What are Comparison Operators in JavaScript ?

Type:
Geek
Category:
Coding
Sub Category:
Tutorial
Uploaded by:
Admin
Views:
14