CH. 6 Using JavaScript: the big picture Flashcards

1
Q

two platforms where JavaScript can be used:

A
  • Web browser
  • Node.js
How well did you know this?
1
Not at all
2
3
4
5
Perfectly
2
Q

Node.js is important for web development in three ways:

A
  • You can use it to write server-side software in JavaScript.
  • You can also use it to write software for the command line; (think Unix shell, Windows PowerShell, etc.) As many JavaScript-related tools are based on (and executed via) Node.js.
  • Node’s software registry, npm, has become the dominant way of installing tools (such as compilers and build tools) and libraries; – even for client-side development
How well did you know this?
1
Not at all
2
3
4
5
Perfectly
3
Q

The structure of the two JavaScript platforms web browser and Node.js. are similar with…

A

The APIs “standard library” and “platform API” are hosted on top of a foundational layer with a JavaScript engine and a platform-specific “core”.

How well did you know this?
1
Not at all
2
3
4
5
Perfectly
4
Q

The foundational layer consists of?

A

The JavaScript engine and platform-specific “core” functionality

How well did you know this?
1
Not at all
2
3
4
5
Perfectly
5
Q

Two APIs are hosted on top of this foundation:

A

– The JavaScript standard library is part of JavaScript proper and runs on top of the engine.
– The platform API are also available from JavaScript – it provides access to platform-specific functionality.

How well did you know this?
1
Not at all
2
3
4
5
Perfectly
6
Q

Platform API - In browsers, you need to use the platform-specific API if you want to do anything related to the user interface:

A

to react to mouse clicks, play sounds,
etc.

How well did you know this?
1
Not at all
2
3
4
5
Perfectly
7
Q

Platform API in Node.js, the platform-specific API lets you…

A

read and write files, download data via HTTP, etc.

How well did you know this?
1
Not at all
2
3
4
5
Perfectly