JAVASCRIPT-DEVELOPER-I Exam Details

  • Exam Code
    :JAVASCRIPT-DEVELOPER-I
  • Exam Name
    :Salesforce Certified JavaScript Developer (JS-Dev-101)
  • Certification
    :Salesforce Certifications
  • Vendor
    :Salesforce
  • Total Questions
    :223 Q&As
  • Last Updated
    :Jul 04, 2026

Salesforce JAVASCRIPT-DEVELOPER-I Online Questions & Answers

  • Question 171:

    bar, awesome is a popular JavaScript module. the versions publish to npm are:

    Teams at Universal Containers use this module in a number of projects. A particular project has the package, jsondefinition below.

    A developer runs this command: npm install. Which version of bar .awesome is installed?

    A. 1.3.1
    B. 1.3.5
    C. The command fails, because version 130 is not found
    D. 1.4.0

  • Question 172:

    Refer to the following code:

    class Vehicle{

    constructor(plate){

    this.plate = plate;

    }

    }

    class Truck extends Vehicle{

    constructor(plate, weight){

    //Missing code

    this.weight = weight;

    }

    displayWeight(){

    console.log(`The truck ${this.plate} has a weight of ${this.weight}lb.`);

    }

    }let myTruck = new Truck('123Ab',5000);

    myTruck.displayWeight();

    Which statement should be added to missing code for the code to display 'The truck 123AB has a weight of 5000lb.

    A. super(plate)
    B. super.plate = plate
    C. Vehicle.plate = plate
    D. this.plate= plate

  • Question 173:

    Refer to the code below:

    What is the value of result when the code executes?

    A. 10-10
    B. 5-5
    C. 10-5
    D. 5-10

  • Question 174:

    Universal Containers recently launched its new landing page to host a crowd-funding campaign. The page uses an external library to display some third-party ads. Once the page is fully loaded, it creates more than 50 new HTML items placed randomly insidethe DOM, like the one in the code below:

    All the elements includes the same ad-library-item class, They are hidden by default, and they are randomly displayed while the user navigates through the page.

    A. Use the DOM inspector to prevent the load eventto be fired.
    B. Use the browser to execute a script that removes all the element containing the class ad-library-item.
    C. Use the DOM inspector to remove all the elements containing the class ad-library-item.
    D. Use the browser console to execute a scriptthat prevents the load event to be fired.

  • Question 175:

    Developer creates a new web server that uses Node.js. It imports a server library that uses events and callbacks for handling server functionality.

    The server library is imported with require and is made available to the code by a variable named server. The developer wants to log any issues that the server has while booting up.

    Given the code and the information the developer has, which code logs an error at boost with an event?

    A. Server.catch ((server) => { console.log(`ERROR', error); });
    B. Server.error ((server) => { console.log(`ERROR', error); });
    C. Server.on (`error', (error) => { console.log(`ERROR', error); });
    D. Try{ server.start(); } catch(error) { console.log(`ERROR', error); }

  • Question 176:

    A developer copied a JavaScript object:

    How does the developer access dan's forstName,lastName? Choose 2 answers

    A. dan,name
    B. dan,firstname ( ) + dan, lastName ( )
    C. dan, firstName = dan.lastName
    D. dan,name ( )

  • Question 177:

    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 number in the array, The test passes:

    Let res = sum2([1, 2, 3 ]) ;

    console.assert(res ===6 );

    Res = sum3([ 1, 2, 3, 4]);

    console.assert(res=== 6);

    A different developer made changes to the behavior of sum3 to instead sum all of the numbers present in the array. The test passes:

    Which two results occur when running the test on the updated sum3function?

    Choose 2 answers

    A. The line 02 assertion passes.
    B. The line 02 assertion fails
    C. The line 05 assertion passes.
    D. The line 05 assertion fails.

  • Question 178:

    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 () (20)
    B. Sum (5, 5) ()
    C. sum() (5, 5)
    D. sum(5)(5)
    E. sum(10) ()

  • Question 179:

    Which code statement correctly retrieves and returns an object from localStorage?

    A. const retrieveFromLocalStorage = () =>{ return JSON.stringify(window.localStorage.getItem(storageKey)); }
    B. const retrieveFromLocalStorage = (storageKey) =>{ return window.localStorage.getItem(storageKey); }
    C. const retrieveFromLocalStorage = (storageKey) =>{ return JSON.parse(window.localStorage.getItem(storageKey)); }
    D. const retrieveFromLocalStorage = (storageKey) =>{ return window.localStorage[storageKey]; }

  • Question 180:

    A developer is setting up a new Node.js server with a client library that is built using events and callbacks.

    The library:

    Will establish a web socket connection and handle receipt of messages to the server

    Will be imported with require, and made available with a variable called we.

    The developer also wants to add error logging if a connection fails.

    Given this info, which code segment shows the correct way to set up a client with two events that listenat execution time?

    A. ws.connect (( ) => { console.log(`connected to client'); }).catch((error) => { console.log(`ERROR' , error); }};
    B. ws.on (`connect', ( ) => { console.log(`connected to client'); ws.on(`error', (error) => { console.log(`ERROR' ,error); }); }); C. ws.on (`connect', ( ) => { console.log(`connected to client'); }}; ws.on(`error', (error) => { console.log(`ERROR' , error); }};
    C. try{ ws.connect (( ) => { console.log(`connected to client'); }); } catch(error) { console.log(`ERROR' ,error); }; }

Tips on How to Prepare for the Exams

Nowadays, the certification exams become more and more important and required by more and more enterprises when applying for a job. But how to prepare for the exam effectively? How to prepare for the exam in a short time with less efforts? How to get a ideal result and how to find the most reliable resources? Here on Vcedump.com, you will find all the answers. Vcedump.com provide not only Salesforce exam questions, answers and explanations but also complete assistance on your exam preparation and certification application. If you are confused on your JAVASCRIPT-DEVELOPER-I exam preparations and Salesforce certification application, do not hesitate to visit our Vcedump.com to find your solutions here.