Ganesh M - JS - Junior - Xobin
Ganesh M - JS - Junior - Xobin
Ganesh M
[email protected]
Submitted On: Oct 15, 2024, 10:30:26 AM
From: Bengaluru, Karnataka - India
IP: 122.172.83.221
Proctoring
Integrity 10/10
No Offtab Activity
Strength Analysis
Strengths 71 - 100%
Moderate 36 - 70%
No moderate found
Weakness 0 - 35%
No weakness found
Performance Summary
https://wolkensoftware.xobin.com/assessments/reports?assessment=50707&candidate=2050186# 1/15
11/4/24, 5:12 PM Ganesh M | JS - Junior | Xobin
https://wolkensoftware.xobin.com/assessments/reports?assessment=50707&candidate=2050186# 2/15
11/4/24, 5:12 PM Ganesh M | JS - Junior | Xobin
JavaScript 94.74%
1 2 3 4 5 6 7 8 9 10 11 12 13 14
Quick Access
Q: 1
After how many seconds will the second output print in this JavaScript code?
function greet() {
console.log('Hello');
}
function sayName(name) {
console.log('Hello' + ' ' + name);
}
setTimeout(greet, 2000);
sayName('John');
Answer by candidate:
2 seconds
Answer Status:
Correct
1 /1
Q: 2
To insert the document dynamically into the JavaScript code, fill in the blanks to by finding the
correct options.
function loadScript(src) {
let script = document.createElement('script');
script.src = src;
_________________;
document.head.append(script);
}
Answer by candidate:
loadScript('script.js');
Answer Status:
Not Correct
https://wolkensoftware.xobin.com/assessments/reports?assessment=50707&candidate=2050186#
0 3/15
0
11/4/24, 5:12 PM Ganesh M | JS - Junior | Xobin
/1
Q: 3
Answer by candidate:
Async function
Answer Status:
Correct
1 /1
Q: 4
What does async before the function mean in the given JavaScript code?
async function f() {
return 1;
}
Multiple Choice Question 1 Point Easy
Answer by candidate:
Function returns a promise.
Answer Status:
Correct
1 /1
Q: 5
Which array method is used to iterate through all elements of an array and produces a single
value?
Answer by candidate:
reduce()
Answer Status:
Correct
1 /1
Q: 6
https://wolkensoftware.xobin.com/assessments/reports?assessment=50707&candidate=2050186# 4/15
11/4/24, 5:12 PM Ganesh M | JS - Junior | Xobin
function greet() {
let name = 'Alice';
function sayHi() {
console.log(`Hi, ${name}!`);
}
name = 'Bob';
return sayHi;
}
Answer by candidate:
Hi, Bob!
Answer Status:
Correct
Q: 7
1 /1
What will be the output of the code snippet?
function outerFunction() {
const value = 10;
function innerFunction() {
console.log(value);
}
return innerFunction;
}
Answer by candidate:
10
Answer Status:
Correct
1 /1
Q: 8
console.log(doubled);
Answer by candidate:
[2, 4, 6, 8, 10]
https://wolkensoftware.xobin.com/assessments/reports?assessment=50707&candidate=2050186# 5/15
11/4/24, 5:12 PM Ganesh M | JS - Junior | Xobin
Answer Status:
Correct
1 /1
Q: 9
Answer by candidate:
1
2
3
undefined
Answer Status:
Correct
1 /1
Q: 10
You are developing a utility library in JavaScript, and you want to import the entire module
"utils" to access all its functions. Which static import statement is the correct syntax for
achieving this?
Answer by candidate:
import * as utilities from "./utils";
Answer Status:
Correct
1 /1
Q: 11
Imagine you're building a complex web application with several functionalities like user
management, content rendering, and payment processing. How can you best organize and
reuse code efficiently?
https://wolkensoftware.xobin.com/assessments/reports?assessment=50707&candidate=2050186# 6/15
11/4/24, 5:12 PM Ganesh M | JS - Junior | Xobin
Answer by candidate:
Implement ES6 modules to create separate files for each functionality, promoting modularity and reusability.
Answer Status:
Correct
2 /2
Q: 12
Suppose you want to share utility functions and configuration variables across different
modules in your application. Which approach best facilitates module-to-module
communication?
Answer by candidate:
Use the export keyword in one module and the import keyword in others to explicitly share functionalities.
Answer Status:
Correct
2 /2
Q: 13
Suppose you're designing a function that accepts an unlimited number of arguments and needs
to perform an operation on them collectively. Which approach provides the most flexible and
concise way to collect these arguments?
Answer by candidate:
Utilize the rest operator (...) within the function's parameter list to gather remaining arguments into an array.
Answer Status:
Correct
2 /2
Q: 14
Suppose you have an object containing product information but the property names don't align
with your UI needs. The object looks like this:
const product = {
itemName: "Cool Gadget",
priceInCents: 1299,
imageUrl: "https://example.com/gadget.jpg",
};
You need to create new variables for displaying the product name, formatted price, and image
URL with a different name. How can you achieve this efficiently while keeping the code clean and
organized?
https://wolkensoftware.xobin.com/assessments/reports?assessment=50707&candidate=2050186# 7/15
11/4/24, 5:12 PM Ganesh M | JS - Junior | Xobin
Answer by candidate:
Use object spread with renaming like const { itemName: name, priceInCents: price, imageUrl: image } = product;.
Answer Status:
Correct
3 /3
https://wolkensoftware.xobin.com/assessments/reports?assessment=50707&candidate=2050186# 8/15
11/4/24, 5:12 PM Ganesh M | JS - Junior | Xobin
Section 2: Coding
1 2 3
Quick Access
Q: 1
Calculate Earth Minutes
Problem Statement
Different planets of Curkey Galaxy spin differently. Given the total number of minutes and the
corresponding number of seconds per minute at planet X, return its equivalent number of
minutes on Earth (rounded to next integer). The function calculate_earth_minutes() accepts
parameters int minutes and int seconds, complete the function to return the equivalent earth
minutes in integer format. For example, if the total number of minutes is 1000 and every minute
has 20 seconds in planet X, the output will be 334 (333.333 rounded off to next integer).
Example 1
Input
minutes = 1000,seconds = 20
Output
334
Example 2
Input
minutes = 1200,seconds = 10
Output
200
--
The example provided above is a sample test case meant for your understanding. The program
will be scored on multiple secret test cases in the backend. Make sure you click
the SUBMIT button to save and submit your answer.
1 function calculate_earth_minutes(minutes,seconds){
2 var earth_min=0; 10 /10
6 earth_min = Math.ceil((minutes*seconds)/60);
7 return earth_min;
8 };
Q: 2
Reduce Selling Price
Problem Statement
A car is a depreciating asset. This means the value of a car decreases every year, making the resale
value of a car much lower than its initial cost price. The function calculate_resale_value() that
accepts 3 parameters - int depreciation_rate, int intial_cost and int years. Complete the function
https://wolkensoftware.xobin.com/assessments/reports?assessment=50707&candidate=2050186# 10/15
11/4/24, 5:12 PM Ganesh M | JS - Junior | Xobin
calculate_resale_value() by returning the selling price of the car in float format. For example, if the
initial cost of the car is 5000, the depreciation rate is 5% then its current value after 5 years is
3868.9
Example 1
Input
depreciation_rate=5,initial_cost=5000,years = 5
Output:
3868.9
Example 2
Input
depreciation_rate=10,initial_cost=12000,years = 2
Output
9720.0
----------------------------------------------------------------------------------------------------------------------------------------------
--------
The example provided above is a sample test case meant for your understanding. The program
will be scored on multiple secret test cases in the backend. Make sure you click
Coding 10 Points Easy Language: Javascript
1 function calculate_resale_value(depreciation_rate,initial_cost,years){
2 var sell_price=0.0; 8 /10
https://wolkensoftware.xobin.com/assessments/reports?assessment=50707&candidate=2050186# 11/15
11/4/24, 5:12 PM Ganesh M | JS - Junior | Xobin
Q: 3
Beer Bottles
Problem Statement
A beer manufacturing company sells beer in bottles of different sizes - 1 Gallon, 5 Gallons, 7
Gallons and 10 Gallons. Given a supply order of N Gallons, the manufacturer wants to fulfil the
demand with minimum number of bottles.
The function bottles_required() accepts 1 parameter: an int gallons_of_beer.
Complete the function bottles_required() by returning the minimum number of bottles required
in integer format.
Example 1
Input
gallons_of_beer=17
Output
2
Explanation : 17 Gallons can be fulfilled using 1 (10 Gallon) and 1(7 Gallon) bottle. Hence,
minimum number of bottles is 2
Example 2
Input
gallons_of_beer=13
Output
3
Explanation : 13 Gallons can be fulfilled using 1 (7 Gallon) + 1 (5 Gallon) Bottle + 1(1 Gallon)
bottle. Hence, minimum number of bottles is 3
-------------------------------------------------------------------------------------------------------------------
https://wolkensoftware.xobin.com/assessments/reports?assessment=50707&candidate=2050186# 12/15
11/4/24, 5:12 PM Ganesh M | JS - Junior | Xobin
The example provided above is a sample test case meant for your understanding. Your code
will be scored on multiple secret test cases in the backend. Make sure you click
the SUBMIT button to save and submit your answer.
1 function bottles_required(gallons_of_beer){
2 let no_of_bottles=0; 13.33 /20
17 2 2 Passed
12 2 3 Failed
13 3 4 Failed
20 2 2 Passed
10 1 1 Passed
25 3 3 Passed
https://wolkensoftware.xobin.com/assessments/reports?assessment=50707&candidate=2050186# 13/15
11/4/24, 5:12 PM Ganesh M | JS - Junior | Xobin
PROCTORING LOG
https://wolkensoftware.xobin.com/assessments/reports?assessment=50707&candidate=2050186# 15/15