Jump to content

Javascript: Difference between revisions

m
CAPS to italics, grammar
(if statements + general fixups)
m (CAPS to italics, grammar)
Line 1:
{{Useful Notes}}
First off, '''Javascript''' is NOT''not'' [https://en.wikipedia.org/wiki/Java_%28programming_language%29 Java].
 
First off, '''Javascript''' is NOT [https://en.wikipedia.org/wiki/Java_%28programming_language%29 Java].
 
However, it was called Javascript to piggyback off of the similar name, but the two languages are quite different. They share some mild syntax similarities, but are fundamentally two different languages, with different designs and goals.
 
In short, Javascript, alongside [[HTML]] and [[Cascading Style Sheets|CSS]], make up the basic building blocks of almost all webpages. Where HTML serves as the basic layout and CSS handles styling, Javascript is used for all the fancy stuff like popup windows, executing program code in a webpage, and adding interactive features like polls. Javascript is mostly a client side language, meaning that it runs in the web browser instead of the server the website is hosted on, although software such as [https://nodejs.org/en/ node.js] allows it to be used on servers. Furthermore, tools such as [https://www.electronjs.org/ Electron] and React Native allowsallow developers to construct desktop apps and mobile apps (respectively) using web tools, handling logic and processing with Javascript.
 
Most other programming languages require you to put semicolons at the end of a line to denote that a line of code has ended. Javascript does this automatically; it can detect where semicolons should be in your code, and execute the code as if they were there. However, using this feature is frowned upon by some developers, as it breaks standards set out by other languages without the feature, and the engine may occasionally get the completion wrong, therefore manually inserting semicolons at the end of each line is recommended.
Cookies help us deliver our services. By using our services, you agree to our use of cookies.