[deutsch]

Notes on web development

Browser

Kontrast is compatible with all browsers that support a recent version of JavaScript called ECMAScript edition 2015 (ES6). Therefore, we recommend using a modern browser such as Firefox, Chrome, Edge or Safari, as they all support ES6. Note that Kontrast is not compatible with any version of Internet Explorer.

Debugging console

In every major browser there are developer tools that facilitate coding and debugging. You can usually open the developer tools by pressing F12 (in Chrome and Edge) or Ctrl-Shift-I (Firefox).

To see console log, open the developer tools first. Then click Console which you may find in the tab bar above. If the window is too narrow, you may see a » sign instead of Console. In this case, click the » sign and select Console.

Editing

We recommend a good text editor such as Atom, Notepad++, SublimeText, Vim and Emacs. These editors have features like syntax highlighting, brace matching, auto-completion and auto-indentation.

A text editor can often be extended using plugins, which allows you to use additional tools, such as linters and code formatters. Syntax linters are tools that statically analyze your code to find mistakes (such as misleading indentation, unused and undeclared variables, etc.). Code formatters automatically indent and (line-)warp your code, which is very useful.

We can recommend using eslint as a linter. You can also use typescript as a linter when using the --checkJs option (details). A very good code formatter is prettier.

A common way to install the above mentioned software is using the node package manager (npm), which is bundled with node.js:

The following steps show how to install a package:

  1. Download node.js for your operating system and install the software.

  2. Open a terminal (On Windows: Open Command prompt or type Windows + R, type cmd and press enter)

  3. Enter npm install PACKAGE-NAME --global and press enter. Replace PACKAGE-NAME with, e.g., prettier.

Built-in mathematical functions

All mathematical functions available in JavaScript are listed in the MDN page on the Math object. By default, all numbers in JavaScript are IEEE 754 64-bit floating point numbers.

Online resources

The Mozilla Developer Network (MDN) is a great resource for all questions related to modern JavaScript and the Document Object Model (DOM).

The site Can I use... keeps an up-to-date list on the compatibility of new JavaScript features in browsers.