1. What is JavaScript? JavaScript is a scripting language used to create dynamic, interactive…