JAVASCRIPTProf. AshishSingh Bhatia
Brief History2       December 4, 1995 Netscape and Sun        introduced JavaScript 1.0, called LiveScript.       Netsca...
What is JavaScript3       Interpreted Language       Object-Based       Cross Platform       Loosely Typed       Mult...
Advantage of JavaScript4       An Interpreted Language       Embedded within HTML       Minimal Syntax – Easy to learn ...
Advantage of JavaScript5       Easy Debugging and Testing       Platform Independence / Architectural        Neutral    ...
How to add JS in HTML6    <script language=“javascript”>     Java Script Code    </script>                    Prof. Ashish...
Data Type7       4 primitive data types         Number           Integer, Floating   Number, NaN         Boolean      ...
Creating Variables and Array8       var <variable name> = value;       arrayName = new Array();       arrayName = new A...
Variable Name9       Can Begin with        A  to Z         a to z        _        $       Case Sensitive       vari...
Operator10        Arithmetic Operator         +   , - , * , / , % , ++ , --        Logical Operator          &&,   || ...
Ternary Operator11        Condition ? Value 1 : value 2        Special Operator          delete  : Delete property of a...
Programming Constructs12        Assignment         x = x+y;        Data declaration   var x = 5;        If        Swit...
Programming Constructs13        break        continue        function call         x = abs(y);        return        w...
Functions in JavaScript14        Built-in Function          eval()          paresInt(),   parseFloat()        User Def...
Dialog Boxes15        Alert          Used to display a small textual output with ok           button.        Prompt    ...
Dialog Boxes16        Confirm          Predefinedmessage          OK and Cancel button          OK  passes TRUE to th...
Example of Alert17                   Prof. Ashish Bhatia
Example of Alert18                   Prof. Ashish Bhatia
Example of Alert19                   Prof. Ashish Bhatia
Youtube channel20        http://www.youtube.com/profashish                           Prof. Ashish Bhatia
Slideshare21        http://www.slideshare.net/ashishsinghbhatia                            Prof. Ashish Bhatia
Upcoming SlideShare
Loading in...5
×

Java script

316

Published on

0 Comments
0 Likes
Statistics
Notes
  • Be the first to comment

  • Be the first to like this

No Downloads
Views
Total Views
316
On Slideshare
0
From Embeds
0
Number of Embeds
1
Actions
Shares
0
Downloads
3
Comments
0
Likes
0
Embeds 0
No embeds

No notes for slide

Java script

  1. 1. JAVASCRIPTProf. AshishSingh Bhatia
  2. 2. Brief History2  December 4, 1995 Netscape and Sun introduced JavaScript 1.0, called LiveScript.  Netscape Navigator 2  LiveScript  JavaScript  Microsoft joins in with IE 3 called it Jscript. Prof. Ashish Bhatia
  3. 3. What is JavaScript3  Interpreted Language  Object-Based  Cross Platform  Loosely Typed  Multi Use Language  Client Side interpreted. Prof. Ashish Bhatia
  4. 4. Advantage of JavaScript4  An Interpreted Language  Embedded within HTML  Minimal Syntax – Easy to learn  Quick Development  Design for Simple, Small Programs  Performance  Procedural Capabilities  Designed for Programming User Events Prof. Ashish Bhatia
  5. 5. Advantage of JavaScript5  Easy Debugging and Testing  Platform Independence / Architectural Neutral Prof. Ashish Bhatia
  6. 6. How to add JS in HTML6 <script language=“javascript”> Java Script Code </script> Prof. Ashish Bhatia
  7. 7. Data Type7  4 primitive data types  Number  Integer, Floating Number, NaN  Boolean  True and false [ 1 and 0 ]**  String  Null A null , empty or nonexistent reference  Complex Types like array and objects Prof. Ashish Bhatia
  8. 8. Creating Variables and Array8  var <variable name> = value;  arrayName = new Array();  arrayName = new Array(length);  Index starts with 0  join() and reverse()  length Prof. Ashish Bhatia
  9. 9. Variable Name9  Can Begin with A to Z  a to z _ $  Case Sensitive  variableName Prof. Ashish Bhatia
  10. 10. Operator10  Arithmetic Operator + , - , * , / , % , ++ , --  Logical Operator  &&, || , !  Comparison Operator  == , === , != , !== , < , > , <= , >=  Assignment Operator = , += , -= , *= , /= , %= Prof. Ashish Bhatia
  11. 11. Ternary Operator11  Condition ? Value 1 : value 2  Special Operator  delete : Delete property of an object or an element at an array index  new : Create an instance of an Object type  void : Does not return a value. Prof. Ashish Bhatia
  12. 12. Programming Constructs12  Assignment x = x+y;  Data declaration var x = 5;  If  Switch  While  For  Do while  Label LabelName: Statement Prof. Ashish Bhatia
  13. 13. Programming Constructs13  break  continue  function call x = abs(y);  return  with with(Math){ }  delete delete a[5]  Method Invocation document.write(“Hello”); Prof. Ashish Bhatia
  14. 14. Functions in JavaScript14  Built-in Function  eval()  paresInt(), parseFloat()  User Defined Function function function_name(parameter1, parameter2..) { block of JavaScript Code } Prof. Ashish Bhatia
  15. 15. Dialog Boxes15  Alert  Used to display a small textual output with ok button.  Prompt  Displays a predefined message  Displays a text box and accepts user input  Display ok and cancel button  Ok  text from text box is passed to the program environment  Cancel  passes NULL value to the program environment. Prof. Ashish Bhatia
  16. 16. Dialog Boxes16  Confirm  Predefinedmessage  OK and Cancel button  OK  passes TRUE to the program  Cancel  passes FALSE to the program Prof. Ashish Bhatia
  17. 17. Example of Alert17 Prof. Ashish Bhatia
  18. 18. Example of Alert18 Prof. Ashish Bhatia
  19. 19. Example of Alert19 Prof. Ashish Bhatia
  20. 20. Youtube channel20  http://www.youtube.com/profashish Prof. Ashish Bhatia
  21. 21. Slideshare21  http://www.slideshare.net/ashishsinghbhatia Prof. Ashish Bhatia
  1. A particular slide catching your eye?

    Clipping is a handy way to collect important slides you want to go back to later.

×