Section 1

Preview this deck

How do you declare variables?

Front

Star 0%
Star 0%
Star 0%
Star 0%
Star 0%

0.0

0 reviews

5
0
4
0
3
0
2
0
1
0

Active users

2

All-time users

3

Favorites

0

Last updated

1 year ago

Date created

Mar 1, 2020

Cards (20)

Section 1

(20 cards)

How do you declare variables?

Front

var (keyword) =

Back

What are the two ways to add JS to your site?

Front

Internally and Externally.

Back

Math Based Operators

Front

Back

Example of Conditional ELSE Statement

Front

Else statements allow us to make an alternative statement if original condition is false

Back

What must a variable begin with?

Front

A letter, $ or _

Back

JS Statement

Front

A command that tells the browser what to do. document.write("hello world"); var myName="lorna";

Back

Example of Case Sensitive Vairable

Front

thisIsAVariable

Back

Example of Conditional IF Statement

Front

if (This condition is true) {Do this thing}

Back

Math.random()

Front

Generates a random floating point number between 0 & 1.

Back

Function

Front

Re-useable blocks of instructions that can be executed by name.

Back

What is best practice regarding variable declarations?

Front

Put variable declarations as close to the top of the scope as possible.

Back

Conditionals

Front

Statements that allow for code to be executed against conditionals IF, ELSE statements

Back

How do you add JS to your site externally?

Front

Add by externally linking to .js files.

Back

How do you add JS To your site internally?

Front

Internally using html <script></script> tag. Best practice to place it before closing body tag .

Back

DOM

Front

Document Object model.

Back

Comparison Operators

Front

Back

What kind of value does Boolean take?

Front

True or False

Back

What will an undeclared variable return?

Front

Undefined

Back

Function Example

Front

function sayHello(){ alert ("hello everyone!"); }

Back

What is a variable?

Front

Container for a piece of data

Back