JavaScript is a client-side scripting language. This means the web surfer's browser will be running the script. The name JavaScript is owned by Netscape. Microsoft calls…