The basic syntax is as similar to languages like C++ or Java as to reduce number of new concepts, which are needed for learning the language. Therefore, the common condition constructions of “if” type, “while” cycles, “switch” or e. g. “try… catch" function the same or very similarly.
Together with HTML and CSS belongs among three essential web technologies. It is used in front end on websites, where it is often inserted right to the HTML code. It is used typically for the control of different website interactive elements, such as buttons or text field, with its help are created animations and picture effects.
Scripts can be inserted directly to the HTML code or to save them to separate file, to which HTML code links.