Question 26

Refer to code below:
console.log(0);
setTimeout(() => (
console.log(1);
});
console.log(2);
setTimeout(() => {
console.log(3);
), 0);
console.log(4);
In which sequence will the numbers be logged?
  • Question 27

    Given the following code:

    What will be the first four numbers logged?
  • Question 28

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

    Cloud Kicks has a class to represent items for sale in an online store, as shown below:
    Class Item{
    constructor (name, price){
    this.name = name;
    this.price = price;
    }
    formattedPrice(){
    return 's' + String(this.price);}}
    A new business requirement comes in that requests a ClothingItem class that should have all of the properties and methods of the Item class but will also have properties that are specific to clothes.
    Which line of code properly declares the clothingItem class such that it inherits from Item?
  • Question 30

    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 ?