Basics of Coding Flashcards

1
Q

What is JavaScript?

A

A scripting language you can use to make web pages interactive. It is one of the core technologies of the web, along with HTML and CSS, and is supported by all modern browsers.

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

Data

A

Data is anything that is meaningful to the computer.

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

What are the eight different data types in Javascript?

A
  1. undefined,
  2. null,
  3. boolean
  4. string
  5. symbol,
  6. bigint,
  7. number
  8. object.
How well did you know this?
1
Not at all
2
3
4
5
Perfectly
4
Q

Define the datatypes?

A
  1. undefined = Never defined
  2. null = Defined as nothing
  3. boolean = Logical entity and can have two values: true and false
  4. string = Collection of Characters (Text)
  5. symbol =
  6. bigint = numeric primitive in JavaScript that can represent integers with arbitrary precision.
  7. number = integers
  8. object = complex data type that allows you to store collections of data
How well did you know this?
1
Not at all
2
3
4
5
Perfectly
5
Q

What are variables?

A

Variables are containers for storing data (storing data values).

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

What is HTML and CSS?

A

HTML (HyperText Markup Language) is the contents of the page (links, text)

CSS (Cascading Style Sheets) is the design of the page (color)

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

True of False? Initialization means of assigning an initial value to a variable

A

TRUE

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

What happens when you dont initialize in Javascript?

A

If we just declare a variable without assigning an initial value, the value of the variable will be undefined

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

String vs String Literal

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

True of False : When JavaScript variables are declared, they have an initial value of undefined. If you do a mathematical operation on an undefined variable your result will be NaN which means “Not a Number”.

A

TRUE

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

What does Concatenation mean?

A

the operation of joining two strings together

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

Is Javascript case sensitive?

A

Yes!!! This means that capitalization matters.

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

What is camelCase and why does in matter in Javascript?

A

The use of a capital letter to begin the second word in a compound name or phrase. E.g iPOD or FedEx
The most recommened way to declare JavaScript variables is with camel case variable names, it will ensure that there aren’t multiple variables with the same name.

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

4 WAYS TO DECLARE VARIBLE?

A
  1. Var
  2. let
  3. const.
  4. nothing.
How well did you know this?
1
Not at all
2
3
4
5
Perfectly
15
Q

TRUE OR FALSE? You should always name variables you don’t want to reassign using the const keyword

A

TRUE!!!

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

TRUE OR FALSE :Decimal numbers are sometimes referred to as floating point numbers or floats.

A

TRUE

17
Q

Different ways to add/subtract/divide/multiply on Javascript:

A
(a) let a = 5;
a = a+1;
(b) let a = 5;
a += 5;
18
Q

2 Reasons to use escape characters?

A

To allow you to use characters you may not otherwise be able to type out, such as a carriage return.
To allow you to represent multiple quotes in a string without JavaScript misinterpreting what you mean.

19
Q

Bracket Rotation

A

The first character is actually the zeroth character.