[Q59-Q74] Real Exam Questions CRT-600 Dumps Exam Questions in here [Oct-2021]

Share

Real Exam Questions CRT-600 Dumps Exam Questions in here [Oct-2021]

Get Latest Oct-2021 Conduct effective penetration tests using  CRT-600

NEW QUESTION 59
A developer has two ways to write a function:
Option A:
function Monster() {
This.growl = () => {
Console.log ("Grr!");
}
}
Option B:
function Monster() {};
Monster.prototype.growl =() => {
console.log("Grr!");
}
After deciding on an option, the developer creates 1000 monster objects.
How many growl methods are created with Option A Option B?

  • A. 1 growl method is created regardless of which option is used.
  • B. 1000 growl method is created for Option A. 1 growl methods are created for Option B.
  • C. 1000 growl methods are created regardless of which option is used.
  • D. 1 growl method is created for Option A. 1000 growl methods are created for Option B.

Answer: B

 

NEW QUESTION 60
Refer to the code below:
let sayHello = () => {
console.log ('Hello, world!');
};
Which code executes sayHello once, two minutes from now?

  • A. setInterval(sayHello, 12000);
  • B. delay(sayHello, 12000);
  • C. setTimeout(sayHello(), 12000);
  • D. setTimeout(sayHello, 12000);

Answer: D

 

NEW QUESTION 61
Refer to code below:
Let productSKU = '8675309' ;
A developer has a requirement to generate SKU numbers that are always 19 characters lon, starting with 'sku', and padded with zeros.
Which statement assigns the values sku0000000008675309 ?

  • A. productSKU = productSKU .padStart (19. '0').padstart('sku');
  • B. productSKU = productSKU .padEnd (16. '0').padstart('sku');
  • C. productSKU = productSKU .padEnd (16. '0').padstart(19, 'sku');
  • D. productSKU = productSKU .padStart (16. '0').padstart(19, 'sku');

Answer: D

 

NEW QUESTION 62
Refer to the code:

Given the code above, which three properties are set pet1?
Choose 3 answers:

  • A. Name
  • B. Size
  • C. Type
  • D. canTalk
  • E. Owner

Answer: B,C,D

 

