FazBrowse GitHub Viewer
|
Trending
|
URL:
|
Home
Tools:
[Download Repo ZIP]
[View Raw Code]
[Original HTTPS Page]
Problem-solving-with-JavaScript/problem-42.js at master · anasmak04/Problem-solving-with-JavaScript · GitHub
anasmak04
/
Problem-solving-with-JavaScript
Public
forked from
mehediislamripon/Problem-solving-with-JavaScript
Notifications
You must be signed in to change notification settings
Fork
0
Star
0
Code
Pull requests
0
Actions
Projects
Security and quality
0
Insights
Additional navigation options
Code
Pull requests
Actions
Projects
Security and quality
Insights
Expand file tree
Breadcrumbs
Problem-solving-with-JavaScript
/
problem-42.js
Copy path
More file actions
More file actions
Latest commit
History
History
History
19 lines (13 loc) · 542 Bytes
Breadcrumbs
Problem-solving-with-JavaScript
/
problem-42.js
Copy path
File metadata and controls
19 lines (13 loc) · 542 Bytes
Raw
Copy raw file
Download raw file
Open symbols panel
Edit and raw actions
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
// Take an integeras input and print it's multiplication
// table up to 10. if user gives 5 your output shouold look like the following example.
// 5 * 1 = 5 5 * 2 = 10 5 * 3 = 15 5 * 10 = 50
const
solution
=
(
integer
)
=>
{
let
sum
=
''
for
(
let
i
=
1
;
i
<=
10
;
i
++
)
{
sum
+=
`
${
integer
}
*
${
i
}
=
${
integer
*
i
}
`
}
return
sum
;
}
;
console
.
log
(
solution
(
5
)
)
// Multiplication Table of 5
console
.
log
(
solution
(
6
)
)
// Multiplication Table of 6
console
.
log
(
solution
(
7
)
)
// Multiplication Table of 7
Back
|
FazBrowse Home
|
New Git URL