In JavaScript, there are three ways to write a string — they can be written inside single quotes ( ‘ ‘ ) , double quotes ( ” ” ), or backticks ( ` ` ). The type of quote used must match on both sides, however it is possible that all three styles can be used throughout the same script.
How do you write inside a string?
In JavaScript, there are three ways to write a string — they can be written inside single quotes ( ‘ ‘ ) , double quotes ( ” ” ), or backticks ( ` ` ). The type of quote used must match on both sides, however it is possible that all three styles can be used throughout the same script.