NEW QUESTION 63
Refer to the code below:
const addBy = ?
const addByEight =addBy(8);
const sum = addBYEight(50);
Which two functions can replace line 01 and return 58 to sum?
Choose 2 answers

  • A. const addBy = (num1) => num1 + num2 ;
  • B. const addBy = function(num1){
    return num1 + num2;
    }
  • C. const addBY = (num1) => (num2) => num1 + num2;
  • D. const addBy = function(num1){
    return function(num2){
    return num1 + num2;
    }

Answer: C,D

 

NEW QUESTION 64
Refer to code below:
Let a ='a';
Let b;
// b = a;
console.log(b);
What is displayed when the code executes?

  • A. ReferenceError: b is not defined
  • B. Undefined
  • C. A
  • D. Null

Answer: B

 

NEW QUESTION 65
A developer wants to set up a secure web server with Node.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?

  • A. const https =require('https');
  • B. const server =require('secure-server');
  • C. const tls = require('tls');
  • D. const http =require('http');

Answer: A

 

NEW QUESTION 66
A developer is asked to fix some bugs reported by users. To do that, the developer adds a breakpoint for debugging.
Function Car (maxSpeed, color){
This.maxspeed =masSpeed;
This.color = color;
Let carSpeed = document.getElementById(' CarSpeed');
Debugger;
Let fourWheels =new Car (carSpeed.value, 'red');
When the code execution stops at the breakpoint on line 06, which two types of information are available in the browser console ?
Choose 2 answers:

  • A. The information stored in the window.localStorage property
  • B. The values of the carSpeed and fourWheels variables
  • C. The style, event listeners and other attributes applied to the carSpeed DOM element
  • D. A variable displaying the number of instances created for the Car Object.

Answer: A,C

 

NEW QUESTION 67
Given the following code:
Counter = 0;
const logCounter = () => {
console.log(counter);
);
logCounter();
setTimeout(logCOunter, 1100);
setInterval(() => {
Counter++
logCounter();
}, 1000);
What is logged by the first four log statements?

  • A. 0 0 1 2
  • B. 0 1 1 2
  • C. 0 1 2 2
  • D. 0 1 2 3

Answer: B

 

NEW QUESTION 68
A developer wants to iterate through an array of objects and count the objects and count the objects whose property value, name, starts with the letter N.
Const arrObj = [{"name" : "Zach"} , {"name" : "Kate"},{"name" : "Alise"},{"name" : "Bob"},{"name" :
"Natham"},{"name" : "nathaniel"}
Refer to the code snippet below:
01 arrObj.reduce(( acc, curr) => {
02 //missing line 02
02 //missing line 03
04 ). 0);
Which missing lines 02 and 03 return the correct count?

  • A. Const sum = curr.startsWIth('N') ? 1: 0;
    Return curr+ sum
  • B. Const sum = curr.name.startsWIth('N') ? 1: 0;
    Return curr+ sum
  • C. Const sum = curr.name.startsWith('N') ? 1: 0;
    Return acc +sum
  • D. Const sum = curr.startsWith('N') ? 1: 0;
    Return acc +sum

Answer: B

 

NEW QUESTION 69
A developer has code that calculates a restaurant bill, but generates incorrect answers while testing the code:
function calculateBill ( items ) {
let total = 0;
total += findSubTotal(items);
total += addTax(total);
total += addTip(total);
return total;
}
Which option allows the developer to step into each function execution within calculateBill?

  • A. Calling the console.trace (total) method on line 03.
  • B. Using the debugger command on line 05.
  • C. Wrapping findSubtotal in a console.log() method.
  • D. Using the debugger command on line 03

Answer: B

 

NEW QUESTION 70
Refer to the code below:
Const searchTest = 'Yay! Salesforce is amazing!" ;
Let result1 = searchText.search(/sales/i);
Let result 21 = searchText.search(/sales/i);
console.log(result1);
console.log(result2);
After running this code, which result is displayed on the console?

  • A. > 5 > 0
  • B. > 5 >undefined
  • C. > 5 > -1
  • D. > true > false

Answer: B

 

NEW QUESTION 71
A developer needs to test this function:
01 const sum3 = (arr) => (
02 if (!arr.length) return 0,
03 if (arr.length === 1) return arr[0],
04 if (arr.length === 2) return arr[0] + arr[1],
05 return arr[0] + arr[1] + arr[2],
06 );
Which two assert statements are valid tests for the function?
Choose 2 answers

  • A. console.assert(sum3('hello', 2, 3, 4)) === NaN);
  • B. console.assert(sum3(1, '2')) == 12);
  • C. console.assert(sum3(0)) == 0);
  • D. console.assert(sum3(-3, 2 )) == -1);

Answer: B,D

 

NEW QUESTION 72
Refer to the code below:
new Promise((resolve, reject) => {
const fraction = Math.random();
if( fraction >0.5) reject("fraction > 0.5, " + fraction);
resolve(fraction);
})
.then(() =>console.log("resolved"))
.catch((error) => console.error(error))
.finally(() => console.log(" when am I called?"));

When does Promise.finally on line 08 get called?

  • A. When resolved or rejected
  • B. When rejected
  • C. WHen resolved
  • D. When resolved and settled

Answer: A

 

NEW QUESTION 73
Given the requirement to refactor the code above to JavaScript class format, which class definition is correct?

  • A. D
  • B. A
  • C. B
  • D. C

Answer: B

 

NEW QUESTION 74
......

Authentic Best resources for CRT-600 Online Practice Exam: https://www.actualtestsit.com/Salesforce/CRT-600-exam-prep-dumps.html