Prepare Interview

Mock Exams

Make Homepage

Bookmark this page

Subscribe Email Address

Question: Explain String in Javascript?
Answer: Strings are sequences of keyboard characters enclosed in quotes
“Hello World” or ‘Hello World’

Variables can hold strings
var greeting = “Hello World”

String can be empty, i.e., contain no characters
var myAnswer = “”

Use ‘\’ (escape symbol) to ‘type’ prohibited characters
\b for backspace, \n for newline, \t for tab, \” for double quote.
Is it helpful? Yes No

Most helpful rated by users:

©2025 WithoutBook