-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy path05_string.js
More file actions
31 lines (21 loc) · 815 Bytes
/
05_string.js
File metadata and controls
31 lines (21 loc) · 815 Bytes
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
const name= "Krishna"
const reopoCount=50
// console.log(name+reopoCount);
console.log(` hello my name is ${name} and my repo count is ${ reopoCount}`); /// String INterpolation
const gameName= new String('Krishna-kumar')
// console.log(gameName);
// console.log(gameName[4]);
// // console.log(gameName.__proto__);
// console.log(name.toUpperCase());
// console.log(gameName.charAt(3));
const newString=gameName.substring(1, 5)
console.log(newString);
const anotherString= gameName.slice(1, 5)
console.log(anotherString);
const newStringOne=" krishna "
console.log(newStringOne);
console.log(newStringOne.trim());
const url="https://krishna.com/Krishna%20kumar"
console.log(url.replace('%20','-'));
console.log(url.includes('KrisHna'));
console.log(gameName.split('-'));