Category: 3. JAVASCRIP

  • JavaScript Variable

    A JavaScript variable is simply a name of storage location. There are two types of variables in JavaScript : local variable and global variable. There are some rules while declaring a JavaScript variable (also known as identifiers). Name must start with a letter (a to z or A to Z), underscore( _ ), or dollar( $ )…

  • JavaScript Comment

    The JavaScript comments are meaningful way to deliver message. It is used to add information about the code, warnings or suggestions so that end user can easily interpret the code. The JavaScript comment is ignored by the JavaScript engine i.e. embedded in the browser. Advantages of JavaScript comments There are mainly two advantages of JavaScript comments. To…

  • External JavaScript file

    We can create external JavaScript file and embed it in many html page. It provides code re usability because single JavaScript file can be used in several html pages. An external JavaScript file must be saved by .js extension. It is recommended to embed all JavaScript files into a single file. It increases the speed of the…

  • JavaScript Example

    JavaScript Example Within body tag Within head tag Javascript example is easy to code. JavaScript provides 3 places to put the JavaScript code: within body tag, within head tag and external JavaScript file. Let’s create the first JavaScript example. <script type=”text/javascript”>   document.write(“JavaScript is a simple language for javatpoint learners”);   </script>   The script tag specifies that we are using JavaScript. The text/javascript is the content type that provides…

  • JavaScript Tutorial

    Our JavaScript Tutorial is designed for beginners and professionals both. JavaScript is used to create client-side dynamic pages. JavaScript is an object-based scripting language which is lightweight and cross-platform. JavaScript is not a compiled language, but it is a translated language. The JavaScript Translator (embedded in the browser) is responsible for translating the JavaScript code for the web browser.…