Friday, 1 September 2017

JavaScript Questions

Java script can be used for Storing the forms contents to a database file on the server


True   
False   
Both   
None of above    


2


``````````````````````````````````````````````````````````````````````````````````````````````````````


Java Script supports all boolean operators   


True   
False   
Both   
None of these   


2




``````````````````````````````````````````````````````````````````````````````````````````````````````
JavaScript ignores extra spaces   


True   
False   
Both   
None of these   


1




``````````````````````````````````````````````````````````````````````````````````````````````````````


Which machine actually executes the Java Script?   


The web server   
The machine which is running a web browser   
Java Script engine   
Both A and C   


2


``````````````````````````````````````````````````````````````````````````````````````````````````````


How does Java Script store dates in objects of Date type?   


The number of days since January 1st, 1900   
The number of seconds since January 1st, 1970   
The number of milliseconds since January 1st, 1970   
The number of picoseconds since January 1st, 1970   


3


``````````````````````````````````````````````````````````````````````````````````````````````````````


Which attribute needs to be changed to make elements invisible?   


visibilty   
visible   
invisibility   
invisible   


1


``````````````````````````````````````````````````````````````````````````````````````````````````````
Which of the following statements are false for Java script?   


JavaScript can react to events   
JavaScript can read and write HTML elements   
JavaScript cannot be used to create cookies   
Both b and c above   


3


``````````````````````````````````````````````````````````````````````````````````````````````````````


Why so Java and JavaScript have similar name?   


Java Script is a stripped-down version of Java   
The syntax of JavaScript is loosely based on Java syntax   
They both support Object Oriented Programming   
None of the above   


2


``````````````````````````````````````````````````````````````````````````````````````````````````````


Which of the following method is used to evaluate a string of Java Script code in the context of the specified object?   


Eval   
ParseDoule   
ParseObject   
Efloat   


1


``````````````````````````````````````````````````````````````````````````````````````````````````````
 What is the purpose of <noscript> tag in Java Script?   


Prevents scripts on the page from executing.
   
Enclose text to be displayed by non-JavaScript browsers    Suppresses the result to be displayed on the web page
   
None of the above   


2


``````````````````````````````````````````````````````````````````````````````````````````````````````
Which of the ways below is incorrect of instantiating a date?   


new Date(dateString)   
new Date()   
new Date(seconds)   
new Date(year, month, day, hours, minutes, seconds, milliseconds)   


3


``````````````````````````````````````````````````````````````````````````````````````````````````````
To insert a JavaScript into an HTML page, which tag is used?   


< script=java>   
< javascript>   
< script>   
< js>   


3


``````````````````````````````````````````````````````````````````````````````````````````````````````
What language defines the behavior of a web page?   


HTML   
CSS   
XML   
JAVA SCRIPT   


4


``````````````````````````````````````````````````````````````````````````````````````````````````````
Which of the following is correct to write Hello World on the web page?   


System.out.println(Hello World)   
print(“Hello World”)   
document.write(Hello World)   
response.write(Hello World)   


3


``````````````````````````````````````````````````````````````````````````````````````````````````````
What java wrapper type is created when a JavaScript object is sent to Java?   


ScriptObject   
JavaObject   
Jobject   
JSObject   


4


``````````````````````````````````````````````````````````````````````````````````````````````````````
File is a server-side JavaScript object?   


True   
False   
Both   
None of these   


1


``````````````````````````````````````````````````````````````````````````````````````````````````````
If we don’t want the script to write page content, under which HTML tag should the JS tag be placeD?   
< body>   
< head>   
Any of a and b above   
Both b and c above   


1


``````````````````````````````````````````````````````````````````````````````````````````````````````
Which of the following is a server-side Java Script object?   


Function   
File   
FileUpload   
Date   


2


``````````````````````````````````````````````````````````````````````````````````````````````````````
C-style block-level scoping is not supported in Java script   


True   
False   
Both   
None of these   


1


``````````````````````````````````````````````````````````````````````````````````````````````````````
Which of the following syntax is correct to refer an external script called formValidation.js?   


< script href = formValidation.js>   
< script source = formValidation.js>   
< script name = formValidation.js>   
< script src = formValidation.js>   


4


``````````````````````````````````````````````````````````````````````````````````````````````````````
Which of the following is used to capture all click events in a window?   


window.captureEvents(Event.CLICK);   
window.routeEvents(Event.CLICK );   
window.handleEvents (Event.CLICK);   
window.raiseEvents(Event.CLICK );   


1


``````````````````````````````````````````````````````````````````````````````````````````````````````


What is the alternate name for Java script?   


LimeScript   
Both a and d   
ECMScript   
ECMAScript   


4


``````````````````````````````````````````````````````````````````````````````````````````````````````
Which of the following statements are true for Java script?   


JavaScript is case sensitive   
JavaScript statements can be grouped together in blocks   
semicolon at the end of statement is mandatory   
Both a and b above   


4


``````````````````````````````````````````````````````````````````````````````````````````````````````
Is it possible to declare a variable in Javascript along its type?   


Yes   
No    
Both   
None of these   


2


``````````````````````````````````````````````````````````````````````````````````````````````````````
Java Script entities start with ____________ and end with ______________   


Semicolon, colon   
Semicolon, Ampersand   
Ampersand, colon   
Ampersand, semicolon   


4





































No comments:

Post a Comment

Code

<html> <head> <title>Implimentation</title> <script type="text/javascript"> fu...