Skip to content

Navigation Menu

Sign in
Appearance settings

Search code, repositories, users, issues, pull requests...

Provide feedback

We read every piece of feedback, and take your input very seriously.

Saved searches

Use saved searches to filter your results more quickly

Sign up
Appearance settings

Commit 4196eda

Browse files
Few practice done
1 parent 0ac650c commit 4196eda

File tree

3 files changed

+24
-0
lines changed

3 files changed

+24
-0
lines changed

‎problem15/sol.js

Lines changed: 6 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,6 @@
1+
var itemslearnttillnow = ["Variable declaration", "Data types","String concatenation", "ParseInt()", "ParseFloat()", "toFixed()", "Math operations","Conditions", "Multiple conditions", "Multi stage conditions", "Array","Find array elements by index", "Find index by array element", "Array length", "Update array element", "Add element at the last of an array", "Add element at first of an array", "Remove the last element of an array", "Remove first element of an array", "While loop", "For loop", "Loop break", "Loop continue", "Loop reverse" ];
2+
for(var i=0; i < itemslearnttillnow.length; i++){
3+
var item = itemslearnttillnow[i];
4+
console.log(i +". " + item);
5+
}
6+

‎problem16/sol.js

Lines changed: 10 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,10 @@
1+
// Create an array with the names of all the mobile phone models you have used so far. Then show the elements of that array as output one by one with a while loop
2+
let usedmobilephonebyme = ["LG", "Classic", "Sony", "Yu", "MI A2", "10i", "pixel7a"];
3+
let i=0;
4+
while(i<usedmobilephonebyme.length){
5+
let mob=usedmobilephonebyme[i];
6+
console.log(mob);
7+
i++
8+
}
9+
10+

‎problem17/sol.js

Lines changed: 8 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,8 @@
1+
// Run a for loop. 30 to 86. And when this loop goes to 44, it will brake. Code that thing
2+
3+
for (i = 30; i <= 86; i++) {
4+
if (i == 44) {
5+
break;
6+
}
7+
console.log(i);
8+
}

0 commit comments

Comments
(0)

AltStyle によって変換されたページ (->オリジナル) /