Fix syntax errors in task.js examples