Free Certification Preparation for Salesforce JavaScript Developer I Exam CRT-600 Exam Practice Test

UNLOCK FULL
CRT-600 Exam Features
In Just $59 You can Access
  • All Official Question Types
  • Interactive Web-Based Practice Test Software
  • No Installation or 3rd Party Software Required
  • Customize your practice sessions (Free Demo)
  • 24/7 Customer Support
Page: 1 / 45
Total Questions: 224
  • A developer wrote a fizzbuzz function that when passed in a number, returns thefollowing: 'Fizz' if the number is divisible by 3. 'Buzz' if the number is divisible by 5. 'Fizzbuzz' if the number is divisible by both 3 and 5. Empty string if the number is divisible by neither 3 or 5.Which two test cases will properly test scenarios for the fizzbuzz function?Choose 2 answers

    Answer: B, C, D Next Question
  • 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?

    Answer: B Next Question
  • A developer wants to leverage a module to print a price in pretty format, and has imported a method as shown below:Import printPrice from '/path/PricePrettyPrint.js';Based on the code, what must be true about the printPrice function of the PricePrettyPrint module for this import to work ?

    Answer: C Next Question
  • A developer receives a comment from the Tech Lead that the code given below haserror:const monthName = 'July';const year = 2019;if(year === 2019) {monthName = 'June';}Which line edit should be made to make this code run?

    Answer: A Next Question
  • Refer to the following object:const cat ={firstName: 'Fancy',lastName: ' Whiskers',Get fullName() {return this.firstName + ' ' + this.lastName;}};How can a developer access the fullName property for cat?

    Answer: A Next Question
  • A class was written to represent items for purchase in an online store, and a second classRepresenting items that are on sale at a discounted price. THe constructor sets the name to thefirst value passed in. The pseudocode is below:Class Item {constructor(name, price) {... // Constructor Implementation}}Class SaleItem extends Item {constructor (name, price, discount) {...//Constructor Implementation}}There is a new requirement for a developer to implement a description method that will return abrief description for Item and SaleItem.Let regItem =new Item('Scarf', 55);Let saleItem = new SaleItem('Shirt' 80, -1);Item.prototype.description = function () { return 'This is a ' + this.name;console.log(regItem.description());console.log(saleItem.description());SaleItem.prototype.description = function () { return 'This is a discounted ' +this.name; }console.log(regItem.description());console.log(saleItem.description());What is the output when executing the code above ?

    Answer: B Next Question
  • Which code change should be done for the console to log the following when 'Click me!' is clicked'> Row log> Table log

    Answer: B Next Question
  • Refer to code below:function Person() {this.firstName = 'John';}Person.prototype ={Job: x => 'Developer'};const myFather = new Person();const result =myFather.firstName + ' ' + myFather.job();What is the value of the result after line 10 executes?

    Answer: D Next Question
  • A developer creates a simple webpage with an input field. When a user enters text in the input field and clicks the button, the actual value of the field must be displayed in the console.Here is the HTML file content:<input type ='' text'' value=''Hello'' name =''input''><button type =''button'' >Display </button> The developer wrote the javascript code below:Const button = document.querySelector('button');button.addEvenListener('click', () => (Const input = document.querySelector('input');console.log(input.getAttribute('value'));When the user clicks the button, the output is always ''Hello''.What needs to be done to make this code work as expected?

    Answer: A Next Question
  • A developer at Universal Containers is creating their new landing page based on HTML, CSS, and JavaScript. The website includes multiple external resources that are loaded when the page is opened.To ensure that visitors have a good experience, a script named personalizeWebsiteContent needs to be executed when the webpage Is loaded and there Is no need to wait for the resources to be available.Which statement should be used to call personalizeWebsiteContent based on the above business requirement?

    Answer: A Next Question
Page: 1 / 45
Total Questions: 224