JAVA - J2EE Training Guide

Are You Looking For JAVA/J2EE Online Training ?

Fill in your details in below form, we will get back to you

Powered by Blogger.

Thursday, 13 November 2014

Easy Question on Java Script
  • 1. What is JavaScript ?
JavaScript is a scripting language most often used for client-side web development.
  • 2. What is the difference between JavaScript and Jscript ?
Both JavaScript and Jscript are almost similar. JavaScript was developed by Netscape. Microsoft reverse engineered Javascript and called it JScript.
  • 3. What are the various datatypes in javascript ?
  They are
        1) Number
         2) String
         3) Boolean
         4) Function
         5) Object
         6) Null
         7) Undefined
  • 4. What is this keyword ?
 It refers to the current object.
  • 5. How many looping structures can you find in javascript ?
 If you are a programmer, you know the use of loops. It is used to run a piece of code multiple times according to some particular condition. Javascript being a popular scripting language supports the following loops
                                                       a) for
                                                        b)while
                                                        c)do-while loop
  • 6. What is negative infinity ?
It’s a number in JavaScript, derived by dividing negative number by zero.
  • 7. What is the data type of variables of in JavaScript ?
  All variables are of object type in JavaScript.
  • 8. What is the difference between SessionState and ViewState ?
 View State is specific to a page in a session. Session state refers to user specific data that can be accessed across all pages in the web application.
  • 9. How to Accessing Elements using java script ?
The elements of JavaScript are accessed by their names. By default the browser is accessed by the element ‘windows’ and the page by ‘document’. The corresponding element has user defined names for forms and its elements.
  • 10. What looping structures are there in Java Script ?
 for, while, do-while loops.
  • 11. What does Java Script null mean ?
 The null value is a unique value representing no value or no object.
          It implies no object,or null string,no valid boolean value,no number and no array    object.

  • 12. What does undefined value mean in Java Script ?
 Undefined value means the variable used in the code doesn\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\'t exist or is not assigned any value or the property doesn\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\'t exist.
  • 13. Does Java Script have the concept level scope ?
  No. JavaScript does not have block level scope, all the variables declared inside a function possess the same level of scope unlike c,c++,java.
  • 14. What is the difference between an alert box and a confirmation box ?
  An alert box displays only one button which is the OK button whereas the Confirm box displays two buttons namely OK and cancel.
  • 15. What is a prompt box ?
 A prompt box allows the user to enter input by providing a text box.
  • 16. What are Boolean operators does Java Script support ?
 &&, and !
  • 17. What does Java Script null mean ?
he null value is a unique value representing no value or no object.
         It implies no object,or null string,no valid Boolean value,no number and no array object.

0 comments:

Post a Comment

Note: only a member of this blog may post a comment.