0% found this document useful (0 votes)
109 views

Javascript Test

JavaScript and Java have similar names because JavaScript's syntax is loosely based on Java, though it is a stripped-down version. Client-side JavaScript statements embedded in HTML can respond to user events in the browser, while the server cannot store or send form data with JavaScript alone. Variables in JavaScript are used to store values and functions can accept parameters and return values.

Uploaded by

chittaranjan
Copyright
© © All Rights Reserved
Available Formats
Download as DOCX, PDF, TXT or read online on Scribd
0% found this document useful (0 votes)
109 views

Javascript Test

JavaScript and Java have similar names because JavaScript's syntax is loosely based on Java, though it is a stripped-down version. Client-side JavaScript statements embedded in HTML can respond to user events in the browser, while the server cannot store or send form data with JavaScript alone. Variables in JavaScript are used to store values and functions can accept parameters and return values.

Uploaded by

chittaranjan
Copyright
© © All Rights Reserved
Available Formats
Download as DOCX, PDF, TXT or read online on Scribd
You are on page 1/ 3

Javascript Test

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 the above
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 the above
3. 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
4. _____ 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
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 the above
6. Which of the following can't be done with client-side JavaScript?
A. Validating a form
B. Sending a form's contents by email
C. Storing the form's contents to a database file on the server
D. None of the above
7. 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 the above
8. ______ tag is an extension to HTML that can enclose any number of JavaScript
statements.
A. <SCRIPT>
B. <BODY>
C. <HEAD>
D. <TITLE>
9. 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")
10. Inside which HTML element do we put the JavaScript?
A. <js>
B. <scripting>
C. <script>
D. <javascript>
11. 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 the above
12. Which of the following best describes JavaScript?
A. a low-level programming language.
B. a scripting language precompiled in the browser.
C. a compiled scripting language.
D. an object-oriented scripting language.
13. Which of the following is not considered a JavaScript operator?
A. new
B. this
C. delete
D. typeof
14. Which of the following event fires when the form element loses the focus: <button>,
<input>, <label>, <select>, <textarea>?
A. onfocus
B. onblur
C. onclick
D. ondblclick
15. Scripting language are
A. High Level Programming language
B. Assembly Level programming language
C. Machine level programming language

You might also like