Update API.js

Syntax corrections.