DEV Community

Siddharth Kanojiya
Siddharth Kanojiya

Posted on

Introduction to Strings | JavaScript #11

// String are used to store and manipulate text
// String can be used created using the following syntax
// let the name "Sage"

let name = "Sage"
// console.log(name.length)

// Templete literals
let boy1 = "Adarsh"
let boy2 = "Avinash"
// Adarsh is a brother of Avinash
let sentence = ${boy1} is a brother of ${boy2}
console.log(sentence)
// Templete literals use backtics instead of quotes to define a string

// we can inserst varible in Templete literals .This is called a string interpolation

// Escape Sequence Character
let fruit = 'Bana\'na'
console.log(fruit)

Top comments (0)