Home
Java Script
_JS - Notes
_JS - Exercises
_JS - Projects
React
#
JavaScript Notes(Basics)
factorial in java script
by
himanshu
on
February 02, 2021
function
fac
(
n
)
{
let
fact
=
1
;
if
(
n
==
1
||
n
==
0
){
return
fact
}
else
{
for
(
var
i
=
n
;
i
>=
1
;
i
--)
{
fact
=
fact
*
i
;
}
return
fact
}
}
console
.
log
(
fac
(
5
))
0 Comments
Popular Posts
Create shopping cart using Context api (useContext)
August 05, 2021
Learn redux with todo-list project | React-redux for beginners
August 09, 2021
Host React JS website on github for Free
August 11, 2021
Report Abuse
Follow Us
Categories
AJAX in Java Scipt
1
Axios
1
Chart JS
1
Context API
1
GitHub
1
Java Script Advance
1
JavaScript Notes(Basics)
32
Js - Exercise
12
JS - Project
9
React JS
8
React JS Form
1
React Redux
1
Redux
1
useContent + useReducer
1
useContext hook
1
useEffect hook
1
Tags
JavaScript Notes(Basics)
Js - Exercise
JS - Project
React JS
AJAX in Java Scipt
Axios
Chart JS
Context API
GitHub
Java Script Advance
React JS Form
React Redux
Redux
useContent + useReducer
useContext hook
useEffect hook
Powered by Blogger
0 Comments