javascript interview questions (JNNC Technologies)



1) What is JavaScript?

JavaScript is a scripting language. It is different from Java language. It is object-based, lightweight and cross platform. It is widely used for client side validation. More details...

2) What is the difference between JavaScript and jscript?

Netscape provided the JavaScript language. Microsoft changed the name and called it JScript to avoid the trademark issue.In other words, you can say JScript is same as JavaScript, but it is provided by Microsoft.

3) How to write a hello world example of JavaScript?

A simple example of JavaScript hello world is given below. You need to place it inside the body tag of html.
  1. <script type="text/javascript">  
  2. document.write("JavaScript Hello World!");  
  3. </script>  
More details...

4) How to use external JavaScript file?

I am assuming that js file name is message.js, place the following script tag inside the head tag.
  1. <script type="text/javascript" src="message.js"></script>  
More details...

5) Is JavaScript case sensitive language?

Yes.

6) What is BOM?

BOM stands for Browser Object Model. It provides interaction with the browser. The default object of browser is window.

0 Comments

'; (function() { var dsq = document.createElement('script'); dsq.type = 'text/javascript'; dsq.async = true; dsq.src = '//' + disqus_shortname + '.disqus.com/embed.js'; (document.getElementsByTagName('head')[0] || document.getElementsByTagName('body')[0]).appendChild(dsq); })();