Web Development Final Papers
Web Development Final Papers
OBJECTIVE TYPE
Question:1 Choose the Correct Option. (20*1 = 20)
1. Bootstrap includes a responsive, mobile first fluid grid system that appropriately scales up to
_______ as the device or viewport size increases.
<script>
const arr = [10, 20, 30];
let result = 0;
arr.forEach(myFunction);
<script>
function addition(a, b) {
return a+b;
}
document.getElementById("test").innerHTML = addition;
</script>
Explanation
Input: a=3, b=8, c=10
Output: Valid
Input: a=3,b=4,c=1
Output: Invalid
2. Explain the difference between forEach( ) , map( ) , filtter( ) and reduce( ) method in detail.
3. Write a JavaScript program that computes the average marks of the following students. Then, this
average is used to determine the corresponding grade.
David 80
Vinoth 77
Divya 88
Ishitha 95
Thomas 68
Range Grade
<60 F
<70 D
<80 C
<90 B
<100 A
4. Design a registration form by using HTML, CSS by using Grid system.
7. Which of these methods returns the string such that some characters which are specified to be
removed from the end of strings are removed from string by mentioning the number of characters to be
removed?
a) Trim() b) Remove() c) TrimEnd() d) Split()
var quiz=[1,2,3];
var js=[6,7,8];
var result=quiz.concat(js);
document.writeln(result);
a) 1, 2, 3, 6, 7, 8 b) 123 c) 1, 2, 3 d) Error
function compare()
{
int sanfoundry=1;
char javascript=1;
if(sanfoundry.tostring()===javascript)
return true;
else
return false;
}
a) runtime error b) logical error c) true d) false
var string2Num=parseInt("123xyz");
a) 123 b) 123xyz c) Exception d) NaN
12. Which is the correct syntax to call an external JavaScript file in the current HTML document?
A. <script src="jsfile.js"></script>
B. <script href=" jsfile.js"></script>
C. <import src=" jsfile.js"></import>
D. <script link=" jsfile.js"></script>
A. console.write()
B. console.output()
C. console.log()
D. console.writeHTML()
14. In JavaScript, multi-line comments start with __ and end with ___.
A. /* and */
B. <!—and -->
C. ## and ##
D. // and //
15. What will be the value of VALUE?
<script>
const VALUE = 10;
VALUE = 20;
</script>
A. 10
B. 20
C. ValueError
D. TypeError
16. Which of the following function defines a linear gradient as a CSS image?
a) gradient() b) linear-gradient() c) grayscale() d) image(
17. Which of the following property is used as the shorthand property for the padding properties?
18. Which of the following is the correct syntax to select the p siblings of a div element?
A. text-align:center
B. align:center
C. text-align:middle
D. align:middle
</head><body><form>
<select id="colorSelect">
<option>Red</option>
<option>Green</option>
<option>White</option>
<option>Black</option>
</select>
</form>
2. Write down complete note About useState, UseEffect, useRef, write down a code to create button and after click the button tab show (chat(0))
and this value increase after to click the button. And create a counter system App.
3. Write a function that accepts an array of strings. Return the longest string.
4. write down the use of carouse, write down the code to create slider and add random images by using it.
2. Which of the following property is used as the shorthand property for the padding properties?
3. Which of the following is the correct syntax to select the p siblings of a div element?
E. text-align:center
F. align:center
G. text-align:middle
H. align:middle
var string2Num=parseInt("123xyz");
E. <script src="jsfile.js"></script>
F. <script href=" jsfile.js"></script>
G. <import src=" jsfile.js"></import>
H. <script link=" jsfile.js"></script>
E. console.write()
F. console.output()
G. console.log()
H. console.writeHTML()
14. In JavaScript, multi-line comments start with __ and end with ___.
E. /* and */
F. <!—and -->
G. ## and ##
H. // and //
<script>
const VALUE = 10;
VALUE = 20;
</script>
E. 10
F. 20
G. ValueError
H. TypeError
17. Which of these methods returns the string such that some characters which are specified to be removed
from the end of strings are removed from string by mentioning the number of characters to be removed?
a) Trim() b) Remove() c) TrimEnd() d) Split()
18. What will be the output of the following JavaScript code?
var quiz=[1,2,3];
var js=[6,7,8];
var result=quiz.concat(js);
document.writeln(result);
a) 1, 2, 3, 6, 7, 8 b) 123 c) 1, 2, 3 d) Error
function compare()
{
int sanfoundry=1;
char javascript=1;
if(sanfoundry.tostring()===javascript)
return true;
else
return false;
}
a) runtime error b) logical error c) true d) false
ii. When the button is pressed add an event that get the username and creates a welcome message on the page
iii. Add a check to ensure the length of the input is larger than 3 characters long.
4. we create a billing software, and we have 10 products and we create a bill after of the purchasing products
Add 200 sales text of every bill.
4. Which property is used to define the HTML content to an HTML element with a specific id?
b. innerText b. innerContent c. elementTextd. innerHTML
5. Which JavaScript keyword is used to declare a variable?
b. Var b. var c. Let d. All the above
6. What will be the output of the following JavaScript code?
<script>
function addition(a, b) {
return a+b;
}
document.getElementById("test").innerHTML = addition;
</script>
<script>
const arr = [10, 20, 30];
let result = 0;
arr.forEach(myFunction);
</head><body><form>
<select id="colorSelect">
<option>Red</option>
<option>Green</option>
<option>White</option>
<option>Black</option>
</select>
</form>
Explanation
Input: a=3, b=8, c=10
Output: Valid
Input: a=3,b=4,c=1
Output: Invalid
4. Add a required validation to each input that shows an error message next to the entry if it does not
have any text entered.