1. Intro - Part A Flashcards

1
Q

What is JS?

2x

A

Created to “make web pages come alive”

Programs are called “scripts”

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

How is JS code provided and executed?

3x

A

Can be written in a web page’s HTML
Runs automatically as page loads
As plain text - no special preparation or compilation needed to run

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

Where is JS code executed?

3x

A

Browser
Server
Any device that has JS engine

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

What is a JavaScript engine?

A

Special program for enabling JS to be executed

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

What is the JavaScript engine embedded in the browser sometimes called?

A

JavaScript virtual machine

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

Give codenames for commonly used browser engines

5 x

A
Chrome, Opera: V8
Firefox: SpiderMonkey
IE: Trident, Chakra
Edge: ChakraCore
Safari: Nitro, SquirrelFish
How well did you know this?
1
Not at all
2
3
4
5
Perfectly
7
Q

Summarise how engines work

3x

A
  1. Reads (parses) the script
  2. Converts (compiles) the script to machine language
  3. Machine code runs at a fast speed
How well did you know this?
1
Not at all
2
3
4
5
Perfectly
8
Q

What takes place at each stage of engine’s process?

2x

A

Optimisations

Analyses data flowing through script to further optimise machine code

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

What can in-browser JS do?

3x

A

Everything to do with:
Webpage manipulation
Interaction with the user
Interaction with the webserver

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

Give examples of in-browser JS actions

5x

A

Add to / amend page content, modify styles
React to user actions: mouse clicks, pointer movements, key presses
Send requests over network to remote servers, download/upload files (AJAX & COMET technologies)
Get and set cookies, show messages and ask questions to the visitor
Remember data on client-side (local storage)

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