Search Header Logo
JavaScript Modules

JavaScript Modules

Assessment

Presentation

Computers

Professional Development

Medium

Created by

Lazaro Alsina

Used 22+ times

FREE Resource

9 Slides • 6 Questions

1

JavaScript Modules

Welcome to introduction to Node, and browsers runtime environment.


As well as what are modules!

media

2

Browsers Runtime Environment

Using JavaScript on your browser.

media

3

Browser Runtime Env

The code we have been running relies on an environment. The most common one, known as the front end, is the browser.


The issue here is we need the browser to run Javascript or use other programming languages like Java or PHP.


Thank to NODE, this had changed.

media

4

The power of Javascript expanded

The Node environment allows us to create code without a browser, meaning we can create full-stack software.


As you can see, this code to your right is running on a PowerShell!

media

5

Multiple Choice

Javascript can only be run on a browser.

1

True

2

False

6

7

The power of flexible and reusable code.

Modules allow us to add code in a special way. It allows us to segment our programs in a way that allows us to work more effectively in groups and debug our code.


It would be nice if someone who is amazing with math, makes all the math modules we need for our program. While we focus on other parts like the database module!

media

8

Benefits of using Modules

  • Compose Software: Using modules like lego blocks, building parts of the program. E.G, we have a team of programmers; one builds the house, another builds a car.

  • Isolate components: The programmers can build the module that needed for the project without usually thinking about the entire codebase. E.G, one programmer makes a lego car, there no need for him/her/they to worry about the housing module yet...

  • Organized code: Modules tend to be more organized for the main codebase.

  • Reuse code: Modules make it really easy to reuse the same code, even one more than one project.

9

Fill in the Blank

What concept are we talking about below, this statement about modules?


The programmers can build the module needed for the project without usually thinking about the entire codebase. E.g., one programmer makes a lego car, there no need for him/her/them to worry about the housing module yet...

10

Demo Time

On slide 4, we used node to run the meal maker. It would be a waste not to use it again in a new program that I like to call the Meal of the day!

media

11

Multiple Choice

How Node.js modules are available externally

1

module.exports

2

module.spread

3

module.expose

4

none of the above

12

Multiple Choice

Which function is used to include the modules in Node.js

1

include();

2

require();

3

attach();

4

None of the above

13

Multiple Choice

Who made node.js?

1

Hampton Catlin

2

Ryan Dahl

3

Isaac Z. Schlueter

4

GitHub

14

Poll

How do you feel?

Comfortable

Stretch

Panic

15

web page not embeddable

CodecademyMini Arrow Down Icon

You can open this webpage in a new tab.

JavaScript Modules

Welcome to introduction to Node, and browsers runtime environment.


As well as what are modules!

media

Show answer

Auto Play

Slide 1 / 15

SLIDE