Candidates Exam – Node.js + Vue.js
Passage
•
Instructional Technology
•
Professional Development
•
Hard
Abhijeet Rathod
FREE Resource
Enhance your content
9 questions
Show all answers
1.
OPEN ENDED QUESTION
15 mins • 1 pt
Section 1: Node.js
Implement logging and exception handling mechanism in Node JS core, use well known concepts and design patterns
Evaluate responses using AI:
OFF
2.
OPEN ENDED QUESTION
15 mins • 1 pt
Consider the following Node.js code snippet that uses Sequelize for interacting with a database. The code is intended to create a User model and insert a new user into the database. However, there might be some issues and areas for improvement:
// models/User.js
const { DataTypes } = require('sequelize');
const sequelize = require('../config/database');
const User = sequelize.define('User', {
username: {
type: DataTypes.STRING,
allowNull: false,
},
email: {
type: DataTypes.STRING,
allowNull: false,
},
});
module.exports = User;
// controllers/userController.js
const User = require('../models/User');
async function createUser(username, email) {
try {
const user = await User.create({
username: username,
email: email,
});
console.log('User created successfully:', user);
} catch (error) {
console.error('Error creating user:', error);
}
}
createUser('john_doe', 'john@example.com');
● Identify potential issues in the provided code and explain them.
● Propose improvements to address the identified issues and optimize the code.
Evaluate responses using AI:
OFF
3.
OPEN ENDED QUESTION
15 mins • 1 pt
Given the code below, after deployment, QA reports slowness in showing large data.
a. Explain the possible reasons for the slowness
b. Introduce code improvements to improve performance.
const fetchData = async () => {
const data = await database.query('SELECT * FROM large_data_set');
// Process the data, which may involve synchronous operations
const processedData = process(data);
return processedData;
};
Evaluate responses using AI:
OFF
4.
OPEN ENDED QUESTION
15 mins • 1 pt
Section 2: Vue
State Management, Create a Vue component for a dynamic form where the number of input fields can be increased by the user. Manage the state of all input fields using a single-state object.
Evaluate responses using AI:
OFF
5.
OPEN ENDED QUESTION
15 mins • 1 pt
Develop a Vue service that performs HTTP requests to a public API (like a weather API or a public JSON placeholder API).
Then, create a component that uses this service to fetch data and display it in a formatted way.
Evaluate responses using AI:
OFF
6.
OPEN ENDED QUESTION
15 mins • 1 pt
Using Vue, Implement a simple Observable that emits values over time (like a counter).
Then, create a component that subscribes to this Observable and displays its values in real time.
Additionally, include a way to unsubscribe from the Observable to demonstrate good practice in managing subscriptions.
Evaluate responses using AI:
OFF
7.
OPEN ENDED QUESTION
15 mins • 1 pt
Section 3: General Development
7
Write a function in (in any code) that finds the factorial of a given integer using recursion.
Evaluate responses using AI:
OFF
8.
OPEN ENDED QUESTION
15 mins • 1 pt
Given a sorted array from 1 to N, there is a bug that somewhere in the array there is a “jump” of 1 number, Write an algorithm in Node/Vue JS to find the index of the “jump”, consider time and place complexity, assume you don’t know the size of the array and it can be very large.
Example:
index 0 1 2 3 4 5 6 7 8 9
value 0 1 2 3 5 6 7 8 9 10
Evaluate responses using AI:
OFF
9.
OPEN ENDED QUESTION
15 mins • 1 pt
Write a SQL query to retrieve all unique customers who have made purchases in the last month from a "Customers" table and an "Orders" table.
Assume you have a "Customers" table with a unique "CustomerID" and an "Orders" table with a "CustomerID" and a "OrderDate" column.
Evaluate responses using AI:
OFF
Similar Resources on Wayground
10 questions
DL Refresher
Quiz
•
KG - Professional Dev...
10 questions
Quiz - NetApp & Rubrik Data Protection Day
Quiz
•
Professional Development
10 questions
Quiz Webinar Flutter 29-04-2021
Quiz
•
Professional Development
12 questions
Google Workspace for Education Learning Checks
Quiz
•
Professional Development
10 questions
Cyber Safe Session 1
Quiz
•
Professional Development
15 questions
KUIS KE 2 SEMINAR NASIONAL KEFARMASIAN (HMPF-USB)
Quiz
•
Professional Development
10 questions
Principles of Electronic Communication ; A review
Quiz
•
Professional Development
11 questions
How well do you know about technology
Quiz
•
KG - Professional Dev...
Popular Resources on Wayground
10 questions
Ice Breaker Trivia: Food from Around the World
Quiz
•
3rd - 12th Grade
20 questions
MINERS Core Values Quiz
Quiz
•
8th Grade
10 questions
Boomer ⚡ Zoomer - Holiday Movies
Quiz
•
KG - University
25 questions
Multiplication Facts
Quiz
•
5th Grade
22 questions
Adding Integers
Quiz
•
6th Grade
20 questions
Multiplying and Dividing Integers
Quiz
•
7th Grade
10 questions
How to Email your Teacher
Quiz
•
Professional Development
15 questions
Order of Operations
Quiz
•
5th Grade
Discover more resources for Instructional Technology
10 questions
How to Email your Teacher
Quiz
•
Professional Development
21 questions
October 25
Quiz
•
Professional Development
10 questions
October Monthly Quiz
Quiz
•
Professional Development
20 questions
There is There are
Quiz
•
Professional Development
5 questions
SSUSH13
Interactive video
•
Professional Development
10 questions
Halloween Trivia
Quiz
•
Professional Development
