Difference between revisions of "JavaScript"

From MgmtWiki
Jump to: navigation, search
(References)
 
(3 intermediate revisions by the same user not shown)
Line 1: Line 1:
 
==Full Title==
 
==Full Title==
[[JavaScript]]is a lightweight program language that is typically interpreted by a virtual machine although it can be just-in-time compiled.
+
[[JavaScript]]is a lightweight programming language that is typically interpreted by a virtual machine although it can be just-in-time compiled.
  
 
JavaScript is a pseudonym for ECMA script. There is no actual connection with the language Java other than historical.
 
JavaScript is a pseudonym for ECMA script. There is no actual connection with the language Java other than historical.
Line 7: Line 7:
 
[[JavaScript]] was first implements by Netscape to add local programmability to the browser.
 
[[JavaScript]] was first implements by Netscape to add local programmability to the browser.
  
In 2020 an assembly language (WASM) was added to most browsers. Now when you hear that a app is JavaScript-enabled, it will usually support WASM as well.
+
In 2017 an web assembly language (WASM) was added to most browsers. Now when you hear that a app is JavaScript-enabled, it will usually support WASM as well.
 
==Solutions==
 
==Solutions==
 
===Running a JavaScript===
 
===Running a JavaScript===
# All modern browsers come with JavaScript enabled.
+
# All modern browsers come with [[JavaScript]] enabled.
# The common way to run JavaScript on a computer is with Node installed using the local terminal program.
+
## Ensure the JavaScript is loaded either by including it in the HTML or by reference to a separate download.
 +
## Include one of the functions from the file in the HTML
 +
# The common way to run JavaScript on a computer is with Node installed using the local terminal program.<ref>Boardfinity, ''How to run a .js file in Terminal?'' https://www.boardinfinity.com/blog/how-to-run-a-js-file-in-terminal/</ref>
 
## Save your JavaScript with .js extension.
 
## Save your JavaScript with .js extension.
 
## Open a terminal program that accepts command prompts
 
## Open a terminal program that accepts command prompts
Line 18: Line 20:
 
###Node <Filename>.js
 
###Node <Filename>.js
 
## Press the Enter key.
 
## Press the Enter key.
 +
===Debugging a JavaScript===
 +
Since nearly every computer you use has a browser on it, it also have a [[JavaScript]] Virtual Machine (VM).
 +
* [https://nimc.gov.ng/the-new-e-id-card/ JavaScript debugging reference]]
  
 
==References==
 
==References==
  
 
[[Category: Glossary]]
 
[[Category: Glossary]]
 +
[[Category: Programming]]
 
[[Category: Standard]]
 
[[Category: Standard]]
 
[[Category: Browser]]
 
[[Category: Browser]]

Latest revision as of 11:12, 19 May 2025

Full Title

JavaScriptis a lightweight programming language that is typically interpreted by a virtual machine although it can be just-in-time compiled.

JavaScript is a pseudonym for ECMA script. There is no actual connection with the language Java other than historical.

Context

JavaScript was first implements by Netscape to add local programmability to the browser.

In 2017 an web assembly language (WASM) was added to most browsers. Now when you hear that a app is JavaScript-enabled, it will usually support WASM as well.

Solutions

Running a JavaScript

  1. All modern browsers come with JavaScript enabled.
    1. Ensure the JavaScript is loaded either by including it in the HTML or by reference to a separate download.
    2. Include one of the functions from the file in the HTML
  2. The common way to run JavaScript on a computer is with Node installed using the local terminal program.[1]
    1. Save your JavaScript with .js extension.
    2. Open a terminal program that accepts command prompts
    3. Locate your path where the .js file is saved.
    4. To compile the .js file enter on the terminal
      1. Node <Filename>.js
    5. Press the Enter key.

Debugging a JavaScript

Since nearly every computer you use has a browser on it, it also have a JavaScript Virtual Machine (VM).

References

  1. Boardfinity, How to run a .js file in Terminal? https://www.boardinfinity.com/blog/how-to-run-a-js-file-in-terminal/