This repository has been archived by the owner on Jan 5, 2023. It is now read-only.
-
Notifications
You must be signed in to change notification settings - Fork 41
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
New notes for programming languages & JavaScript
- Loading branch information
1 parent
3b0ebcb
commit 730ebeb
Showing
4 changed files
with
863 additions
and
1 deletion.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,35 @@ | ||
# JavaScript | ||
|
||
According to [Wikipedia](https://en.wikipedia.org/wiki/JavaScript), JavaScript is: | ||
|
||
> often abbreviated as JS, is a high-level, interpreted programming language. It is a language which is also characterized as dynamic, weakly typed, prototype-based and multi-paradigm. | ||
> | ||
> Alongside HTML and CSS, JavaScript is one of the three core technologies of the World Wide Web. JavaScript enables interactive web pages and thus is an essential part of web applications. The vast majority of websites use it, and all major web browsers have a dedicated JavaScript engine to execute it. | ||
> | ||
> As a multi-paradigm language, JavaScript supports event-driven, functional, and imperative (including object-oriented and prototype-based) programming styles. It has an API for working with text, arrays, dates, regular expressions, and basic manipulation of the DOM, but the language itself does not include any I/O, such as networking, storage, or graphics facilities, relying for these upon the host environment in which it is embedded. | ||
> | ||
> Initially only implemented client-side in web browsers, JavaScript engines are now embedded in many other types of host software, including server-side in web servers and databases, and in non-web programs such as word processors and PDF software, and in runtime environments that make JavaScript available for writing mobile and desktop applications, including desktop widgets. | ||
According to Mozilla Developer Network [(MDN) Web Docs](https://developer.mozilla.org/bm/docs/Web/JavaScript), JavaScript is: | ||
|
||
> a lightweight, interpreted or JIT compiled programming language with first-class functions. Most well-known as the scripting language for Web pages, many non-browser environments also use it, such as node.js and Apache CouchDB. JS is a prototype-based, multi-paradigm, dynamic scripting language, supporting object-oriented, imperative, and declarative (e.g. functional programming) styles. | ||
## What is JavaScript | ||
|
||
_JavaScript_ was initially created to "make webpages alive". (still remember DHTML? I remember that was being introduced to my undergrad school web programming course around year 2000.) | ||
|
||
The programs in this language are called scripts. They can be written right in the HTML document and execute automatically as the page loads. | ||
|
||
Scripts are provided and executed as a plain text. They don't need a special preparation or a compilation to run. | ||
|
||
At present, JavaScript can execute not only in the browser, but also on the server, or actually on any device where there exists a special program called [the JavaScript engine](https://en.wikipedia.org/wiki/JavaScript_engine). | ||
|
||
The browser has an embedded engine, sometimes it's also called a "JavaScript virtual machine". | ||
|
||
## What makes JavaScript unique? | ||
|
||
There are at least three great things about JavaScript: | ||
|
||
- Full integration with HTML/CSS. | ||
- Simple things done simply. | ||
- Supported by all major browsers and enabled by default. |
Oops, something went wrong.