-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy path07_strings.js
More file actions
29 lines (19 loc) · 1 KB
/
Copy path07_strings.js
File metadata and controls
29 lines (19 loc) · 1 KB
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
// *************************** Strings *****************************
const name = "sinchan" // variable declaration is old method
const repoCount = 10
// console.log(name + " has " + repoCount + " repos.") // this type of string concate is old method, and shouldn't use anymore
// New Method of String concatnation, should be used from now on.
console.log(`Hello, my name is ${name} and I have a total of ${repoCount} repos in github.`);
const aboutMe = new String('My name is sinchan gayen') // new method of variable declaration
console.log(aboutMe[1]);
console.log(aboutMe.__proto__);
console.log(aboutMe.length);
console.log(aboutMe.toUpperCase());
console.log(aboutMe.charAt(6))
console.log(aboutMe.indexOf('S'))
console.log(aboutMe.indexOf('s'))
console.log(aboutMe.includes('sinchan'))
console.log(aboutMe.includes(' '))
console.log(aboutMe.split(' '))
// More functions to be explored later by own
// Mastering String is great choice to start with JS