Font size
WorksheetsHTML_CSS_JAVASCRIPT
Total questions: 20
Worksheet time: 15mins
In which of the given scenarios would the Switch case be unsuitable?
A conditional has to be designed whereupon Green Signal a machine has to be turned on and upon Red Signal the machine would be turned off.
A conditional has to be designed in which if a number is equal to 10, then “The number is 10” is printed on the console” or else “The number is not 10” is printed on the console
A conditional has to be designed in such a way that is the number is less than 100, then “The number is less than three digits” or else “The number is more than two digits”
What will be the last number printed when the code below is run?
var n=2;
for (var i=n; i < 12;i=i+n){
console.log(i);
}
6
10
Which of the following statements about the window object are true?
It is a type of a local object in the browser
It is a type of a global object in the browser
To print the window object, we can write: console.log(window);
To print the window object, we can write: console.log(this)
What is the return type of the following function?
function f(x) {
return x * x;
};
undefined
string
number
function
What is the data type of the variable x in this code?
var x = function(){
return 4*4;
};
number
undefined
function
boolean
Uncaught ReferenceError : title is not defined
“The Lords of the Rings”
Uncaught ReferenceError : title is not defined
Uncaught ReferenceError : title is not defined
“The Lords of the Rings”,
Uncaught ReferenceError : title is not defined
“The Lords of the Rings”,
“The Lords of the Rings”
101 Tech
101 null
101 undefined
What is the correct syntax to change the background color with css?
background-color: purple;
background-color = "purple";
backgroundcolor=orange
change-background-color: purple
Where should you put the link tag to connect your CSS and HTML file?
Between the <head> </head> in HTML
Between the <body> </body> in HTML
None of the above.
Which of the following is the correct CSS link tag?
<link rel="styles" href="stylesheet.css">
<link href="stylesheet">
<link rel="stylesheet" src="styles.css">
<link rel="stylesheet" href="styles.css">
Which of the following elements would you use to create a numbered or ordered list in an HTML document?
<list>
<#>
<ul.
<ol>
Which of the following tags are formatted correctly to add an image to an HTML document?
<img href="puppy.gif" alt="puppy">
<img src="puppy.gif" alt="puppy">
<image src="puppy.gif" alt="Puppy">
<img alt="puppy">puppy.gif</img>
Which of the following will correctly display the words above?
<h3> Eggs </h3>
<h1> Bacon </h1>
<h6> Waffles </h6>
B<h1> Eggs </h1>
<h2> Bacon </h2>
<h3> Waffles </h3>
<h6> Eggs </h6>
<h1> Bacon </h1>
<h3> Waffles </h3>
Uncaught ReferenceError: x is not defined
0
undefined
10
Which of the following functions, when called with the argument "Raju”, correctly print(s) the given output on the console?
greet1
greet2
greet3
greet4
greet5
Number("3")-3== 0 . What is the result?
false
true
NaN
(true + false) > 3 + true;
What is the output?
false
true
NaN
undefined
12. What is the result of the following console.log([] + [] + 'java'.split(''));
[] []
[] [] j a v a
TypeError
j,a,v,a
Pizza
Pizza's over
More pizza's coming
Party's over go home
