Skip to content
Akin C edited this page Apr 15, 2018 · 10 revisions

Welcome to the Javascript-semicolon-first-rule- wiki!

This repository is part of a larger project!

◀️ PREVIOUS PROJECT| NEXT PROJECT ▶️


The rules of using semicolons in Javascript does not follow just one rule and should be learned, because its usage can evoke some trouble if not known.

There are exactly three rules which should be remembered. This repository observes the first. The other two can be found here:

Javascript inserts internally semicolons. According to first rule:

  1. Before a "{"
  2. After newline(s)
  3. End of the program input

Content

The user interaction part should look like the content as seen below by starting "index.html" in a web browser.

ERROR: No Image was found!

The core part is found in the file "result.js" and specifically in functions calculate and changeSign.

Both functions are not seperated with a semicolon and calculate uses no semicolon at all in its definition.

To use the project just download the files and execute "index.html". Note that all files should be placed in the same folder so that the functionality of the code is guaranteed.

Clone this wiki locally