The following code shows how to Display Factorial of First Ten Integers in JavaScript
<html>
<head>
<title>Factorial of Numbers</title>
<script>
var factorial=1;
for(var i=1;i<=10;i++)
{
for(var j=1;j<=i;j++)
{
factorial*=j;
}
document.write("Factorial of "+(--j)+" is "+factorial+"<br/>");
factorial=1;
}
</script>
</head>
<body>
</body>
</html>
Output
Further Reading
Evolution of JavaScript from ES1 to ES2020