SampleQuestions Subjective JS-1
SampleQuestions Subjective JS-1
(6M)
Q.2 What does it mean in JavaScript when something is displayed as “undefined” in the console? How
is it different from “null”. (4M)
var %entage=20;
Alert($punchline); }
alert(msg);
Q.4 What is the difference between Literal, variables and constant. Explain with example.
Q. 5 What are the rules for naming a JavaScript variable? Give example of an invalid variable name.
(5M)
Given a JS statement
y = 5 + "10 years";
document.write( y, "<br>"); w
Q. 7 What are the limitations of switch statement? Rewrite the following code using if…else if statement.
(6M)
switch (direction)
Q. 7 Evaluate the following arithmetic expression and find out its output, assuming b = 4 and c = 4.
Q. 8 Enlist features of Java script. What is the difference between Java & JavaScript? (6M)
Q. 15 How can you convert the string of any base to integer in JavaScript? Write an expression in JS to
convert “ABC” to an integer. (4M)
Programs:
Q. Write a Javascript to find factorial of a number. Write the script in HTML Code.. Give heading to your
code (6M)x
Q. Write a JS code to reverse the string and confirm whether a palindrome. Accept the string from
keyboard.
Q. Display multiplication table of user defined number in the browser as well as console.