Added initial JavaScript code