Refer to the following code:
function test (val) {
If (val === undefined) {
return ‘Undefined values!’ ;
}
if (val === null) {
return ‘Null value! ’;
}
return val;
}
Let x;
test(x);
What is returned by the function call on line 13?
Refer to thecode below:
Const pi = 3.1415326,
What is the data type of pi?
Refer to HTML below:
contents.
Which expression outputs the screen width of the element with the ID card-01?
Given the JavaScript below:
Which code should replace the placeholder comment on line 06 to hide accounts that do not match the search string?
A developer uses a parsed JSON string to work with user information as in the block below:
01 const userInformation ={
02 “ id ” : “user-01”,
03 “email” : “user01@universalcontainers.demo”,
04 “age” : 25
Which two options access the email attribute in the object?
Choose 2 answers
A developer implements a function that adds a few values.
Function sum(num) {
If (num == undefined) {
Num =0;
}
Return function( num2, num3){
If (num3 ===undefined) {
Num3 =0 ;
}
Return num + num2 + num3;
}
}
Which three options can the developer invoke for this function to get a return value of 10 ?
Choose 3 answers
At Universal Containers, every team has its own way of copyingJavaScript objects. The code snippet shows an Implementation from one team:
What is the output of the code execution?
A test has a dependency on database. query. During the test, the dependency is replaced with an object called database with the method,
Calculator query, that returns an array. The developer does notneed to verify how many times the method has been called.
Which two test approaches describe the requirement?
Choose 2 answers
A developer creates a genericfunction to log custom messages in the console. To do this,
the function below is implemented.
01 function logStatus(status){
02 console./*Answer goes here*/{‘Item status is: %s’, status};
03 }
Which three console logging methods allow the use of string substitution in line 02?
A developer wants to set up a secure web server withNode.js. The developer creates a
directory locally called app-server, and the first file is app-server/index.js
Without using any third-party libraries, what should the developer add to index.js to create the
secure web server?