JavaScript Notes

  • Introduction to JavaScript

    JavaScript is a dynamic ,lightweight, interpreted programming language with object-oriented capabilities that allows you to build interactivity into otherwise static HTML pages. "},{"left":"Advantages","right"

  • Operators

    + Adds two operands - Subtracts second operand from the first \\* Multiply both operands / Divide numerator by denumerator % Modulus Operator and remainder of after an integer division ++ Increment operator, increases integer value by one - - Decrement operator, decreases integer value by one"},{"left":

  • Loops

    Following are the loops used in javascript :\n\n- while\n- do while\n- for\n- for ... in"},{"left":"[While](#5

  • If and Switch

    Types of if and switch are as follows\n\n- if\n- if-else\n- if-else-if\n- switch"},{"left":"if"

  • Functions

    A JavaScript[ function](#54e1ac425a413a0e16092bef) is a block of code designed to perform a particular task."},{"left":"Syntax ","

  • Loop Controls

    There may be a situation when you need to come out of a loop without reaching at its bottom. There may also be a situation when you want to skip a part of your code block and want to start next iteration of the look.\n\nFor this purpose ,we use the following\n\n> - break\n\n> - continue"},{"left":"Break","right":"T

  • Events

    code]\n\n <html> <head> <script type=\"text/javascript\"> function sayHello() { alert(\"Hello World\") } </script> </head> <body> <input type=\"button\"[ onclick=\"sayHello()\"](#54e1b0db5a413a0e16092bf4) value=\"Say Hello\" /> </body> </html>\n\n[/code] "},{"left":"onsubmit ","right":"This event occurs when you try to submit a form.\n\nfor example: [code]&l

  • String and String methods

    The indexOf() method returns the index of (the position of) the first occurrence of a specified text in a string:\n\nexample: [code]var str = \"Please locate where 'locate' occurs!\"; var pos = str.indexOf(\"locate\");\n\n[/code] "},{"left":"lastInde

  • Math

    The Math object allows you to perform mathematical tasks on numbers."},{"left":"random()",

  • Date and Date Methods

    The Date object is a datatype built into the JavaScript language. Date objects are created with the new __Date( ) __and __date methods__ let you get and set date values (years, months, days, minutes, seconds, milliseconds)"},{"left":"ways to initial

  • Arrays

    JavaScript arrays are used to store multiple values in a single variable."},{"left":"Syntax","

  • Cookies

    Cookies are data, stored in small text files, on your computer."},{"left":"contents <

  • Regular Expression

    - A regular expression is a sequence of characters that forms a search pattern.\n- A regular expression can be a single character, or a more complicated pattern.\n- Regular expressions can be used to perform all types of text search and text replace operations."},{"left":"Syntax & Ex

  • Dialog Boxes

    JavaScript supports three important types of dialog boxes.\n\n- Alert\n- Confirmation\n- Prompt"},{"left":"Alert","r

Sign Up Free