Colour of the JavaScript

Introduction:

javascript is the scripting and programming language that can use to do web related things mostly.using javascript we can do more complex things in web pages easily. basically using HTML(markup language) and CSS(Styling)we can’t get dynamic content. If we can get the output as dynamic content to do so we have to use Javascript using that displaying timely updated pages, interactive maps and so on due to javascript.

as Web layer Javascript act as 3rd Layer of the Layer Cake.

Java and JavaScript  :


These two are Completely different Languages, Key differences between Java and JavaScript


Java is an OOP programming language while JavaScript is an OOP scripting language. 

Java creates applications that run in a virtual machine or browser while JavaScript code is run on a browser only. 

Java code needs to be compiled while JavaScript code is all in the text.





How we add Javascript to HTML?


simply using <script> tag we can add those into HTML pages.



There are 3 ways of adding  such that 

                                                 (i)  Internal   javascript

                                                 (ii) External  javascript

                                                 (iii) Inline javascript handlers 


Javascript is the Client-Side Language :


You might also hear the terms server-side and client-side code, 


especially in the context of web development. Client-side code is code that is run on the user’s computer –>>when a web page is viewed, the page’s client-side code is downloaded, then run and displayed by the browser.

Advantages

  • Speed. Client-side JavaScript is very fast because it can be run immediately within the client-side browser. Unless outside resources are required, JavaScript is unhindered by network calls to a backend server.
  • Simplicity. JavaScript is relatively simple to learn and implement.
  • Versatility
  • Rich interfaces. Drag and drop components or slider may give a rich interface to your website.

Disadvantages

  • Client-Side Security. Because the code executes on the users’ computers, in some cases it can be exploited for malicious purposes. This is one reason some people choose to disable Javascript.
  • Browser Support. JavaScript is sometimes interpreted differently by different browsers. Whereas server-side scripts will always produce the same output, client-side scripts can be a little unpredictable. Don’t be overly concerned by this though – as long as you test your script in all the major browsers you should be safe. Also, there are services out there that will allow you to test your code automatically on check-in of an update to make sure all browsers support your code.

Leave a comment