I'm trying to make a function that runs a specified piece of code forever. How can I do this?
Example:
function forever(code) {
for (let i = 1; i > 0; i++) {
//Run code from variable here
}
I've tried:
function forever(code) {
for (let i = 1; i > 0; i++) {
code
}