SPA kodetime
This commit is contained in:
parent
b0523a9210
commit
6b3922eddc
4 changed files with 48 additions and 0 deletions
|
@ -0,0 +1,2 @@
|
|||
const SCRIPTS = require("./scripts.js");
|
||||
|
|
@ -15,3 +15,18 @@ for (let key in arrays) newArray = newArray.concat(arrays[key]);
|
|||
// }
|
||||
//reduceArrays();
|
||||
console.log(newArray2);
|
||||
|
||||
function loop(value, testFunc, updateFunc, bodyFunc){
|
||||
for (let i = 0; i < value; i++){
|
||||
if (testFunc == false){
|
||||
return
|
||||
} else {
|
||||
// updateFunc(value)
|
||||
|
||||
bodyFunc(value);
|
||||
}
|
||||
value--;
|
||||
}
|
||||
|
||||
}
|
||||
loop(3, n => n > 0, n => n - 1, console.log);
|
Loading…
Add table
Add a link
Reference in a new issue