JavaScript is a language that allows you to inject logic in pages written in HTML (Hypertext Mark-up Language). You have here a brief overview of how JavaScript works in addition to its practical use.

JavaScript logic of the paragraphs may be “loose” or linked to the occurrence of events. Loose paragraphs are executed in the sequence in which they appear on the page (document) and linked to events run only when the event occurs.

To enter programming paragraphs within the HTML, you must identify the beginning and end of JavaScript commands, as follows:

<SCRIPT>

Instruction set

</ SCRIPT>

This procedure can be adopted anywhere on the page. However, for better viewing and ease of maintenance, it is recommended that all logic is written in the beginning of the document, through the creation of functions to be invoked when necessary (usually linked to events).

If the logic is written from a particular event, it is not necessary to use the SCRIPT commands.

JavaScript commands are sensitive to the font (capital letter and lower case) in its syntax.

In Javascript, the mathematical operators are widely used:

  • (+) value addition and string concatenation;
  • (-) minus values;
  • (*) multiplication values;
  • (/) values ​​of division;
  • (%) gets the remainder of a division.

Some special controls are also part of languages, they are:

  • b – backspace;
  • f – form feed;
  • n – new line caracters;
  • r – carriage return;
  • t – tab characters;
  • // – comment line;
  • /*….*/ – delimiters to enter text with more than one line as a comment.

Finally, natural delimiters for a string are ‘or’. If necessary the use of these characters as part of the string, it uses the character preceding ‘or’.

Ex: alert (“Beware of using ‘or ‘ in a string”)

Visit our blog and check out more content!

Do you know the scriptcase tool? No, see all about our tool!

By ,

February 18, 2016

a

You might also like…

No-code: Ease or Trap? What no one tells you about creating without coding

With the popularization of No-code and Low-code platforms, application development has reached a po...

Top 10 Rapid App Development Tools You Need to Know

In this highly fast-moving digital world, rapid application development tools must be available to ...

You might also like…

Get new posts, resources, offers and more each week.

We will use the information you provide to update you about our Newsletter and Special Offers. You can unsubscribe any time you want by clinck in a link in the footer of any email you receive from us, or by contacting us at sales@scriptcase.net. Learn more about our Privacy Police.