0% found this document useful (0 votes)
114 views5 pages

Aitt MCQ Javascript

JavaScript and Java have similar names because JavaScript's syntax is loosely based on Java. When a web page containing JavaScript is viewed, the user's browser executes the script client-side. Variables in JavaScript are used to store values like numbers and dates. The <script> tag is used to include JavaScript code in an HTML document. Functions in JavaScript can accept parameters and return values.

Uploaded by

Shabbir Saify
Copyright
© © All Rights Reserved
We take content rights seriously. If you suspect this is your content, claim it here.
Available Formats
Download as DOCX, PDF, TXT or read online on Scribd
0% found this document useful (0 votes)
114 views5 pages

Aitt MCQ Javascript

JavaScript and Java have similar names because JavaScript's syntax is loosely based on Java. When a web page containing JavaScript is viewed, the user's browser executes the script client-side. Variables in JavaScript are used to store values like numbers and dates. The <script> tag is used to include JavaScript code in an HTML document. Functions in JavaScript can accept parameters and return values.

Uploaded by

Shabbir Saify
Copyright
© © All Rights Reserved
We take content rights seriously. If you suspect this is your content, claim it here.
Available Formats
Download as DOCX, PDF, TXT or read online on Scribd
You are on page 1/ 5

1. Why so JavaScript and Java have similar name?

A) JavaScript is a stripped-down version of Java


B) JavaScript's syntax is loosely based on Java's
C) They both originated on the island of Java
D) None of these

2) When a user views a page containing a JavaScript program, which machine actually
executes the script?
A ) The User's machine running a Web browser
B ) The Web server
C ) A central machine deep within Netscape's corporate offices
D ) None of these

3) JavaScript is also called server-side JavaScript.


A ) Microsoft B) Navigator
C ) Live Wire D) Native

4) What are variables used for in JavaScript Programs?


A ) Storing numbers, dates, or other values
B ) Varying randomly
C ) Causing high-school algebra flashbacks
D ) None of the above

5) What should appear at the very end of your JavaScript?


The <script LANGUAGE="JavaScript">tag
A ) The</script> B ) The <script>
C ) The END statement D) None of these

6) Which of the following are capabilities of functions in JavaScript?


A ) Return a value B) Accept parameters and Return a value
C ) Accept parameters- D) None of these

7) . ………….. tag is an extension to HTML that can enclose any number of JavaScript
statements.
A ) <SCRIPT> B) <BODY>
C ) <HEAD> D) <TITLE>

8) How does JavaScript store dates in a data object?


A )The number of milliseconds since January 1st, 1970
b ) The number of days since January 1st, 1900
c ) The number of seconds since Netscape's public stock offering.
D ) None of these
..
9. Which of the following attribute can hold the JavaScript version?
A ) LANGUAGE B) SCRIPT
C ) VERSION D) None of these

10. What is the correct JavaScript syntax to write "Hello Worlds"?


A ) System.out.println("Hello World") B) println ("Hello World")
C ) document.write("Hello World") D) response.write("Hello World")
11.Which of the following way can be used to indicate the LANGUAGE attribute?
a) <LANGUAGE="JavaScriptVersion">
b) <SCRIPT LANGUAGE=" JavaScriptVersion">
c) <SCRIPT LANGUAGE="JavaScriptVersion"> JavaScript statements...</SCRIPT>
d) <SCRIPT LANGUAGE=" JavaScriptVersion"!> JavaScript statements...</SCRIPT>

12. What is the correct syntax for referring to an external script called "abc.js"?
A ) <script href= "abc.js"> B ) <script name..." abc.js">
C ) <script src= "abc.js"> D ) None of these

13. Which types of image maps can be used with JavaScript?


A ) Server-side image maps
B ) Client-side images maps
C ) Server-side image maps and Client-side image maps
D ) None of these

14) Java script was invented by


A Dennis ritchi
B Brendan eich
C Niklaus wirth
D Alan cooper

15) Which tag is used to insert a Java script into an HTML page?
A <script= 'java'>
B <Java script>
C <Script>
D <js>

16) Which operator is for "Greater than or equal to"?


A >=
B <=
C >>
D <<

17) Which loop will execute the code block once before checking the condition?
A For loop
B For / in loop
C While loop
D Do while loop

18) The expansion of HTTP is


A High Tele Transfer Protocol
B Hyper Text Telnet Protocol
C Hyper Text Transfer Protocol
D High Text Transfer Protocol

19) Which type is NOT a component of XAMPP?


A Apache
B Oracle
C MySQL
D Perl
20) DOM comprises of................
A document object and its sub objects
B window object and its sub objects
C navigator object and its subobjects
D page object and its sub objects

21) For loop starts with ........


A for (i < = 5; i ++)
B for (i = 0; i < = 5)
C for i =1 to 5
D for (i =0, i <= 5;

22) Java script is a


A assembly language
B high level language
C object oriented language
D object based language

23) Which attribute is use to hold the Java script version?


A SCRIPT
B VERSION
C LANGUAGE
D VER

24) Which operator in Java script is used to test whether the two expressions are not equal?

25) In Java script, the loop which loops through the properties of an object is
A for loop
B for /in' loop
C 'while' loop
D 'do/ while' loop

26) The expansion of FTP is


A Firewall Transfer Protocol
B File Transport Protocol
C File Transfer Protocol
D Firewall Transport Protocol

27) Which one is a component of XAMPP?


A PHP
B Oracle
C: VBA
D Java

28) Which of these comprises browser object model?


A Window object and its sub objects
B Document object and its sub objects
C Navigator object and its sub objects
D Page object and its sub objects

29) In Java script, which operator is used for "OR"?


A
B
C
D

30) Which keyword is used to declare variable in java script?


A Var
B Dim
C ReDIM
D String

31) Now does Java script store dates in objects of data type?
A No. of days since January 151, 1900
B No. of seconds since January lse, 1970
C No. of milli second since January 15`, 1970
D No. of pico second since January 15t, 1970

32). When a user Views a page containing a JavaScript program, which machine actually
Executes the script?
A) The User’s machine running a Web browser
B) The Web server
C) A central machine beep within Netscape’s corporate offices
D) None of these

33) . ------ JavaScript statements embedded in an HTML page can respond to user events
Such as mouse-clicks, form input, and page navigation.
A) Client-side B) Server – side C) Local D) Native

34 . ------- tag is an extension to HTML that can enclose any number of JavaScript
Statements.
A)<SCRIPT> B)<BODY> C)<HEAD> D)<TITLE>

35 What is the correct JavaScript syntax to write “ Hello World”


A)System. Out .println (“Hello World”) B) println (“Hello World”)
C) document. Write (Hello World”) D) response. Write (Hello World”)

36 .What is the correct syntax for referring to an external script called “abc .is “?
A) <script href=” abc. js”> B)<script name=”abc. js ‘’>
C) <script scr =”abc. js”> D)Nome of the m above

37 . JavaScript entities start with -------- and end with ---------------


A) Semicolon, colon B) Semicolon, Ampersand
C) Ampersand. Colon D) Ampersand, semicolon

You might also like