Styleguide

Modern JavaScript is more concise (some would say Pythonic) than ever. The language shows a clear trend to omit superfluous chars (e.g. the semicolon after each statement, a compact notation for multiline-strings) provide more specific keywords (e.g. let and const in addition to the var statement, class and static for object oriented programing and namespaces). This styleguide lists some of the newer ways which should be prefered over older styles still to be found on stackoverflow and other sites.

The same holds for HTML5.


<!-- Old way -->
<script type="text/javascript" src=""></script>

<!-- Prefered way: text/javascript is now the default type -->
<script src=""></script>