JavaScript-Developer-I Exam Questions Get Updated [2024] with Correct Answers
Practice JavaScript-Developer-I Questions With Certification guide Q&A from Training Expert GuideTorrent
Salesforce JavaScript-Developer-I (Salesforce Certified JavaScript Developer I) Exam is a certification exam that is designed to test the skills and knowledge of developers who use JavaScript in the Salesforce platform. Salesforce Certified JavaScript Developer I Exam certification is ideal for developers who are looking to demonstrate their expertise in using JavaScript to build custom applications, automate business processes, and enhance the user experience in Salesforce.
Salesforce JavaScript-Developer-I exam is designed for professionals who want to validate their skills and knowledge in developing JavaScript applications on the Salesforce platform. Salesforce Certified JavaScript Developer I Exam certification is intended for developers who are proficient in JavaScript and have experience in developing custom applications using Salesforce. JavaScript-Developer-I exam covers various topics such as Lightning Web Components, Apex, and Visualforce, which are essential for building scalable and secure applications on Salesforce.
Salesforce JavaScript-Developer-I exam is a three-hour exam that consists of 60 multiple-choice questions. JavaScript-Developer-I exam is available in English and Japanese and can be taken either online or onsite. The passing score for the exam is 68%, and candidates are given immediate feedback on their results. JavaScript-Developer-I exam fee is $200, and candidates can retake the exam after 15 days if they fail.
NEW QUESTION # 93
Which statement can a developer apply to increment the browser's navigation history without a page refesh?
- A. Window.history,pushState.(newStateObject);
- B. Window.history,state,push.(newStateObject);
- C. Window.history,state,push.(newStateObject, ' ' null;
- D. Window.history,pushState.(newStateObject, ' ', null)) ;
Answer: C
NEW QUESTION # 94
Refer to the HTML below:
Which JavaScript statement results in changing " The Lion."?
- A. document.querySelector('$main li:nth-child(2)'),innerHTML = " The Lion. ';
- B. document.querySelector('$main li.Tony').innerHTML = '" The Lion ';
- C. document.querySelectorAll('$main $TONY').innerHTML = '" The Lion
- D. document.querySelector('$main li:second-child').innerHTML = " The Lion ';
Answer: C
NEW QUESTION # 95
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?
- A. 'Undefined values!'
- B. Line 13 throws an error.
- C. Undefined
- D. 'Null value!'
Answer: A
NEW QUESTION # 96
Refer to the code below:
Which assertion accurately tests the above code?
- A. Console, assert ( await functionalUnderTest (true) , 'not ok) )
- B. Console, assert ( await functionalUnderTest (true) , 'not ok' )
- C. Console, assert ( await functionalUnderTest (true) , 'ok
- D. Console, assert (functionalUnderTest (true) , 'ok')
Answer: D
NEW QUESTION # 97
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.name.startsWIth('N') ? 1: 0;
Return curr+ sum - B. Const sum = curr.name.startsWith('N') ? 1: 0;
Return acc +sum - C. Const sum = curr.startsWith('N') ? 1: 0;
Return acc +sum - D. Const sum = curr.startsWIth('N') ? 1: 0;
Return curr+ sum
Answer: B
NEW QUESTION # 98
Refer to the HTML below:
Which JavaScript statement results in changing ''Tony'' to ''Mr. T. ''?
- A. Document.querySelectorAll ('#main # TONY ') , innerHTML = Mr, T , ' ;
- B. Document.querySelector (''#main li:nth-child (2) ') , innerHTML = 'Mr . T ';
- C. Document.querySelectorAll ( '#main li, Tony ' ) innerHTNL = Mr, T , ' ;
- D. Document.querySelector (' '#main li:second-child') innerHTML, = Mr, T, ';
Answer: A
NEW QUESTION # 99
Given the following code:
What will be the first four numbers logged?
- A. 0012
- B. 0122
- C. 0112
- D. 0123
Answer: B
NEW QUESTION # 100
Refer to the code below:
Let inArray =[ [ 1, 2 ] , [ 3, 4, 5 ] ];
Which two statements result in the array [1, 2, 3, 4, 5] ?
Choose 2 answers
- A. [ ]. Concat.apply ([ ], inArray);
- B. [ ]. concat ( [ ....inArray ] );
- C. [ ]. Concat (... inArray);
- D. [ ]. concat.apply(inArray, [ ]);
Answer: A,C
NEW QUESTION # 101
Refer to the following code that performs a basic mathematical operation on a provided
input:
function calculate(num) {
Return (num +10) / 3;
}
How should line 02 be written to ensure that x evaluates to 6 in the line below?
Let x = calculate (8);
- A. Return Integer(num +10) /3;
- B. Return (Number (num +10 ) / 3;
- C. Return Number(num + 10) / 3;
- D. Return Number((num +10) /3 );
Answer: B
NEW QUESTION # 102
A developer is setting up a Node,js server and is creating a script at the root of the source code, index,js, that will start the server when executed. The developer declares a variable that needs the folder location that the code executes from.
Which global variable can be used in the script?
- A. window.location
- B. _dirname
- C. this.path
- D. _filename
Answer: D
NEW QUESTION # 103
Universal Container(UC) just launched a new landing page, but users complain that the website is slow. A developer found some functions that cause this problem. To verify this, the developer decides to do everything and log the time each of these three suspicious functions consumes.
console.time('Performance');
maybeAHeavyFunction();
thisCouldTakeTooLong();
orMaybeThisOne();
console.endTime('Performance');
Which function can the developer use to obtain the time spent by every one of the three functions?
- A. console.timeStamp()
- B. console.trace()
- C. console.timeLog()
- D. console.getTime()
Answer: C
NEW QUESTION # 104
A developer has the function, shown below, that is called when a page loads.
Where can the developer see the log statement after loading the page in the browser?
- A. On the browser JavaScriptconsole
- B. On the webpage console log
- C. On the terminal console running the web server
- D. In the browser performance tools log
Answer: A
NEW QUESTION # 105
Refer to the following code:
Let sampletext = 'The quick brown fox Jumps';
A developer need to determine if a certain substring is part of a string.
Which three expressions return true for the give substring? Choose 3 answers
- A. sampleText.includes (fox' , 3);
- B. sampleText.indexof ('quick') 1== -1;
- C. sampleText.includes (quick', 4);
- D. sampleText.inclides (fox');
- E. sampleText.substing ('fox');
Answer: A
NEW QUESTION # 106
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, 4, 5, 4]
- B. [1, 2, 3, 4, 5, 4, 4]
- C. [1, 2, 3, 4, 5, 4]
- D. [1, 2, 3, 5]
Answer: C
NEW QUESTION # 107
A developer is wondering whether to use, Promise.then or Promise.catch, especially
when a Promise throws an error?
Which two promises are rejected?
Which 2 are correct?
- A. New Promise(() => (throw 'cool error here'}).then(null, error => console.error(error)));
- B. Promise.reject('cool error here').catch(error => console.error(error));
- C. Promise.reject('cool error here').then(error => console.error(error));
- D. New Promise((resolve, reject) => (throw 'cool error here'}).catch(error =>
console.error(error)) ;
Answer: B,D
NEW QUESTION # 108
developer is trying to convince management that their team will benefit from using
Node.js for a backend server that they are going to create. The server will be a web server that
handles API requests from a website that the team has already built using HTML, CSS, and
JavaScript.
Which three benefits of Node.js can the developer use to persuade their manager?
Choose 3 answers:
- A. Executes server-side JavaScript code to avoid learning a new language.
- B. I nstalls with its own package manager to install and manage third-party libraries.
- C. Ensures stability with one major release every few years.
- D. User non blocking functionality for performant request handling .
- E. Performs a static analysis on code before execution to look for runtime errors.
Answer: B,D,E
NEW QUESTION # 109
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 FileReader();
08 if (file) reader.readAsDataURL(file); - B. 04 const reader = new File();
08 if (file) URL.createObjectURL(file); - C. 04 const reader = new FileReader();
08 if (file) URL.createObjectURL(file); - D. 04 const reader = new File();
08 if (file) reader.readAsDataURL(file);
Answer: A
NEW QUESTION # 110
A developer is required to write a function that calculates the sum of elements in an array but is getting undefined every time the code is executed. The developer needs to find what is missing in the code below.
Which option makes the code work as expected?
- A. Replace line 05 with return results;
- B. Replace line 04 with result + current ;
- C. Replace line 03 with if 9 (arr. Length == 0) ( return 0; )
- D. Replace line 02 with return arr. map ( (result, current => (
Answer: A
NEW QUESTION # 111
......
Prepare Top Salesforce JavaScript-Developer-I Exam Audio Study Guide Practice Questions Edition: https://lead2pass.guidetorrent.com/JavaScript-Developer-I-dumps-questions.html