Basic And Variables Questions MCQs


basic and variables Questions

Total Questions : 82

Page 1 of 5 pages
Question 1. The development environment offers which standard construct for data validation
  1.    Super controlled loop constructs
  2.    Case sensitivity check
  3.    Validation constructs
  4.    All of the mentioned
Answer: Option D
Question 2. The main purpose of a “Live Wire” in NetScape is to
  1.    Create linkage between client side and server side
  2.    Permit server side, JavaScript code, to connect to RDBMS
  3.    Support only non relational database
  4.    To interpret JavaScript code
Answer: Option B
Question 3. The script tag must be placed in
  1.    head
  2.    head and body
  3.    title and head
  4.    all of the mentioned
Answer: Option B
Question 4. JavaScript is ideal to
  1.    make computations in HTML simpler
  2.    minimize storage requirements on the web server
  3.    increase the download time for the client
  4.    none of the mentioned
Answer: Option B
Question 5. A JavaScript program developed on a Unix Machine
  1.    will throw errors and exceptions
  2.    must be restricted to a Unix Machine only
  3.    will work perfectly well on a Windows Machine
  4.    will be displayed as a JavaScript text on the browser
Answer: Option C
Question 6. Which attribute is used to specify that the script is executed when the page has finished parsing ( only for external scripts )
  1.    parse
  2.    a sync
  3.    defer
  4.    type
Answer: Option C
Question 7. JavaScript Code can be called by using
  1.    RMI
  2.    Triggering Event
  3.    Preprocessor
  4.    Function/Method
Answer: Option D
Question 8. JavaScript can be written
  1.    directly into JS file and included into HTML
  2.    directly on the server page
  3.    directly into HTML pages
  4.    all of the mentioned
Answer: Option A
Question 9. Which of the following Attribute is used to include External JS code inside your HTML Document
  1.    src
  2.    ext
  3.    script
  4.    link
Answer: Option A
Question 10. A proper scripting language is a
  1.    High level programming language
  2.    Assembly level programming language
  3.    Machinen level programming language
  4.    Low level programming language
Answer: Option A
Question 11. JavaScript Code can be called by using
  1.    RMI
  2.    Triggering Event
  3.    Preprocessor
  4.    Function/Method
Answer: Option D
Question 12. The type of a variable that is volatile is
  1.    Volatile variable
  2.    Mutable variable
  3.    Immutable variable
  4.    Dynamic variable
Answer: Option B
Question 13. The generalised syntax for a real number representation is
  1.    [digits][.digits][(E|e)[(+|-)]digits]
  2.    [digits][+digits][(E|e)[(+|-)]digits]
  3.    [digits][(E|e)[(+|-)]digits]
  4.    [.digits][digits][(E|e)[(+|-)]digits]
Answer: Option A
Question 14. When there is an indefinite or an infinity value during an arithmetic value computation, javascript
  1.    Prints an exception error
  2.    Prints an overflow error
  3.    Displays “Infinity”
  4.    Prints the value as such
Answer: Option C
Question 15. Which of the following is not considered as an error in JavaScript?
  1.    Syntax error
  2.    Missing of semicolons
  3.    Division by zero
  4.    All of the mentioned
Answer: Option C
Question 16. The escape sequence ‘f’ stands for
  1.    Floating numbers
  2.    Representation of functions that returns a value
  3.    f is not present in JavaScript
  4.    Form feed
Answer: Option D
Question 17. The snippet that has to be used to check if “a” is not equal to “null” is
  1.    if(a!=null)
  2.    if (!a)
  3.    if(a!null)
  4.    if(a!==null)
Answer: Option D
Question 18. Assume that we have to convert “false” that is a non-string to string. The command that we use is (without invoking the “new” operator)
  1.    false.toString()
  2.    String(false)
  3.    String newvariable=”false”
  4.    Both false.toString() and String(false)
Answer: Option D
Question 19. The statement a===b refers to
  1.    Both a and b are equal in value, type and reference address
  2.    Both a and b are equal in value
  3.    Both a and b are equal in value and type
  4.    There is no such statement
Answer: Option C
Question 20. Consider the following snippet code
var string1 = ”123”;
var intvalue = 123;
alert( string1 + intvalue )
  1.    123246
  2.    246
  3.    123123
  4.    Exception
Answer: Option C