Question 31

A developer wants to use a module named universalContainersLib and then call functions from it.
How should a developer import every function from the module and then call the functions foo and bar?
  • Question 32

    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" ?
  • Question 33

    Refer to code below:
    Let productSKU = '8675309' ;
    A developer has a requirement to generate SKU numbers that are always 19 characters lon, starting with 'sku', and padded with zeros.
    Which statement assigns the values sku0000000008675309 ?
  • Question 34

    Refer to the code below:
    new Promise((resolve, reject) => {
    const fraction = Math.random();
    if( fraction >0.5) reject("fraction > 0.5, " + fraction);
    resolve(fraction);
    })
    .then(() =>console.log("resolved"))
    .catch((error) => console.error(error))
    .finally(() => console.log(" when am I called?"));

    When does Promise.finally on line 08 get called?
  • Question 35

    Refer to the following code:

    Which statement should be added to line 09 for the code to display. The truck 123AB has a weight of 5000 Ib. '?