JavaScript Strings

Pallab Sarkar
Nov 7, 2020

JavaScript Strings

1. JavaScript is used to save and use string text.
2. JavaScript strings usually keep a bunch of characters for later use. E.g., “John Doe”
3. Any book can be inside the string quotation. You can use single or double-quotes.
Example :
var carname = “Volvo XC60”;
var carname = ‘Volvo XC60’;

You can use quotations inside the string as many times as you like until the first and last quotations match.
Example:
var answer = “It’s alright”;
var answer = “He is called ‘Johnny’”;
var answer = ‘He is called “Johnny”’;

--

--