Salesforce Developer JavaScript-Developer-I Real Exam Questions and Answers FREE Updated on Sep 06, 2021
JavaScript-Developer-I Ultimate Study Guide - Dumpexams
NEW QUESTION 60
Given the code below:
What is the expected output?
- A. Both lines 06 and 09 are executed, but the values outputted are undefined.
- B. Line 08 outputs the variable, but line 09 throws an error.
- C. Both lines 08 and 09 are executed, and the variables are outputted.
- D. Line 08 throws an error, therefore line 09 is never executed.
Answer: B
NEW QUESTION 61
Which option is a core Node;js module?
- A. locale
- B. Memory
- C. Path
- D. Ios
Answer: C,D
NEW QUESTION 62
The developer has a function that prints "Hello" to an input name. To test this, thedeveloper created a function that returns "World". However the following snippet does not print " Hello World".
What can the developer do to change the code to print "Hello World" ?
- A. Change line 9 to sayHello(world) ();
- B. Change line 7 to ) () ;
- C. Change line 2 to console.log('Hello' , name() );
- D. Change line 5 to function world ( ) {
Answer: C
NEW QUESTION 63
A 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?
Which three benefits of Node.js can the developer use to persuade their manager?
- A. Ensure stability with one major release every few years.
- B. Executes server-side JavaScript code to avoid learning a new language.
- C. Installs with its own package manager to install and manage third-party libraries.
- D. Uses non-blocking functionality for performant request handling
- E. Performs a static analysis can code before execution to look for runtime errors.
Answer: E
NEW QUESTION 64
Refer to the HTML below:
Which JavaScript statement results in changing ''Tony'' to ''Mr. T. ''?
- A. Document.querySelectorAll ( '#main li, Tony ' ) innerHTNL = Mr, T , ' ;
- B. Document.querySelectorAll ('#main # TONY ') , innerHTML = Mr, T , ' ;
- C. Document.querySelector (' '#main li:second-child') innerHTML, = Mr, T, ';
- D. Document.querySelector (''#main li:nth-child (2) ') , innerHTML = 'Mr . T ';
Answer: B
NEW QUESTION 65
In which situation should a developer include a try... catch block around their function call?
- A. The function contains scheduled code.
- B. The function might raise a runtime error that needs to be handled.
- C. The function has an error that should not be silenced.
- D. The function results in an out of memory issue.
Answer: B
NEW QUESTION 66
A developer wrote the following code to test a sum3 function that takes in an array of numbers and returns the sum of the first three numbers in the array, and the test passes.
A different developer made changes to the behavior of sum3 to instead sum only the first two numbers present in the array.
Which two results occur when running this test on the updated sum3 function?
Choose 2 answers
- A. The line 05 assertion fails.
- B. The line 02 assertion fails.
- C. The line 02 assertion passes.
- D. The line 05 assertion passes.
Answer: A,C
NEW QUESTION 67
Refer to the code below:
What are the value of objBook and newObBook respectively?
- A. ( Title: JavaScript'')
( Title: JavaScript'') - B. (author: ''Robert'' )
(Author: ''Robert '', title: JavaScript'') - C. author: ''Robert title ''javaScript'' ) undefined
- D. ( author: ''Robert'', title JavaScript'' )
( author: ''Robert'', title JavaScript'' )
Answer: C
NEW QUESTION 68
A developer wants to create an object from a function in the browser using the code below.
What happens due to lack of the new keyword on line 02?
- A. Window. === name is assigned to ''hello'' and the variable a n remain undefined.
- B. The a variable is assigned the correct object.
- C. Window. n is assigned the correct object.
- D. The n variable is assigned the correct object but this- remains undefined.
Answer: A
NEW QUESTION 69
Refer to the code below:
What is the result of running line 05?
- A. Only apromise runs.
- B. aPromise and bPromise run sequentially.
- C. Apromise and bpromise run in parallel.
- D. Neither aPromise or bPromise runs.
Answer: D
NEW QUESTION 70
Which statement parses successfully?
- A. JSON. parse (""foo"');
- B. JSON.parse ("foo");
- C. JSON.parse ("foo");
- D. JSON.parse (""foo'");
Answer: A
NEW QUESTION 71
A developer wrote a fizzbuzz function that when passed in a number, returns the following:
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 fizzbuss function?
- A. Let res = fizzbuss (Infinity);
Console.assert (res === '' ) ; - B. Let res = fizzbuss (15) ;
Console. assert (res === 'fizzbuzz' ) ; - C. Let res = fizzbuss (3) ;
Console.assert (res === 'buzz' ) ; - D. Let res = fizzbuss (5) ;
Console. assert (res === '' ) ;
Answer: A,B
NEW QUESTION 72
The developer wants to test the array shown:
Const arr = Array (5) . fill (0);
Which two test are the most accurate for this array? Choose 2 answers
- A. Arr. forEach (elem => console .assert (elem === 0) );
- B. Console,assert(arr(0) === 0 $$ arr (arr .longth ) === 0) ;
- C. Console. Assert (arr. Length > 0) ;
- D. Console,assert(arr.length === 5) ;
Answer: A
NEW QUESTION 73
Refer to the code below:
What are the values for first and second once the executes?
- A. First is why and second is where.
- B. First is who and second is where.
- C. First is why and second is when.
- D. First is who and second is when.
Answer: A
NEW QUESTION 74
Refer to the following code that performs a basis mathematical operation on a provided input:
How should line o2 be written to ensure that x evaluated to 6 in the line below?
Let x calculate (''g'');
- A. Return Number (num + 10) / 3;
- B. Return Number (num) + 10) / 3);
- C. Return Number (num + 10) / 3;
- D. Return integer (num + 10) / 3;
Answer: B
NEW QUESTION 75
......
Ultimate Guide to Prepare JavaScript-Developer-I Certification Exam for Salesforce Developer: https://www.dumpexams.com/JavaScript-Developer-I-real-answers.html
Use Real JavaScript-Developer-I Dumps - Salesforce Correct Answers: https://drive.google.com/open?id=1BpTo8Frukb5BpyXzFDOPUIhBCxuYE-9G