Strings in Javascript
Strings in Javascript
Day 8
Strings in JavaScript:
Strings are the sequence of character
enclosed within the single quotes (‘ ) ,
double quotes (”) or backticks (`).
Amish Khan
web developer
1/5
template literal:
string using single quotes and double
quotes are same
But using backticks produces special
types of string called template literal
Template literals allows:
1. Embed JavaScript inside string
2. We can create multi line string
Amish Khan
web developer
2/5
String concatenation:
We can concatenate two or more string
using ‘+’ symbol
Type casting:
We can concatenate a number and a
string using “+”
Here Number will be typecast into string
we can also use toString() to change
Number into String
Number() can be used to change string
to Number
Amish Khan
web developer
3/5
Some String Method Example
Amish Khan
web developer
4/5
Amish Khan
web developer
5/5