JavaScript is a programming language that can be included on web pages to make them more interactive. It can be used to check or modify the contents the contents of forms, change images, open new windows and write dynamic page content. We can use JavaScript with CSS (Cascade Styling Sheets) and DHTML (Dynamic Hypertext Markup Language). These allows you to make your web application attractive.
JavaScript is a client side, interpreted, object oriented, non-blocking io, asynchronous, dynamically typed, event driven, high level scripting language and java is a client side, compiled, object oriented high level language. Now let’s see what these means:
- · Client Side: Programs are passed to the computer that the browser is on, and that computer runs them. The alternative is server side, where the program is run on the server and only the results are passed to the computer that the browser is on. For Examples: PHP, Perl, ASP etc.
- · Interpreted: The program is passed as a source code with all the programming language visible. It is then converted into a machine code while it is being used. Java is actually a dual half compiled (to 'byte code') before it is passed, then executed in a virtual machine which converts it to fully compiled code just before use, in order to execute it on the computer's processor.
- · Scripting: Scripting languages are often used for performing repetitive tasks. Although they may be complete programming languages, they do not usually go into the depths of complex programs, such as thread and memory management. Instead they use another program to do the work and simply tell it what to do.
- · High Level: Programming languages written in words that are as close to English as possible. The contrast would be with assembly code, where each command can be directly translated into machine code
JavaScript Classed and Objects.
When creating classes, we use a constructor function is used with the ‘new’ keyword. When a function is used with a ‘new’ keyword then that function acts as a class. When creation objects we use object literals ({}). These objects are considered as singleton. When ‘new’ keyword is used, new object is created, and I assigned as ‘this’ for the duration of call to the constructor function.
JavaScript also supports static methods and variables.

Comments
Post a Comment