Arduino Wait Function In Javascript Programming