Flashcards on Javascript Primer

Click on the flashcard to see the answer


What is Javascript?

JavaScript is a programming language used primarily for creating dynamic interactive websites. It is a front-end language that runs on the browser.

What are the different data types in Javascript?

The different data types in Javascript are: strings, numbers, booleans, null, undefined, and symbols.

What is the difference between == and === in Javascript?

== is a loose comparison operator, while === is a strict comparison operator. The former checks for value equality, while the later checks for both value and data type equality.

What is the purpose of the 'use strict' statement in Javascript?

The 'use strict' statement enables strict mode in Javascript, which makes it easier to write secure and optimized code by disallowing certain problematic language features.

How do you declare a variable in Javascript?

You can declare a variable in Javascript using the 'var', 'let', or 'const' keywords, followed by the variable name.

What is a callback function in Javascript?

A callback function in Javascript is a function passed as an argument to another function, which is then invoked inside the outer function to complete some kind of action.

What is hoisting in Javascript?

Hoisting in Javascript is the behavior where variable and function declarations are moved to the top of their respective scopes, regardless of where they were originally placed.

What is an object in Javascript?

An object in Javascript is a collection of key-value pairs, where each key is a string and each value can be of any data type.

What are the different types of loops in Javascript?

The different types of loops in Javascript are: for loop, while loop, and do-while loop.

What is an array in Javascript?

An array in Javascript is a collection of values, which can be of any data type, and are stored in a contiguous memory location. They are accessed using an index starting from 0.

What is ECMAScript?

ECMAScript is a scripting language specification that was created to standardize Javascript across different web browsers and platforms. It defines the syntax, variables, keywords, and operators of the language.

What is a closure in Javascript?

A closure in Javascript is a function that has access to variables in its outer lexical environment, even after that environment has been destroyed.

What are the different types of errors in Javascript?

The different types of errors in Javascript are: syntax errors, runtime errors, and logical errors.

What is the DOM in Javascript?

The DOM (Document Object Model) in Javascript is a programming interface for HTML and XML documents, which represents the structure of the document as a tree-like object model that can be manipulated using scripting languages like Javascript.

What is the difference between let and var in Javascript?

let is a block-scoped variable declaration, while var is function-scoped. This means that let can only be accessed within the block it was defined in, while var can be accessed globally.

What is Javascript?

JavaScript is a programming language used primarily for creating dynamic interactive websites. It is a front-end language that runs on the browser.

What are the different data types in Javascript?

The different data types in Javascript are: strings, numbers, booleans, null, undefined, and symbols.

What is the difference between == and === in Javascript?

== is a loose comparison operator, while === is a strict comparison operator. The former checks for value equality, while the later checks for both value and data type equality.

What is the purpose of the 'use strict' statement in Javascript?

The 'use strict' statement enables strict mode in Javascript, which makes it easier to write secure and optimized code by disallowing certain problematic language features.

How do you declare a variable in Javascript?

You can declare a variable in Javascript using the 'var', 'let', or 'const' keywords, followed by the variable name.

What is a callback function in Javascript?

A callback function in Javascript is a function passed as an argument to another function, which is then invoked inside the outer function to complete some kind of action.

What is hoisting in Javascript?

Hoisting in Javascript is the behavior where variable and function declarations are moved to the top of their respective scopes, regardless of where they were originally placed.

What is an object in Javascript?

An object in Javascript is a collection of key-value pairs, where each key is a string and each value can be of any data type.

What are the different types of loops in Javascript?

The different types of loops in Javascript are: for loop, while loop, and do-while loop.

What is an array in Javascript?

An array in Javascript is a collection of values, which can be of any data type, and are stored in a contiguous memory location. They are accessed using an index starting from 0.

What is ECMAScript?

ECMAScript is a scripting language specification that was created to standardize Javascript across different web browsers and platforms. It defines the syntax, variables, keywords, and operators of the language.

What is a closure in Javascript?

A closure in Javascript is a function that has access to variables in its outer lexical environment, even after that environment has been destroyed.

What are the different types of errors in Javascript?

The different types of errors in Javascript are: syntax errors, runtime errors, and logical errors.

What is the DOM in Javascript?

The DOM (Document Object Model) in Javascript is a programming interface for HTML and XML documents, which represents the structure of the document as a tree-like object model that can be manipulated using scripting languages like Javascript.

What is the difference between let and var in Javascript?

let is a block-scoped variable declaration, while var is function-scoped. This means that let can only be accessed within the block it was defined in, while var can be accessed globally.

Share


Login to Save


Share



Login to Save


Explore Other Decks


Made for Grade 7

L'Illuminismo


View Deck
Made for Grade 8

Ivan Franko - Ukrainian Literary Phenomenon


View Deck
Made for Grade 9

Computer Components


View Deck

Explore More