Guidelines for developing JavaScript Programs


Guidelines for developing JavaScript programs are as follows..

Hi there..!! Before reading the guidelines make sure that you’re aware of What is JavaScript?

The following are the guidelines which must be known before writing a JavaScript Program.

  1. A semicolon should be used to indicate the end of a line of code.
  2. Declare each variable by using the keyword “var”.
  3. If a function has parameters then pass them by using parentheses.
  4. JavaScript program will have neither an exit condition nor a main function. Because, scripts differ from the proper programs, its execution begins at the first line of code and continues till there is no more code.
  5. Use curly braces to indicate a block of code.
  6. Include or place the JavaScript code in a HTML page. If this is not done, then few browsers while display the JavaScript (output) may also display the code. It is recommended to place JavaScript code in the head of the HTML page.
  7. JavaScript files can also be stored separately with a file extension “.js”.
  8. The output of a JavaScript program can be seen on any of the browsers available till date.
  9. To check errors for the Netscape Navigator (browser), type the command JavaScript the location box of the browser. However, Internet Explorer (browser) by default displays a pop-up. Regarding the details of error(s).
  10. Download a debugger for scripting language from the Microsoft web site at free of cost.

    Related topics


Leave A Reply