Free CRT-600 Exam Braindumps certification guide Q&A [Q81-Q103]

Share

Free CRT-600 Exam Braindumps certification guide Q&A

CRT-600 Certification Overview Latest CRT-600 PDF Dumps

NEW QUESTION 81
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

  • A. sum() (5, 5)
  • B. sum(5)(5)
  • C. Sum () (20)
  • D. sum(10) ()
  • E. Sum (5, 5) ()

Answer: A,B

 

NEW QUESTION 82
Refer to the code below:
Let textValue = '1984';
Which code assignment shows a correct way to convert this string to an integer?

  • A. Let numberValue = textValue.toInteger();
  • B. Let numberValue = Integer(textValue);
  • C. Let numberValue = (Number)textValue;
  • D. let numberValue = Number(textValue);

Answer: D

 

NEW QUESTION 83
Which two code snippets show working examples of a recursive function?
Choose 2 answers

  • A. Const sumToTen = numVar => {
    If (numVar < 0)
    Return;
    return sumToTen(numVar + 1)};
  • B. Let countingDown = function(startNumber) {
    If ( startNumber >0) {
    console.log(startNumber) ;
    return countingDown(startNUmber);
    } else {
    return startNumber;
    }};
  • C. Const factorial =numVar => {
    If (numVar < 0) return;
    If ( numVar === 0 ) return 1;
    return numVar * factorial ( numVar - 1 );
    };
  • D. Function factorial ( numVar ) {
    If (numVar < 0) return;
    If ( numVar === 0 ) return 1;
    return numVar -1;

Answer: B,C

 

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

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

Answer: B

 

NEW QUESTION 85
Refer to the code below?
Let searchString = ' look for this ';
Which two options remove the whitespace from the beginning of searchString?
Choose 2 answers

  • A. searchString.trimStart();
  • B. trimStart(searchString);
  • C. searchString.replace(/*\s\s*/, '');
  • D. searchString.trimEnd();

Answer: A,C

 

NEW QUESTION 86
At Universal Containers, every team has its own way of copying JavaScript objects. The code Snippet shows an implementation from one team:
Function Person() {
this.firstName = "John";
this.lastName = 'Doe';
This.name =() => (
console.log('Hello $(this.firstName) $(this.firstName)');
)}
Const john = new Person ();
Const dan = JSON.parse(JSON.stringify(john));
dan.firstName ='Dan';
dan.name();
What is the Output of the code execution?

  • A. Hello John DOe
  • B. TypeError: dan.name is not a function
  • C. Hello Dan Doe
  • D. TypeError: Assignment to constant variable.

Answer: B

 

NEW QUESTION 87
developer has a web server running with Node.js. The command to start the web server is node server,js. The web server started having latency issues. Instead of a one second turn around for web requests, the developer now sees a five second turnaround, Which command can the web developer run to see what the module is doing during the latency period?

  • A. NODE_DEBUG =http, https node server.js
  • B. DEBUG = http, https node server.js
  • C. NODE_DEBUG =true node server.js
  • D. DEBUG =true node server.js

Answer: D

 

NEW QUESTION 88
Given the code below:
const delay = sync delay => {
Return new Promise((resolve, reject) => {
setTimeout (resolve, delay);});};
const callDelay =async () =>{
const yup =await delay(1000);
console.log(1);
What is logged to the console?

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

Answer: C

 

NEW QUESTION 89
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. A variable displaying the number of instances created for the Car Object.
  • C. The style, event listeners and other attributes applied to the carSpeed DOM element
  • D. The values of the carSpeed and fourWheels variables

Answer: A,C

 

NEW QUESTION 90
A test has a dependency on database.query. During the test the dependency is replaced with an object called database with the method, query, that returns an array. The developer needs to verify how many times the method was called and the arguments used each time.
Which two test approaches describe the requirement?
Choose 2 answers

  • A. Integration
  • B. Black box
  • C. Mocking
  • D. White box

Answer: C,D

 

NEW QUESTION 91
The developer wants to test this code:
Const toNumber =(strOrNum) => strOrNum;
Which two tests are most accurate for this code?
Choose 2 answers

  • A. console.assert(Number.isNaN(toNumber()));
  • B. console.assert(toNumber('-3') < 0);
  • C. console.assert(toNumber () === NaN);
  • D. console.assert(toNumber('2') === 2);

Answer: B,D

 

NEW QUESTION 92
developer wants to use a module named universalContainersLib and them call functions from it.
How should a developer import every function from the module and then call the fuctions foo and bar ?

  • A. import * from '/path/universalContaineraLib.js';
    universalContainersLib.foo();
    universalContainersLib.bar();
  • B. import all from '/path/universalContaineraLib.js';
    universalContainersLib.foo();
    universalContainersLib.bar();
  • C. import * ad lib from '/path/universalContainersLib.js';
    lib.foo();
    lib.bar();
  • D. import (foo, bar) from '/path/universalContainersLib.js';
    foo();
    bar();

Answer: C

 

NEW QUESTION 93
Refer to the code below:
Let foodMenu1 = ['pizza', 'burger', 'French fries'];
Let finalMenu = foodMenu1;
finalMenu.push('Garlic bread');
What is the value of foodMenu1 after the code executes?

  • A. [ 'Garlic bread']
  • B. [ 'Garlic bread' , 'pizza','Burger', 'French fires' ]
  • C. [ 'pizza','Burger', 'French fires']
  • D. [ 'pizza','Burger', 'French fires', 'Garlic bread']

Answer: C

 

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

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

Answer: A

 

NEW QUESTION 95
Which statement accurately describes an aspect of promises?

  • A. In a.then() function, returning results is not necessary since callbacks will catch the result of a previous promise.
  • B. .then() cannot be added after a catch.
  • C. .then() manipulates and returns the original promise.
  • D. Arguments for the callback function passed to .then() are optional.

Answer: D

 

NEW QUESTION 96
Refer to the code below:
Const resolveAfterMilliseconds = (ms) => Promise.resolve (
setTimeout (( => console.log(ms), ms ));
Const aPromise = await resolveAfterMilliseconds(500);
Const bPromise = await resolveAfterMilliseconds(500);
Await aPromise, wait bPromise;
What is the result of running line 05?

  • A. Only aPromise runs.
  • B. aPromise and bPromise run in parallel.
  • C. aPromise and bPromise run sequentially.
  • D. Neither aPromise or bPromise runs.

Answer: D

 

NEW QUESTION 97
Refer to the code below:

Line 05 causes an error.
What are the values of greeting and salutation once code completes?

  • A. Greeting is Hello and salutation is Hello, Hello.
  • B. Greeting is Goodbye and salutation is I say Hello.
  • C. Greeting is Goodbye and salutation is Hello, Hello.
  • D. Greeting is Hello and salutation is I say hello.

Answer: A

 

NEW QUESTION 98
A developer wants to create an object from a function in the browser using the code below:
Function Monster() { this.name = 'hello' };
Const z = Monster();
What happens due to lack of the new keyword on line 02?

  • A. The z variable is assigned the correct object.
  • B. Window.m is assigned the correct object.
  • C. Window.name is assigned to 'hello' and the variable z remains undefined.
  • D. The z variable is assigned the correct object but this.name remains undefined.

Answer: C

 

NEW QUESTION 99
Which code statement below correctly persists an objects in local Storage ?

  • A. const setLocalStorage = ( jsObject) => {
    window.localStorage.connectObject(jsObject));
    }
  • B. const setLocalStorage = (storageKey, jsObject) => {
    window.localStorage.persist(storageKey, jsObject);
    }
  • C. const setLocalStorage = (storageKey, jsObject) => {
    window.localStorage.setItem(storageKey, JSON.stringify(jsObject));
    }
  • D. const setLocalStorage = ( jsObject) => {
    window.localStorage.setItem(jsObject);
    }

Answer: C

 

NEW QUESTION 100
Which three options show valid methods for creating a fat arrow function?
Choose 3 answers

  • A. X,y,z => ( console.log(' executed ') ;)
  • B. [ ] => ( console.log(' executed ') ;)
  • C. x => ( console.log(' executed ') ; )
  • D. ( ) => ( console.log(' executed ') ;)
  • E. (x,y,z) => ( console.log(' executed ') ;)

Answer: C,E

 

NEW QUESTION 101
is below:
<input type="file" onchange="previewFile()">
<img src="" height="200" alt="Image Preview..."/>
The JavaScript portion is:
01 function previewFile(){
02 const preview = document.querySelector('img');
03 const file = document.querySelector('input[type=file]').files[0];
04 //line 4 code
05 reader.addEventListener("load", () => {
06 preview.src = reader.result;
07 },false);
08 //line 8 code
09 }
In lines 04 and 08, which code allows the user to select an image from their local computer , and to display the image in the browser?

  • A. 04 const reader = new File();
    08 if (file) reader.readAsDataURL(file);
  • B. 04 const reader = new FileReader();
    08 if (file) URL.createObjectURL(file);
  • C. 04 const reader = new File();
    08 if (file) URL.createObjectURL(file);
  • D. 04 const reader = new FileReader();
    08 if (file) reader.readAsDataURL(file);

Answer: D

 

NEW QUESTION 102
Refer to the code snippet below:
Let array = [1, 2, 3, 4, 4, 5, 4, 4];
For (let i =0; i < array.length; i++){
if (array[i] === 4) {
array.splice(i, 1);
}
}
What is the value of the array after the code executes?

  • A. [1, 2, 3, 4, 5, 4, 4]
  • B. [1, 2, 3, 4, 5, 4]
  • C. [1, 2, 3, 4, 4, 5, 4]
  • D. [1, 2, 3, 5]

Answer: B

 

NEW QUESTION 103
......


Salesforce CRT-600 Exam Syllabus Topics:

TopicDetails
Topic 1
  • Creating Objects, Object Prototypes, Defining Functions
Topic 2
  • Server Side JavaScript Debugging in Node.js, Node.js Libraries
Topic 3
  • Type Conversion (explicit and implicit)
  • Working with JSON
  • Data Types and Variables
Topic 4
  • Objects, Functions, and Classes
  • Using JavaScript Modules
  • Declaring Classes
Topic 5
  • Browser and Events
  • Document Object Model
  • Browser Dev Tools
Topic 6
  • Debugging and Error Handling
  • Throwing and Catching Errors
  • Working with the Console

 

The Best Salesforce CRT-600 Study Guides and Dumps of 2022: https://www.pass4guide.com/CRT-600-exam-guide-torrent.html

Top Salesforce CRT-600 Exam Audio Study Guide! Practice Questions Edition: https://drive.google.com/open?id=1_JRdb1KCYiM0VBkL0VOBt6caRppyF6BL