Skip to main content
  • Collection of characters used to store text
  • Creation
    • let name = "kalyan" ; // Creates a string
    • name.length // This property prints length of the string
    • Single quotes let name = 'kalyan'

Template literals

  • use back tcis instead of quotes
    • ` this is string `
  • With template literals , it is possible to use single and double quotes in a string
    • ` ” hello ” hi ‘kalyan’`
  • String interpolation
    •   let a = "hi";
        let b = `${a} kalyan`
      
  • Escape sequence Characters
    • Special characters to do somethings
    • \t tab , \n newline , ’ single quote , ” double quote
    •   // Escape sequnce charachters
        let fruit = ' Ba\na\'na \t fruit\"s' // \' single quote , \n newline , \t tab , \" double quote
        console.log(fruit)