JS-Dev-101 Exam Question 71

Refer to the codebelow:
function foo () {
const a =2;
function bat() {
console.log(a);
}
return bar;
}
Why does the function bar have access to variable a ?
  • JS-Dev-101 Exam Question 72

    Refer to the following code:

    Which statement should be added to line 09 for the code to display. The boat has a capacity of 10 people?
  • JS-Dev-101 Exam Question 73

    A developer has a formatName function that takes two arguments, firstName and lastName and returns a string. They want to schedule the function to run once after five seconds.
    What is the correct syntax toschedule this function?
  • JS-Dev-101 Exam Question 74

    Refer to the code below:
    let o = {
    get js() {
    let city1 = String("st. Louis");
    let city2 = String(" New York");
    return {
    firstCity: city1.toLowerCase(),
    secondCity: city2.toLowerCase(),
    }
    }
    }
    What value can a developer expect when referencing o.js.secondCity?
  • JS-Dev-101 Exam Question 75

    refer to the exhibit.

    Which code change should be done for the console to log the following when 'Click me!' is clicked' > Row log > Table log