0

I was Coding Today (new) and i was wondering how people made js and python so i tried making a function based programming language using js

function init(){
  log(console,"lmao ok")
  setTimeout(log(console,'#--- Done'), 5000 )
}
function log(arg1,arg2) {
  // body...
  if (arg1 == console){
    console.log(arg2)
  }
  else {
  return
}
}
  function prompt(arg1,arg2,arg3){
    console.debug
    var arg1 = "lmao"
  }

init()
log(console,'tosay')

  • The first parameter of setTimeout needs to be a function. `setTimeout(() => log(console,'#--- Done'), 5000 )` – James Nov 23 '22 at 21:20

0 Answers0