JavaScript is a dynamic computer programming language .it is lightweight and most commonly used as a part of web pages and it is the scripting & interpreted programming language. 2. Variable: a variable used to store information ,that value can change in the computer program if we want declare a variable we…