I am new to java script.
I have an array with the first 10000 values for factorials, in the form of strings. (1-10000). I have it in an array as part of a function.
<!DOCTYPE html>
<html>
<body>
<p>Provide input number, then click on accept. Textbiox value will change to appropriate value.</p>
Name: <input type="text" id="myText" value="Mickey">
<button onclick="myFunction()">accept</button>
<script>
function myFunction() {
var values = ["1",
"2",
"6",
"24",
"120",
"720",
"5040",
"40320",
"362880",
"3628800",
"39916800",...
Now, it takes about 20 seconds to load that website, I wanted to know how I can speed that up.
Lazy loading is the feature I am after, but all of them are sequences/functions that generate array values on the go, or image arrays, loading images from somewhere else.
How can I apply lazy loading to a static array? thank you.