FAQ on Javascript

As I read through multiple blogs on javascript over the past few months, I found the following questions to be one of the most popular ones especially for people who are just starting out their journey in the world of web development. Enjoy 🙂

What Exactly Is JavaScript?:
JavaScript is a programming language used to make web pages interactive. It runs on your visitor’s computer and doesn’t require constant downloads from your website. JavaScript is often used to create polls and quizzes.

Who created Javascript?
JavaScript was created in 10 days in May 1995 by Brendan Eich, then working at Netscape and now of Mozilla. JavaScript was not always known as JavaScript: the original name was Mocha, a name chosen by Marc Andreessen, founder of Netscape.

Are JavaScript and Java the Same?:
No, they are two completely different computer languages. Java and Javascript are similar like Car and Carpet are similar.

What is ECMAScript?
ECMAScript is a subset of JavaScript. JavaScript is basically ECMAScript at it’s core but builds upon it. Languages such as ActionScript, JavaScript, JScript all use ECMAScript as its core. As a comparison, AS/JS/JScript are 3 different cars, but they all use the same engine… each of their exteriors is different though, and there have been several modifications done to each to make it unique.

What Do I Need to Run JavaScript?:
JavaScript support is built right into all the major web browsers, including Internet Explorer, Firefox and Safari. Provided that the visitors to your site are using web browsers that support JavaScript (most do) and have JavaScript enabled (it is by default), then your JavaScript will run when they visit the page.

Do I Need to Learn Javascript to Be Able to Use It?:
No. There are plenty of pre-written JavaScripts that people have made available for you to plug straight into your web page. All you need to know to be able to use such scripts is how to paste the supplied code into the required places in your web page.

Can I Use HTML Instead of JavaScript?:
No. HTML and JavaScript are two completely different things. HTML is a markup language designed for defining static web page content. JavaScript is a programming language designed for performing dynamic tasks. Sometimes the distinction is confusing because JavaScript code can go in the same file as HTML.

Can I Use PHP or Some Other Server-Side Language Instead of JavaScript?:
Perhaps. It depends where the code needs to run. If it can run before the page loads, you can use a server-side language. If it has to run after the page has loaded, then you must use JavaScript, as this is the only scripting language supported by all web browsers that support client-side scripting.

Does the Javascript Go in the Same File as the HTML?:
It can, but your scripts will be more easily reused on multiple pages of your site if you place them in separate files. (Using a .JS extension helps identify them as Javascript.) You then just link the JavaScript to your HTML by inserting a <script> tag. The same JavaScript can then be added to several pages just by adding the appropriate tag into each of the pages to set up the link.

Is Javascript Object-oriented?
JavaScript is a prototype-based programming language (probably prototype-based scripting language is more correct definition). It employs cloning and not inheritance. A prototype-based programming language is a style of object-oriented programming without classes. While object-oriented programming languages encourages development focus on taxonomy and relationships, prototype-based programming languages encourages to focus on behavior first and then later classify.

Advertisements

Published by

gradgospels

I am a Software Engineer by profession. I'm ever curious to find the latest technology in the field and put it to good use. Quite a bit of my free time goes to learn different tools and technology.I enjoy development for Linux, building/leading teams, and contributing to different open source projects. Even though I have a very wide range of interests when it comes to build software, my current focus is on Frontend development. I am thrilled to work with HTML,CSS,JS, JQuery and Ajax like concepts. I also love to read, write, travel and cook.

Leave a Reply

Fill in your details below or click an icon to log in:

WordPress.com Logo

You are commenting using your WordPress.com account. Log Out / Change )

Twitter picture

You are commenting using your Twitter account. Log Out / Change )

Facebook photo

You are commenting using your Facebook account. Log Out / Change )

Google+ photo

You are commenting using your Google+ account. Log Out / Change )

Connecting to %s