Skip to content

Commit a7638e3

Browse files
reverse, split, slice separate word and name and more of problems has been solved
1 parent 2318ed6 commit a7638e3

File tree

9 files changed

+53
-1
lines changed

9 files changed

+53
-1
lines changed

E. Object/access-object-property.js

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,4 @@
1-
/* Problem-3
1+
/* Problem-5
22
33
Display the physics marks as output.
44

E. Object/add-in-string.js

Lines changed: 7 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,7 @@
1+
/* Problem-6
2+
3+
Show the names "Mamun, Rakib, Salma, Fahim" together with commas.*/
4+
5+
const names = ["Mamun, Rakib, Salma, Fahim"];
6+
const allNames = names.join(" ,");
7+
console.log(allNames);

E. Object/add-names.js

Lines changed: 10 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,10 @@
1+
/* Problem-11
2+
3+
The names are paired with a space between "Tahmid" and "Kazi".*/
4+
let name1 = "Tahmid";
5+
let name2 = "Kazi";
6+
7+
let bothName = name1.concat(` ${name2}`);
8+
//or let bothName = name1.concat(" " + name2);
9+
10+
console.log(bothName);

E. Object/join-word.js

Lines changed: 5 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,5 @@
1+
/* Problem-10
2+
3+
"Sleep, eat, read, move" tasks are shown by adding "|".*/
4+
let activity = ["Sleep", "eat", "read", "move"];
5+
console.log(activity.join("|"));

E. Object/replace-name.js

Lines changed: 6 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,6 @@
1+
/* Problem-12
2+
3+
The word "Omar" was cut out from "Here is my brother Omar".*/
4+
let sentence = "Here is my brother Omar";
5+
let replaceWord = sentence.replace("Omar", "");
6+
console.log(replaceWord);

E. Object/replace-word.js

Lines changed: 6 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,6 @@
1+
/* Problem-9
2+
3+
Remove the "market" part from "I will go market today.".*/
4+
let sentence = "I will go market today.";
5+
let replaceWord = sentence.replace("market", "")
6+
console.log(replaceWord);

E. Object/separate-name.js

Lines changed: 6 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,6 @@
1+
/* Problem-8
2+
3+
Separate the names "Raju, Rana, Hasan, Kabir, Mahi".*/
4+
5+
let names = "Raju, Rana, Hasan, Kabir, Mahi";
6+
console.log(names.split(" "));

E. Object/separate-word.js

Lines changed: 6 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,6 @@
1+
/* Problem-7
2+
3+
Separate each word in the sentence "Bangladesh is my favorite country."*/
4+
5+
let text="Bangladesh is my favorite country.";
6+
console.log(text.split(" "));

E. Object/slice.js

Lines changed: 6 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,6 @@
1+
/* Problem-13
2+
3+
Extract the part "I like to listening Bengali songs" from "like to listening".*/
4+
let sentence = "I like to listening Bengali songs";
5+
let outputWord = sentence.slice(2, 19);
6+
console.log(outputWord);

0 commit comments

Comments
 (0)