String Indices
let name="abhi";
undefined
name[3]
'i'
name[2];
'h'
name.length
4
name[name.length-2]
'h'
"dhoni".length
5
let firstName='dhoni';
undefined
let secondName='thala';
undefined
let fullnam= firstName+secondName;
undefined
fullnam
'dhonithala'
fullnam=firstName+" "+secondName;
'dhoni thala'
"dhoni"+7
'dhoni7'
Comments
Post a Comment