-
Notifications
You must be signed in to change notification settings - Fork 0
/
index.js
36 lines (34 loc) · 1.07 KB
/
index.js
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
32
33
34
35
let str = "i can walk in the park all the day";
let stro = str.substring(18,22);
console.log(stro);
let str1 = "hello world";
strl2 = str1.toUpperCase();
console.log(strl2);
let strl3 = "earthings";
strl4 = strl3.toLowerCase();
console.log(strl4);
let string = "JavaScript";
string1 = string.substring(3,6);
console.log(string1);
let text = "nice shoes";
let text1 = text.includes("l")
console.log(text1);
console.log("J" + string + "J" );
let lastthree = string.substring(string.length -3);
let newjava = lastthree + string + lastthree;
console.log(newjava);
let firstchr = string[0];
let lastchr = string[string.length -1];
let mod1 = string.substring(1, string.length -1);
let finalm = lastchr + mod1 + firstchr;
console.log(finalm);
let strcex = "isfun";
console.log(strcex.toUpperCase());
console.log(strcex.includes("java"));
let uname = "ahmed ";
let add = "Hamburg";
let job = "teacher";
let aboutme = `My name is ${uname}, i live in ${add}, iam a ${job}.`;
console.log(aboutme);
let strcec12 = "the quick brown fox";
console.log(strcec12[0].toUpperCase() + strcec12.substring(1));