Section 1

Preview this deck

What does it mean that JavaScript is an interpreted language?

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

0

All-time users

0

Favorites

0

Last updated

6 years ago

Date created

Mar 1, 2020

Cards (23)

Section 1

(23 cards)

What does it mean that JavaScript is an interpreted language?

Front

This means that JavaScript is not pre-compiled, but instead compiled at runtime.

Back

What is the form of the JavaScript ternary operator?

Front

<conditional> ? true : false

Back

What is the for-in loop in JavaScript?

Front

The for-in loop iterates over the enumerable properties of an object. For each distinct property, statement can be executed.

Back

What are some advantages that can be gained through using JavaScript

Front

Less server interaction - Allows for client-side validation of user-input, reducing the number of unsuccessful HTTP requests. Increased Interactivity - The Document Object Model can be manipulated based on different events initiated by the user

Back

Is JavaScript case sensitive?

Front

Yes.

Back

What is an IIFE?

Front

An IIFE is an immediately invokable function expression. It is an anonymous function that is created and then immediately invoked. It is not called from anywhere else, but just runs after being created.

Back

What is an event?

Front

An event is when the user or the browser manipulates a page.

Back

What is the DOM?

Front

DOM stands for Document Object Model. It is a representation of the HTML document displayed in a window. Objects are organized in a hierarchy.

Back

What are three different ways you can create variables in JavaScript and when would you use each?

Front

var - The scope of the variable is its current execution context (use let or const instead after ECMAScript 6) let - The scope of the variable is limited to the block on which it is used const - The scope of const is similar to let statements, but once assigned a value, cannot be changed

Back

Does JavaScript has data types? If it does, what are they?

Front

Yes. They are Boolean, Null, Undefined, Number, String, Object.

Back

What is ECMAScript and how does it relate to JavaScript?

Front

ECMA is a standardized specification for JavaScript.

Back

What is hoisting in JavaScript?

Front

Hoisting is a JavaScript mechanism where variables and function declarations are moved to the top of their scope before code execution.

Back

What is JavaScript?

Front

JavaScript is a lightweight, interpreted programming language designed for creating network-centric applications. It is most commonly utilized by client-side technologies.

Back

What is the typeof operator?

Front

The typeof operator is a unary operator that is place before its single operand. It returns a string indicating the data type of the operand at runtime.

Back

What are event listeners? Name three ways that you can implement event listeners.

Front

Event listeners are procedures or functions that wait for an event to occur. 1. Give an HTML element an attribute of on_____ and assign it a value of a JavaScript statement. 2. Assign a function to the the on_____ property of an object 3. Call the object's addEventListener() function and pass it the name of the event, and the JavaScript to execute.

Back

What are some of the events recognized by JavaScript?

Front

Some common events recognized by JavaScript include clicking, resizing the window, hovering over an element, etc.

Back

What are some of the rules that JavaScript variable names must conform to?

Front

You cannot declare a variable name that is a reserved JavaScript Keyword. Names must begin with a letter or an underscore character.

Back

What JavaScript values are considered falsey? What are considered truthy?

Front

undefined, null, NaN, 0, "", false are the six falsey values. Any other value is considered truthy.

Back

What is the for-of loop in JavaScript?

Front

The for-of statement creates a loop iterating over iterable objects such as Array, invoking a custom iteration hook with statements to be executed for the value of each distinct property of the object.

Back

How do you insert a comment in JavaScript?

Front

// - Single-Line comment /* * Multi-line comment */

Back

What are anonymous functions?

Front

Anonymous functions are functions that are dynamically declared at runtime. They are not given a name in the same way as normal functions. var anonFunction = function() {}

Back

What does it mean that JavaScript is loosely typed?

Front

This means that JavaScript does not require you to specify a type when declaring a variable.

Back

What tag would you use to wrap around a block of JavaScript on an HTML document and where would you need to place it?

Front

Use the <script> tag to wrap the JavaScript statement, and make sure the <script> block is nested within the body of the HTML document.

Back