Format JavaScript code