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

Opt-1 Opt-2 Opt-3

The document contains a quiz about JavaScript concepts including variable naming, data types, operators, and syntax. It covers topics such as creating arrays and objects, if/else statements, and integrating JavaScript with HTML. The multiple choice questions test knowledge of JavaScript fundamentals like syntax, built-in objects, and how to incorporate scripts into web pages.

Uploaded by

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

Opt-1 Opt-2 Opt-3

The document contains a quiz about JavaScript concepts including variable naming, data types, operators, and syntax. It covers topics such as creating arrays and objects, if/else statements, and integrating JavaScript with HTML. The multiple choice questions test knowledge of JavaScript fundamentals like syntax, built-in objects, and how to incorporate scripts into web pages.

Uploaded by

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

Question Opt-1 Opt-2 Opt-3

  JavaScript is a   JavaScript's syntax   They both


Why so JavaScript and Java have similar stripped-down is loosely based on originated on the
name? version of Java Java's island of Java
______ JavaScript is also called client-side
JavaScript.   Microsoft C.  LiveWire B.  Navigator

  
Which of the following is not a valid _first_and_last_name
JavaScript variable name?   2names s   FirstAndLast

<script type="text/javascript">var s =
"9123456 or 80000?";var pattern =
/\d{4}/;var output =
s.match(pattern);document.write(output);
</script> 9123 91234 80000
<script language="javascript">function x()
{document.write(2+5+"8");}</script> 258 Error 7

High Level Assembly Level Machine level


Programming programming programming
Scripting language are language language language

<script
type="text/javascript">x=4+"4";document.
write(x);</script>Output------? 44 8 4

    
To automatically open the console when a   user_pref(" user_pref("javascript user_pref("javascript
JavaScript error occurs which of the javascript.console.op .console.open_error .console.open_error
following is added to prefs.js? en_on_error", false); ", true); ", false);

_______ class provides an interface for


invoking JavaScript methods and examining
JavaScript properties.   ScriptObject   JSObject   JavaObject

  
  dateObjectName = dateObjectName.ne   dateObjectName :=
new w new
How to create a Date object in JavaScript? Date([parameters]) Date([parameters]) Date([parameters])

  var txt = new    var txt = new   var txt = new


Which is the correct way to write a Array(1:"tim",2:"kim", Array:1=("tim")2=("ki Array("tim","kim","ji
JavaScript array? 3:"jim") m")3=("jim") m")
What is the correct syntax for referring to   <script href="    <script name="
an external script called " abc.js"? abc.js"> abc.js">   <script src=" abjs">
What will be the output of the
following JavaScript code?<p
id="demo"></p><script>var x = 5;var
y = 2; var z = x %
y;document.getElementById("demo"
).innerHTML = z;</script> a) 0 b) 1 c) 2
  if (conditional    if (conditional   if (conditional
expression is true) expression is expression is true)  
Which of the following is the structure of thenexecute this true)execute this {then execute this
an if statement? codeend if codeend if code>->}
What will be the output of the
following JavaScript code? <p
id="demo"></p><script> txt1 = “
1.    a) onetwo b) one two c) error
one”; txt1 += “two”;
document.getElementById("demo").i
nnerHTML = txt1; </script>
Which of the following is not considered a
JavaScript operator?   new   this   delete
What will be the output of the
following JavaScript statement?var c) 105 as an
grand_Total=eval("10*10+5"); a) 10*10+5 b) 105 as a string integer value
Will the following JavaScript code
work?var tensquared = (function(x) c) Exception will
{return x*x;}(10)); a) Yes, perfectly b) Error be thrown
Inside which HTML element do we put
the JavaScript?   <js>    <scripting>   <script>

What is the difference between the


two lines in the following JavaScript
a) Both the lines b) Both the lines c) Both the lines
code?!!(obj1 && obj2);(obj1 && obj2);
result in a result in a check just for the
boolean value boolean value existence of the
“True” “False” object alone
Complexit Blooms-
Opt-4 Opt-5 y CO-Level Level Answer

1 CO1 1 2

  Native 2 CO1 1 3

  None of the above 1 CO1 2 1

None of the above 3 CO1 4 1

78 3 CO1 4 4

  None of the above 1 CO1 1 1

Error output 3 CO1 3 1

  
user_pref("javascript
.console.open_on_er
ror", true); 2 CO1 3 4

  Jobject 2 CO1 2 2

  dateObjectName
Date([parameters]) 1 CO1 2 1

  var txt = new


Array="tim","kim","ji
m" 2 CO1 2 3

  None of the above 2 CO1 2 3

d) 5 3 CO1 3 2
  if (conditional
expression is true)
then {execute this
code} 1 CO1 1 3

d) undefined

3 CO1 3 1

  typeof 1 CO1 2 2

d) Exception is
thrown 3 CO1 4 3

d) Memory leak 2 CO1 3 1

  <javascript> 1 CO1 1 3
d) The first line
results in
a real boolean
value whereas
the second line
merely checks for
the existence of
the objects 3 CO1 3 4

You might also like

pFad - Phonifier reborn

Pfad - The Proxy pFad of © 2024 Garber Painting. All rights reserved.

Note: This service is not intended for secure transactions such as banking, social media, email, or purchasing. Use at your own risk. We assume no liability whatsoever for broken pages.


Alternative Proxies:

Alternative Proxy

pFad Proxy

pFad v3 Proxy

pFad v4 Proxy