Update tasks.js

Fix type of 'Functon' to 'Function'