JavaScript


JavaScript
JavaScript: Programming the Web

The Wikibook on hand is intended as a guide for WEB developers who want to learn the basics of the programming language JavaScript. It offers short descriptions of concepts, syntax, context, and JavaScript-related technologies, as well as code examples and exercises. Additional links lead the reader to in-depth information regarding the more complex features and such issues that have a loose relation to JavaScript. Especially the Wikiversity course JavaScript Programming offers a rich set of additional details and links to YouTube learning videos. Furthermore, we recommend the JavaScript MDN pages for referencing the details of syntax and APIs.

It is assumed that the reader has good knowledge and some experience using computers, Web browsers, text editors, and software development environments. As he will not learn about HTML, CSS, or website design in this book, it's a good idea to consult an appropriate book to learn about these subjects. It is also helpful if he has preknowledge of another programming language like Python, PHP, or C because the wikibook doesn't explain all the small first steps which are common to such languages. Instead, it focuses on the distinctions.

In most cases, the examples use the current syntax (as of 2022). Sometimes there are hints about the syntax of old standards like HTML4.


JavaScript - JS for short - is a programming language that is dynamically typed, prototype based (even for its object-oriented features), supports functional programming, and is - in most cases - just-in-time compiled. Its syntax is similar to that of C or Java, but its concepts and runtime behavior are distinctly different. The programming language JavaScript conforms to the international standard ECMAScript (Website of ECMA-262; in PDF format; in HTML format; Latest specification (TC39)).

Besides HTML and CSS, JavaScript is a cornerstone for WEB development. It handles all dynamic (behavioral) aspects like event-handling, DOM manipulation, and client-server communication. On the client-side all modern browsers support JavaScript, and on the server-side many Webservers applications, libraries, and frameworks are written in JavaScript.

Welcome

Core Language Aspects

Extended Language Aspects

Client Side Aspects

Document Object Model (DOM)

Events

Digression: Simple games

Miscellaneous

Client-Server Communication

Native (AJAX)

Fetch API, Axios, and jQuery (ToDo)

JavaScript at Server-Side (ToDo)

Criticism (ToDo)

Appendices

Related Wikibooks

Resources at Wikipedia and Wikiversity

External links