Question 41

Which statement accurately describes an aspect of promises?
  • Question 42

    Consider type coercion, what does the following expression evaluate to?
    True + 3 + '100' + null
  • Question 43

    A test has a dependency on database. query. During the test, the dependency is replaced with an object called database with the method,
    Calculator query, that returns an array. The developer does not need to verify how many times the method has been called.
    Which two test approaches describe the requirement?
    Choose 2 answers
  • Question 44

    Refer to the code below:
    let timeFunction =() => {
    console.log('Timer called.");
    };
    let timerId = setTimeout (timedFunction, 1000);
    Which statement allows a developer to cancel the scheduled timed function?
  • Question 45

    Refer to the code below:
    for(let number =2 ; number <= 5 ; number += 1 ) {
    // insert code statement here
    }
    The developer needs to insert a code statement in the location shown. The code
    statement has these requirements:
    1. Does require an import
    2. Logs an error when the boolean statement evaluates to false
    3. Works in both the browser and Node.js
    Which meet the requirements?