Which of the following is correct about features of JavaScript?
It can not Handling dates and time.
JavaScript is a object-based scripting language.
JavaScript is not interpreter based scripting language.
All of the above
The main purpose of a “Live Wire” in NetScape is to
Create linkage between client side and server side
Permit server side, JavaScript code, to connect to RDBMS
Support only non relational database
To interpret JavaScript code
Conditional Operator shown in the following example is _____________.
marks = (mark<35)?"Fail":"Pass";
Unary Operator
Binary Operator
Ternary Operator
None Of These
Adding String and Integer always results in _________.
Character
Integer
String
None of these
All modern browsers supports JS.
False
True
JavaScript is Case Sensitive !!Say True or False
Which of the following is considered as End of Single line comment ?
End of Line
Semicolon
End of Statement
"*/" Symbol
Which of the following operators not comes under assignment Operator ?Select all possible options.
=
%=
==
+=
Which of the following is not considered as an error in JavaScript?
Syntax error
Missing of semicolons
Division by zero
All of the mentioned
Which of the following is not a compound assignment operator.
===
>>=
_______ class provides an interface for invoking JavaScript methods and examining JavaScript properties.
ScriptObject
JSObject
JavaObject
Jobject
The “var” and “function” are
Keywords
Declaration statements
Datatypes
Prototypes
Variable declared outside JavaScript Function is called as _______________ .
Global Variable
Local Variable
Why so JavaScript and Java have similar name?
JavaScript is a stripped-down version of Java
JavaScript's syntax is loosely based on Java's
They both originated on the island of Java
None of the above
JavaScript is invented by ________.
Brendan Eich
Helsinki, Linus
W3 Group
James Gosling
The syntax of capture events method for document object is ______________
captureEvents()
captureEvents(args eventType)
captureEvents(eventType)
captureEvents(eventVal)
Variable can hold ________ value at a time
Single
Multiple
Double
During addition of two numbers , suppose one of the number is NaN then output of the following code will be ?
NaN
Zero
Infinite
Null
<script type="text/javascript"> var name; name = "Pritesh"; </script> <script type="text/javascript"> document.write(name); </script>
What will be the output of the following ?
Nothing will be printed
Error
Pritesh
<!DOCTYPE html> <html> <body> <script> var x = "5"; var y = 6; var z = x + y; document.write(x + "<br>"); document.write(y + "<br>"); document.write(z + "<br>"); </script> </body> </html>
Guess output of the following code.
5 6 11
5 6 10
5 6 56
None of These
The syntax of Eval is ________________
[objectName.]eval(numeri).
[objectName.]eval(string)
[EvalName.]eval(string)
[EvalName.]eval(numeri).
Which was the first browser to support JavaScript ?
Mozilla Firefox
Google Chrome
IE
Netscape
Is it possible to nest functions in JavaScript?
Which of the following way can be used to indicate the LANGUAGE attribute?
JavaScript statements…
The escape sequence ‘f’ stands for
Floating numbers
Representation of functions that returns a value
f is not present in JavaScript
Form feed
Which company developed JavaScript?
Bell Labs
Sun Microsystems
IBM
JavaScript is ______ Side Scripting Language.
Server
ISP
Browser
____________ is used to assign value to the variable.
Assignment Statement
Declaration Statement
Conditional Statement
Executable Statement
var num;
Above Statement is called as __________ Statement.
Instantization
Globalization
Declaration
Initialization
What type of value gets printed if we add following two variables.
var a = "1"; var b = 5;
Long
Number
Text
JS Comment can be used for following purposes
to Hide Non-usable line.
to Hide Non-usable Multiline Code
used for Documentation
All of these
<script type="text/javascript"> var s = "9123456 or 80000?"; var pattern = /\d{4}/; var output = s.match(pattern); document.write(output); </script>
What is the output?
9123
91234
80000
What is mean by "this" keyword in javascript?
It refers current object
It referes previous object
It is variable which contains value
In March 1996, _______________ was released, featuring support for JavaScript.
Netscape Navigator 1.0
Internet Explorer 2.0
Netscape Navigator 2.0
Internet Explorer 1.0
"++" can operate only on ________________.
Constants
Variables
<script src="../main.js"></script>
This code will include External JS inside your webpage.
No
Yes
JavaScript is also called as _____________.
Server Side Scripting Language
Browser/Client Side Scripting Language.
Not a Client Side Scripting Language.
Which is a more efficient code snippet ?
Code 1 :
for(var num=10;num>=1;num--) { document.writeln(num); }
Code 2 :
var num=10; while(num>=1) { document.writeln(num); num++; }
Code 1
Code 2
Both Code 1 and Code 2
Cannot Compare
Which of the following function of String object returns a string representing the specified object?
toLocaleUpperCase()
toUpperCase()
toString()
substring()
Which of the following function of Array object applies a function simultaneously against two values of the array (from right-to-left) as to reduce it to a single value?
pop()
push()
reduce()
reduceRight()
Single Line Comment Starts with _________ Symbol.
"\"
"//"
"$$"
"#"
-Infinity in JS gets added with -Infinity then output of the code will be.
+Infinity
-Infinity
Is this correct syntax to include JS Code inside HTML Page ?
<script type="text/javascript"> ... </script>
In JavaScript, Window.prompt() method return true or false value ?
Local Variables are destroyed after execution of function.
Which JavaScript variable cannot be used as First character but can be use after first character ?
Asterisk
Dollar Sign
Underscore
Digit
JavaScript Code is written inside file having extension __________.
.jvs
.javascript
.js
.jsc
Variable declared inside JavaScript Function will be called as ____________.
Global Variables
Local Variables
The output for the following code snippet would most appropriately be
var a=5 , b=1 var obj = { a : 10 } with(obj) { alert(b) }
10
1
5
Local Variables are Destroyed as soon as ______________.
Control comes outside the method
User closes the browser
Page gets completely loaded
When you assign a text value to a variable, we put text value in the pair of _________.
Single/Double Quote
Square Bracket
<!DOCTYPE html> <html> <body> <script> var x = 5; var y = 6; var z = 5 + 6; document.write(x + "<br>"); document.write(y + "<br>"); document.write(z + "<br>"); </script> </body> </html>
JavaScript is _________ language.
Programming
Application
Scripting
JavaScript is a _______________ language
Object-Oriented
High-level
Assembly-language
Object-Based
Person XYZ wrote his name and date of code creation at the start , What kind of comment he has written ?
Functional Comment
Code Hiding Comment
Documentation Comment
JavaScript is ideal to
make computations in HTML simpler
minimize storage requirements on the web server
increase the download time for the client
none of the mentioned
Which of the following event fires when the form element loses the focus: , , , , ?
onfocus
onblur
onclick
ondblclick
It is good to include JS code inside footer section in order to speed up the Page loading time of Webpage.
Guess the ternary operator used in the following example !!!
Conditional Operator
Logical Operator
Bitwise Operator
Colon Operator
Integer Variable is declared using following syntax in JavaScript.
Integer num;
int num;
integer num;
Java Script have following type of Comment(s) -
Single Line Comment/Multiple Line Comments
Enhanced Comments
HTML Style Comment
All the Above
The syntax of close method for document object is ______________
Close(do)
Close(object)
Close(val)
Close()
If para1 is the DOM object for a paragraph, what is the correct syntax to change the text within the paragraph?
"New Text"?
para1.value="New Text";
para1.firstChild.nodeValue= "New Text";
para1.nodeValue="New Text";
-Infinity in JS gets added with +Infinity then output of the code will be.
"++" is __________ type of operator.
Ternary
Binary
Unary
function message() { var name = "Pritesh"; alert(name); }
Variable declared above is example of ___________ Variable.
Global
Local
Choose the client-side JavaScript object?
Database
Cursor
Client
FileUpLoad
Choose the server-side JavaScript object?
Function
File
Date
The syntax of a blur method in a button object is ______________
Blur()
Blur(contrast)
Blur(value)
Blur(depth)
JavaScript code contain sequence of ___________.
HTML Tags
Method Calls
Executable Statements
<!DOCTYPE html> <html> <body> <script> var num1 = 1; var num2 = 1; var num3 = "1" + num1 + num2; document.write(num1 + "<br>"); document.write(num2 + "<br>"); document.write(num3 + "<br>"); </script> </body> </html>
1 1 3
1 1 12
1 1 111
/* This is Simple Comment */
This is the example of ____________ Comment.
Single Line Comment
Multiple Line Comment
<script type="text/javascript"> { document.write("<h1>This is a heading</h1>"); document.write("<p>This is a paragraph.</p>"); document.write("<p>This is another paragraph.</p>"); } </script>
HTML Tags are allowed inside JS. Is this error free code ?
Why JavaScript is called as Lightweight Programming Language ?
because JS is available free of cost.
because JS is client side scripting
because we can add programming functionality inside JS
because JS can provide programming functionality inside but up to certain extend.
<script> document.write(navigator.appCodeName); </script>
get code name of the browser of a visitor
set code name of the browser of a visitor
A conditional expression is also called a
Alternate to if-else
Immediate if
If-then-else statement
None of the mentioned
The enumeration order becomes implementation dependent and non-interoperable if :
If the object inherits enumerable properties
The object does not have the properties present in the integer array indices
The delete keyword is never used
Object.defineProperty() is not used
Which of the following is the structure of an if statement?
if (conditional expression is true) thenexecute this codeend if
if (conditional expression is true)execute this codeend if
if (conditional expression is true) {//Code Here}
if (conditional expression is true) then {//Code Here}
We can declare ___________ at a time. Select most appropriate option.
One Variable Only
More than One Variables
One or more Variables
What does the tag do?
Enclose text to be displayed by non-JavaScript browsers.
Prevents scripts on the page from executing.
Describes certain low-budget movies.
<script type="text/javascript"> x=4+"4"; document.write(x); </script>
What is the output.?
44
8
4
Error output
How to create a Date object in JavaScript?
dateObjectName = new Date([parameters])
dateObjectName.new Date([parameters])
dateObjectName := new Date([parameters])
dateObjectName Date([parameters])
JavaScript Code can be called by using _________.
Triggering Event
RMI
Preprocessor
None Of thease
What is the correct syntax for referring to an external script called " abc.js"?
Which of the following statement is used to declare variable in JavaScript ?
Java Statement terminated by ______________ ,
Slash
Full Stop
Comma
"Add and Assignment" operator is shown by this symbol.
+==
==+
=+
The generalised syntax for a real number representation is
[digits][.digits][(E|e)[(+|-)]digits].
[digits][+digits][(E|e)[(+|-)]digits].
[digits][(E|e)[(+|-)]digits].
[.digits][digits][(E|e)[(+|-)]digits].
If a string cannot be converted to a number __________ will be returned.
Which of the following function of Array object returns the last (greatest) index of an element within the array equal to the specified value, or -1 if none is found?
indexOf()
join()
lastIndexOf()
map()
Microsoft Developed a compatible dialect of JavaScript called _____________.
JScript.
MS JavaScript
MJavaScript
Advanced JavaScript
JavaScript entities start with _______ and end with _________.
Semicolon, colon
Semicolon, Ampersand
Ampersand, colon
Ampersand, semicolon
In the below notation, Employee is of type { “Employee”: [ “Amy”, “Bob”, “John” ] }
Not a valid JSON string
Array
Class
Object
A ________ object is a reference to one of the classes in a Java package, such as netscape.javascript .
JavaArray
JavaClass
JavaPackage
______method evaluates a string of JavaScript code in the context of the specified object.
Eval
ParseInt
ParseFloat
Efloat
Comment Statement is _________________ type of statement.
Executive
Non Important
Non Executable
Non Usable
Underscore can be used as first letter while declaring variable in JavaScript.
When an empty statement is encountered, a JavaScript interpreter
Ignores the statement
Prompts to complete the statement
Throws an error
Throws an exception
JavaScript Statement may contain HTML Tags. Say True/False.
When a user views a page containing a JavaScript program, which machine actually executes the script?
The User's machine running a Web browser
The Web server
A central machine deep within Netscape's corporate offices