JavaScript as a scripting language:
JavaScript as a scripting language:
- JavaScript (also known as JS) is a scripting language, but what does scripting language mean?
- A scripting language is a programming language that allows some control of another software application(s). In the case of JavaScript, this application is the browser.
- JavaScript is actually an interpreted language and not a compiled language.
- The compilation is the process of converting high-level programming languages like Java, C++, etc. into machine code that a computer can execute.
- In the case of JavaScript, an interpreter in the browser interprets each line of JavaScript code and runs it.
JavaScript can "display" data in different ways:
- Writing into an HTML element, using
innerHTML
. - Writing into the HTML output using
document.write()
. - Writing into an alert box, using
window.alert()
. - Writing into the browser console, using
console.log()
.
Comments
Post a Comment