format javascript: move default to the right place