• Shuffle
    Toggle On
    Toggle Off
  • Alphabetize
    Toggle On
    Toggle Off
  • Front First
    Toggle On
    Toggle Off
  • Both Sides
    Toggle On
    Toggle Off
  • Read
    Toggle On
    Toggle Off
Reading...
Front

Card Range To Study

through

image

Play button

image

Play button

image

Progress

1/16

Click to flip

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
0 === -0; // true

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?
3 === 3.0;

true


They share the same type and value.

Think about the type is each value.

True or false?


42 === "42";

false

One is an integer while the other is a string.

Keep in mind that strict equality checks both value and type.

True or false?
42 == "42";

true




For loose equality, the type does not need to be the same.

`==` is loose equality

True or false?
1 == true;

true

`==` is loose equality

How do you import the following from `example.js` file:

export function create(title,author,pubDate) {
....
}

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
- Null
- Undefined
- Number
- String
- Symbol

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.