Page 392 - Webapplication11_C11_Flipbook
P. 392
false - 5
true + 3
5 + "foo"
10. What is the use of jump statements?
11. Who developed JavaScript? [CBSE Sample Paper, 2022]
12. Give an example of HTML Editor [CBSE Sample Paper, 2022]
13. Explain any two applications/uses of JavaScript? [CBSE Sample Paper, 2022]
14. Explain two types of comments in JavaScript. [CBSE Sample Paper, 2022]
B. Long answer type questions.
1. Explain with an example how an external .js file can be included in the script tag.
2. Draw and explain the flow of control for ‘while’ and ‘for’ loops.
3. Explain the while and do-while loops and when to use each of them? [CBSE Handbook]
4. What is the relationship between HTML, CSS, and JavaScript?
5. Differentiate between Implicit and Explicit type conversions.
6. What are composite data types? [CBSE Handbook]
7. What is the difference between null and undefined values? [CBSE Handbook]
8. What the factors to be considered when naming the variable? [CBSE Handbook]
9. Explain the following scripting tags in JavaScript: [CBSE Sample Paper, 2022]
a. Src
b. Type
c. charset
10. Give a JavaScript statement for each of the following: [CBSE Sample Paper, 2022]
a. A variable ‘s’ that stores the sum of variables ‘x’ and ‘y’
b. To find square root of x .
c. To print data type of variable ‘n’.
11. Consider a string [CBSE Sample Paper, 2022]
var str1= “This is a world of miracles”;
Give JavaScript command for the following :
1. To print number of characters in variable str1
2. To search for the position of string ‘world’ in str1.
3. To display the string as follows in the browser window:
@@^^This is a world of miracles^^@@
4. To extract the substring by taking the starting position = 4 and ending position = 12 as arguments.
12. Give output for the following JavaScript statements: [CBSE Sample Paper, 2022]
a. parseInt (“15”, 8)
b. eval (“ 8*4/2”)
c. <script>
for (i = 0; i < 5; i++) {
390 Touchpad Web Applications-XI

