What is JavaScript? Introduction to JavaScript

What is JavaScript ? If you have used Browsers for Internet Browsing then you must have definitely seen the option of Enable Javascript . Then it must have come to your mind that what is this JavaScript and why is it necessary to enable it.

By the way, to understand it in easy words, we can say that JavaScript is not a core programming language but it is a Scripting language . It is mainly used in Browsers and is used only with HTML or CSS . There are many features of this that we will learn in the article further.

Often people do not know the difference between JavaScript and Java and start thinking both of them the same. Well it does not happen at all. These two language are completely different.

So today I thought that why should not people give you complete information about using JavaScript and its advantages, then no more dilemma will arise in your mind. Then without delay, let's start and know about JavaScript





What is JavaScript?

JavaScript is a very commonly used client side scripting language. Or we can say it is used in all major web browsers.

It has the largest library ecosystem of any programming language. Since it is a scripting language, its code can also be written in an HTML page.

So when a user requests HTML page, in which a JavaScript is present, then this script is sent to the browser and it depends on the browser what it wants to do with it.

By the way, there is no relation of JavaScript with Java . Just because Java is used in its name, JavaScript is called: The World's Most Misunderstood Programming Language.

JavaScript Official Named as ECMAScript defined under Standard ECMA-262.


What are JavaScript's frameworks?

The frameworks that are used most often are React JS, Angular JS, Create JS, jQuery , nodeJS etc.


Introduction to JavaScript

JavaScript is one of the 3 languages ​​that all web developers must learn from, let's also know about those three languages.

  1. HTML is used to define the content of web pages .
  2. CSS is used to specify the layout of web pages.
  3. JavaScript is used to program the Behavior of Web Pages.
  4. Web pages are not the only place where JavaScript is used. JavaScript is also used in many desktop and server programs.

Node.js is such a program, which is used in  some databases, such as MongoDB and CouchDB , JavaScript is used according to their programming language. and Node.js is used to hack your device also..

What is JavaScript Language?

JavaScript is not a programming language only if we talk in the strict sense. Rather it is a scripting language because it instructs the browser to do all the dirty work in the background.

If you command to replace an image with another, JavaScript tells the browser to do so. Because the browser actually does all the work, you only have to write a few codes in this scripting language so that the browser can do all your work.

This is why JavaScript is a very easy language for beginners.

Difference between java and JavaScript:

Often people think that there is no difference between Java and JavaScript. But in reality Java is Different and JavaScript is different. So let's know about the difference between these two.


By the way, the names of these two are very swinging, which create a doubt in the minds of the people. Where JavaScript is primarily used as a scripting language in HTML pages, Java is a real programming language used entirely in other work.

Java can be a bit difficult to learn. It was developed by Sun Microsystem for use in all the things where computing power was needed.

JavaScript was developed by Brendan Eich , who used to work in Netscape at the time, he developed it on the basis of a client side scripting language (although there is no fundamental reason why it is in a server side environment Cannot be used).

Originally the name of this language was Live Script , but Java was very popular when it was about to be released. Therefore, at the last possible moment, Netscape changed its name to "JavaScript".

Both Java and JavaScript are native to C and C ++ , but these languages ​​operate in a completely different way from their ancestors. Both languages ​​are object oriented yes and they also share some similar syntax. But there are more differences compared to similarities.


Advantage and Disadvantages of JavaScript

Like other computer languages, JavaScript also has some advantages and disadvantages. Where earlier it was limited to only a few tasks, nowadays it is used in many tasks.

 Benefits of JavaScript

  1. Speed - Client-side JavaScript is very fast because it runs immediately in the client-side browser. As long as outside resources are required, JavaScript remains completely unhindered from network calls to a backend server.

    There is no need for it to be compiled in the client side, so that it gives some speed advantages.

  2. Simplicity - JavaScript is very simple to learn as well as implement.
  3. Popularity - JavaScript is used throughout the web. Along with this, there are many resources on the internet to learn it.

    StackOverflow and GitHub are two such big websites from where you can learn everything about JavaScript.

  4. Interoperability - JavaScript is easily compatible with other languages, with it being used in many applications. Unlike PHP and SSI scripts, JavaScript can be easily inserted into any web page.

    JavaScript can also be used within other scripts that are written in different languages ​​such as Perl and PHP.

  5. Server Load - Due to these being used on the client-side , its demand in the website server decreases.
  6. Rich interfaces - Being drag, or drop components or slider, it gives your website a rich interface.
  7. Versatility - Right now JavaScript is being used in many servers as well. JavaScript is used in the front-end to the client server, as well as a complete entire JavaScript app can be created right now from front to back only with the help of JavaScript.


Disadvantage of JavaScript

  1. Client-Side Security - Since this code is executed from the users' computer, so in some cases it can also be exploited for malicious purposes. This is the main reason for which some people like to disable JavaScript more.
  2. Browser Support - JavaScript is sometimes interpreted differently in different browsers. While server-side scripts always produce the same type of output, the output of client-side scripts is slightly unpredictable.

By the way, this is not a big problem because as long as they are working properly in big and popular browsers, then everything is safe.



How to enable JavaScript

Right now almost all web pages have JavaScript, it is a scripting programming language that runs in the visitor's web browser .

This makes web pages functional for specific purposes, while if it is disabled for some reasons then, the content of web page or its functionality also becomes limited or unavailable.

So let's know how to enable JavaScript in different browsers: -

In Google Chrome

  •  In the menu of your web browser, click " Customize and control in Google Chrome " and select " Settings ".
  •  In the " Settings " section, click on " Show advanced settings… ".
  • While under " Privacy ", click "Content settings." In.
  • When the dialog window is open, you have to see the " JavaScript " section and select " Allow all sites to run JavaScript (recommended) ".
  • Then click “ OK ” button to close it.
  • Then Close “ Settings ” tab .
  • Click " Reload this page " button in your web browser so that the page will be refreshed.

In Mozilla Firefox 

  • In its address bar, type about: config and press Enter.
  • Click " I'll be careful, I promise " if any warning message appears in front of you.
  • While on the search box, search javascript.enabled
  • Then Toggle the " javascript.enabled " preference (right-click and select "Toggle" or double-click the preference) which you can change its value from "false" to "true".
  • Click on the " Reload current page " button with the web browser, from which you can refresh the page.

In Opera

  • Click Opera icon "Menu" and then "Settings".
  • Click on “Websites” and choose  “Allow all sites to run JavaScript (recommended)
  • Click on the "Reload" button to refresh that page in the web browser.

In Apple Safari

  • Click " Edit " in your web browser menu and select " Preferences ".
  • On the " Preferences " window, select "Security" tab.
  • After this , mark the " Enable JavaScript " checkbox on the " Web content " in the " Security " tab section .
  • Click " Reload the current page " button in the web browser so that you can refresh the page.

Conclusion

I hope you have liked this article, what is JavaScript. It has always been my endeavor to provide complete information to the readers about the difference between Java and JavaScript, so that they do not have to search in other sites or internet in the context of that article.

This will also save their time and they will also get all the information in one place. If you have any doubts about this article or you want that there should be some improvement in it, then for this you can write below comments.

Post a Comment