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 d9f2244

Browse files
Few codes added
1 parent ec3473c commit d9f2244

File tree

3 files changed

+39
-0
lines changed

3 files changed

+39
-0
lines changed

‎problem19/sol.js

Lines changed: 16 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,16 @@
1+
function multiplicationtable() {
2+
console.log("Multiplication table of 13");
3+
for (let i = 1; i <= 10; i++) {
4+
let num = 13;
5+
console.log(num, "*", i, "=", num * i);
6+
}
7+
}
8+
multiplicationtable();
9+
10+
/*
11+
let num = 13;
12+
for(let i=1; i<=10; i++){
13+
let table = i*num;
14+
console.log(table);
15+
}
16+
*/

‎problem20/sol.js

Lines changed: 15 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,15 @@
1+
// Write a function that takes any name as uppercase or regular case and returns the name as lowercase as output.
2+
/*
3+
function changeCase(){
4+
let name = "PETER";
5+
console.log(name.toLowerCase());
6+
}
7+
changeCase();
8+
*/
9+
10+
11+
function changeCase(props){
12+
const transferCase = props.toLowerCase();
13+
return transferCase;
14+
}
15+
console.log(changeCase("LoVeLy"));

‎problem21/sol.js

Lines changed: 8 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,8 @@
1+
// Create a function called 'fullName' that takes the first part of your name and the last part of your name as parameters.
2+
// And it will return your full name as the output by concatenating the two parts of your name.
3+
4+
function nameMerge(firstName, lastName){
5+
let newName = firstName + " " + lastName;
6+
return newName;
7+
}
8+
(nameMerge("Peter", "Pablo"))

0 commit comments

Comments
(0)

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