Use LEFT and RIGHT arrow keys to navigate between flashcards;
Use UP and DOWN arrow keys to flip the card;
H to show hint;
A reads text to speech;
16 Cards in this Set
- Front
- Back
- 3rd side (hint)
Polymorphism |
Also known as class inheritance. |
Related to classes |
|
What are some incorrect returns for strict equality ('===')? |
NaN === NaN; // false |
Related to numbers. |
|
In what case is `x === y` true? |
Both reference the same object, such as an array. |
|
|
How do you measure structural equality? For example, how can you check x and y so that they are true, where x = [1,2,3]; y = [1,2,3]? |
In Javascript, you can't. You will need to programmatically check it yourself. |
Kind of a trick question. |
|
What variable does `catch` declare and what is its scope? |
`catch` declares a variable, `err`, which is a block-scoped variable that exists only inside `catch`, as if it is a `let`. |
Think of the `let` variable's scope. |
|
How can you distinguish value types? |
Use the `typeof` operator. |
Use a certain operator. |
|
True or false? |
true They share the same type and value. |
Think about the type is each value. |
|
True or false? 42 === "42"; |
false |
Keep in mind that strict equality checks both value and type. |
|
True or false? |
true For loose equality, the type does not need to be the same. |
`==` is loose equality |
|
True or false? |
true |
`==` is loose equality |
|
How do you import the following from `example.js` file: |
import { create as semanticName } from "example.js"; or alternatively: import create from "example.js"; |
Remember that including a semantic name is only optional. |
|
Why does it matter that each file is a program? |
Since JS treats files as programs, one file may fail and that does not prevent the next file from being processed. |
What might happen if Javascript fails? |
|
What are the two types of values? |
primitive and object |
We commonly speak about cave-people having a ______ society. |
|
Name all six primitive types |
- Boolean |
It's not exactly listed in YDKJS, so don't worry if you don't get it the first time. |
|
Definition of an object type? |
An unordered, keyed collection of ANY various values. |
It's a collection of... |
|
Don't use `3.141592` for Pi. Instead use... |
`Math.PI` |
It's a predefined value. |