Git Product home page Git Product logo

02-tools-context's Introduction

cf 02: Tools and Context

Feature Tasks

Scope and Context

Given the code linked HERE, answer the set of questions below. Please copy the questions to your lab directory in a file called answers.md.

Questions:

  1. When this code is run in Node, e.g. node index.js, what are the two stages of execution for this file called, and which order do they happen in?

  2. Write an explanation, using as much space as you need, relating to how the first stage of execution for this file operates.

    • For example, identify the high level steps in a line by line overview and then define what each of those steps are accomplishing.
  3. Write an explanation, using as much space as you need, relating to how the second stage of execution for this file operates.

    • For example, identify the high level steps in a line by line overview and then define what each of those steps are accomplishing.
  4. During the second stage of execution how many scopes have been registered by the engine?

    • Which segments of the code do they belong to?
    • Please identify any variables/refs and which scope each belongs to?
  5. When line 13 invokes the baz function, which foo will be assigned a value of bam? More specifically, bam will be assigned to the foo in ??? scope. Give a brief description in your own words to support your conclusion.

  6. Which scope, if any, will the variable bam on line 11 be registered to when the first stage of execution occurs on this file? Provide a brief description in your own words to support your conclusion.

  7. For each line, 16 through 19, what is the return value for each?

02-tools-context's People

Watchers

 avatar  avatar

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    ๐Ÿ–– Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. ๐Ÿ“Š๐Ÿ“ˆ๐ŸŽ‰

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google โค๏ธ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.