Import code from mini-javascript-loop and add PLAN.md