Quiz Space

MAD 2 End Term: 28 April 2024 (January 2024 term)

Question 1

+2 marksOne correct option

Consider the following Script embedded in an HTML document.

javascript
let langName = 'Python';
function showLanguage() {
let langName = "JavaScript";
let message = 'Learn ' + langName;
console.log(message);
}
let message = 'Learn ' + langName;
console.log(message)
console.log(showLanguage());

What will be the output on console, if the HTML document is rendered using a browser?

  1. A
  2. B
  3. C
  4. D

Question 2

+2 marksOne correct option

Consider the following Script embedded in an HTML document.

javascript
let x = [1, 'p', a => a + 1];
for (const i = 0; i<x.length; i++) {
console.log(i, x[i], typeof(x[i]))
}

Which of the following statement is correct, if the HTML document is rendered using a browser?

  1. A

    It will throw error on the console for the very first iteration.

  2. B

    It will display the index, value and type of the value for the first item of array and then will throw error for the next value.

  3. C

    It will display the indices, values and types of all the items of the array.

  4. D

    None of these.

Question 3

+2 marksOne correct option

Assuming the URL gives a valid json response, what will be the output in the console?

javascript
fetch('https://study.iitm.ac.in/api/data')
.then(response => response.json())
.then(data => console.log(data))
.catch(error => console.error(error));
console.log('End of script');
  1. A

    The JSON data from the specified URL followed by “End of script”.

  2. B

    "End of script" will be logged first, followed by the JSON data.

  3. C

    An error will be logged, and the script will terminate.

  4. D

    "End of script" will be logged, but the JSON data retrieval will fail.

29 more questions in this paper

Sign in with Google — it is free — to see every question with its answer and explanation, practise it in learning mode, or take it as a timed mock test.

More on the MAD 2 End Term 28 Apr 2024 paper

The IIT Madras BS Modern Application Development II (MAD 2) End Term paper sat on 28 Apr 2024, in the January 2024 term: 32 questions for 100 marks in 180 minutes. The first 3 questions are below. Sign in with Google — it is free — to see the whole paper with its answers and explanations, in learning mode or as a timed mock test.

FeatureMAD 2 End Term 28 Apr 2024 at a glance
TermJanuary 2024 term
SubjectModern Application Development II
Course codeBSCS2006
Questions32
Marks100
Duration180 min
MCQ25
MSQ7
Official paperIIT M FOUNDATION DIPLOMA AN EXAM QDF3 28 Apr 2024
Negative markingNo negative marking.
Updated

Same End Term, other subjects

More MAD 2