Question 1 | MCQ
THIS IS QUESTION PAPER FOR THE SUBJECT"DIPLOMA LEVEL : MODERN APPLICATION
DEVELOPMENT II (COMPUTER BASED EXAM)"
ARE YOU SURE YOU HAVE TO WRITE EXAM FOR THIS SUBJECT?
CROSS CHECK YOUR HALL TICKET TO CONFIRM THE SUBJECTS TO BE WRITTEN.
(IF IT IS NOT THE CORRECT SUBJECT, PLS CHECK THE SECTION AT THE TOP FOR THE SUBJECTS REGISTERED BY YOU)
DEVELOPMENT II (COMPUTER BASED EXAM)"
ARE YOU SURE YOU HAVE TO WRITE EXAM FOR THIS SUBJECT?
CROSS CHECK YOUR HALL TICKET TO CONFIRM THE SUBJECTS TO BE WRITTEN.
(IF IT IS NOT THE CORRECT SUBJECT, PLS CHECK THE SECTION AT THE TOP FOR THE SUBJECTS REGISTERED BY YOU)
Solution
Which of the following statements is true regarding the "this" keyword in JavaScript?
Solution
Consider the below JavaScript program.

What will be the output of the above program?
What will be the output of the above program?
Solution
What is the main advantage of using JWT over session-based authentication?
Solution
Which of the following HTTP methods does WebSocket use for initial handshake?
Solution
You are building a cricket analytics app. The filebattingStats.jscontains the following exports:

In another fileapp.js, which of the following import statements will correctly import both strikeRateandplayerName? ( Assume both files are in the same directory )
In another fileapp.js, which of the following import statements will correctly import both strikeRateandplayerName? ( Assume both files are in the same directory )
Solution
A JWT (JSON Web Token) is represented in the format:
.In authentication usingFlask-JWT-Extended, what does the payload part of the JWT stores?
Solution
Consider the below JavaScript program.

What will be the output of the above program?
What will be the output of the above program?
Solution
Consider the below Vuex store configuration:

If the addItemAsync action is dispatched with the item 'React', what will be the state of items after 2 seconds?
If the addItemAsync action is dispatched with the item 'React', what will be the state of items after 2 seconds?
Solution
Consider the below Vue app.

What happens when the user navigates to an undefined route like "/random"?
What happens when the user navigates to an undefined route like "/random"?
Solution
What will be the output of the following JavaScript code?

Solution
Consider the following JavaScript program:

What will be the output of the above program on a browser's console?
What will be the output of the above program on a browser's console?
Solution
Consider the following JavaScript program:

What will be the output of the above program?
What will be the output of the above program?
Solution
What happens when this Flask caching code runs?

If requests for user IDs 1, 2, 1 are made within 5 minutes, what's the total response time?
If requests for user IDs 1, 2, 1 are made within 5 minutes, what's the total response time?
Solution
Consider the following JavaScript program:

What will be printed in the console when the above code is executed?
What will be printed in the console when the above code is executed?
Solution
Match the Vue directive in Directive with its correct functionality in Description using Vue.js.

Solution
In a Single Page Application (SPA), what are the benefits of client-side routing over server-side routing?
Solution
Which of the following is the correct statement?
Solution
Consider the following Vue application with markup index.html and JavaScript file app.js.

Suppose the application is running on http://127.0.0.1:8080. What will be rendered by the browser?
Suppose the application is running on http://127.0.0.1:8080. What will be rendered by the browser?
Solution
Consider the following endpoints created with a working setup of flask-security and flask- sqlalchemy.

Three requests are made to this application:
1.GET /api/open (no authentication headers)
2.GET /api/secure (no authentication headers)
3.GET /api/superuser with valid authentication token but user has role 'basic' (not 'superuser')
What will be the response status codes for these requests, respectively?
Three requests are made to this application:
1.GET /api/open (no authentication headers)
2.GET /api/secure (no authentication headers)
3.GET /api/superuser with valid authentication token but user has role 'basic' (not 'superuser')
What will be the response status codes for these requests, respectively?
Solution
Consider the following code snippet running in a browser. What will be the output on the console?

Solution
Consider the following code snippet running on a browser. What is the output on the console?

Solution
Consider the flask application app.py and an HTML file index.html:


If a user visit index.html at 10:10:10 AM, what will be logged in the console?
If a user visit index.html at 10:10:10 AM, what will be logged in the console?
Solution
A student is going on a trip and wants to check whether all essential items are packed. The application uses Vue 2 and Vuex to manage the list of packed items.The following Vue application is incomplete. Two lines of code are missing and are marked asLine XandLine Y.

Which of the following options correctly fillsLine XandLine Yso that the application works as expected?
Which of the following options correctly fillsLine XandLine Yso that the application works as expected?
Solution
Which of the following statement(s) is/are true about GraphQL?
Solution
Consider the following code:

You are developing an analytics platform using Flask and Flask-JWT-Extended. A user sends a POST request to
with:
. Then tries to access
.
Which of the following statements are correct?
You are developing an analytics platform using Flask and Flask-JWT-Extended. A user sends a POST request to
Which of the following statements are correct?
Solution
Hamza is working on a project usingGitand performs the following operations:
1.Creates a new branch and switches to it
2.Stages changes for commit
3.Commits changes with a message
4.Pushes the branch to a remote repository
Which of the following commands are correctly used for these operations?
1.Creates a new branch and switches to it
2.Stages changes for commit
3.Commits changes with a message
4.Pushes the branch to a remote repository
Which of the following commands are correctly used for these operations?
Solution
Prerna and Swathy are using a web application built with Vue.js for the BS Degree program.
- When the page loads, the sidebar content appears instantly
- However, when they click on an Assignments link, the main content takes noticeable time to load
A simplified version of the component is shown below:

Which of the following statements correctly explain why the Assignments page takes time to load?
- When the page loads, the sidebar content appears instantly
- However, when they click on an Assignments link, the main content takes noticeable time to load
A simplified version of the component is shown below:
Which of the following statements correctly explain why the Assignments page takes time to load?
Solution
Comprehension Passage
Consider the following Vue.js application:

Based on the above data, answer the given subquestions.
Based on the above data, answer the given subquestions.
How many times will "computed run" be logged in the console during the initial render?
Solution
Comprehension Passage
Consider the following Vue.js application:

Based on the above data, answer the given subquestions.
Based on the above data, answer the given subquestions.
If the
method is modified as follows:

What will happen when the button is clicked?
What will happen when the button is clicked?
Solution
Comprehension Passage
Consider the following Vue.js application:

Based on the above data, answer the given subquestions.
Based on the above data, answer the given subquestions.
Why is
defined as a computed property instead of a method?
Solution
Comprehension Passage
Consider the following Vue 2 application:

Assume the Vue application is loaded at the url
. The user then clicks on the Item 2 router link.
Based on the above data, answer the given subquestions.
Assume the Vue application is loaded at the url
Based on the above data, answer the given subquestions.
What happensimmediately after clicking "Item 2"?
Solution
Comprehension Passage
Consider the following Vue 2 application:

Assume the Vue application is loaded at the url
. The user then clicks on the Item 2 router link.
Based on the above data, answer the given subquestions.
Assume the Vue application is loaded at the url
Based on the above data, answer the given subquestions.
Why is the
lifecycle hook triggered in this scenario?
Solution
Shape
Thickness [ / ]
3
All colors