CSE 3901 FINAL PAPER 2026 QUESTIONS WITH
SOLUTIONS GRADED A+
◉ false. Answer: javascript:
function inc (param) {
param = {x:2, y:7};
}
var a = {x:1, y:4};
inc(a); //copies contents of slot
if (a.x == 2)
what is the result of the if statement?
◉ "34", true, false. Answer: javascript: what are the results of the
following statements?
3 + "4"
3 == "3"
3 === "3"
◉ 25. Answer: javascript: what is the result of the last function call?
function apply(x, a) {
return x(a);
, }
function square(i) {
return i*i;
}
apply(square, 5)
◉ var foo = function (a, b) {...};
foo("hi", 3). Answer: javascript: create an anonymous function and
assign it to "foo" then call the function
◉ Dr. Turing. Answer: javascript: what does prof() return?
function grantDegree(a) {
var prefix = "Dr. ";
function add() {
return prefix + a;
}
return add;
}
var prof = grantDegree("Turing");
prof()
SOLUTIONS GRADED A+
◉ false. Answer: javascript:
function inc (param) {
param = {x:2, y:7};
}
var a = {x:1, y:4};
inc(a); //copies contents of slot
if (a.x == 2)
what is the result of the if statement?
◉ "34", true, false. Answer: javascript: what are the results of the
following statements?
3 + "4"
3 == "3"
3 === "3"
◉ 25. Answer: javascript: what is the result of the last function call?
function apply(x, a) {
return x(a);
, }
function square(i) {
return i*i;
}
apply(square, 5)
◉ var foo = function (a, b) {...};
foo("hi", 3). Answer: javascript: create an anonymous function and
assign it to "foo" then call the function
◉ Dr. Turing. Answer: javascript: what does prof() return?
function grantDegree(a) {
var prefix = "Dr. ";
function add() {
return prefix + a;
}
return add;
}
var prof = grantDegree("Turing");
prof()