Javascript Flashcards

(28 cards)

1
Q

teste

A

123131

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

adasdsad

A

asdada

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

Define JavaScript.

A

A high-level, dynamic programming language primarily used for web development.

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

True or false: JavaScript is a compiled language.

A

FALSE

JavaScript is an interpreted language, executed by the browser.

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

What does DOM stand for?

A

Document Object Model, a programming interface for web documents.

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

Fill in the blank: JavaScript is often used to create _______ websites.

A

Interactive

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

What is a closure in JavaScript?

A

A function that retains access to its lexical scope, even when executed outside that scope.

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

Define callback function.

A

A function passed as an argument to another function, executed after some operation.

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

What does JSON stand for?

A

JavaScript Object Notation, a lightweight data interchange format.

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

True or false: var is block-scoped.

A

FALSE

Variables declared with var are function-scoped.

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

What is the purpose of ‘use strict’?

A

To enforce stricter parsing and error handling in JavaScript code.

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

Fill in the blank: Promises are used for _______ in JavaScript.

A

Asynchronous programming

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

Define hoisting.

A

JavaScript’s behavior of moving variable and function declarations to the top of their scope.

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

What is an event listener?

A

A function that waits for a specific event to occur on a target element.

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

True or false: let allows variable redeclaration.

A

FALSE

Variables declared with let cannot be redeclared in the same scope.

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

What is the this keyword?

A

A reference to the current object in context, depending on how a function is called.

17
Q

Fill in the blank: Arrow functions do not have their own _______.

18
Q

Define async/await.

A

Syntax for handling asynchronous operations more easily, built on Promises.

19
Q

What is a module in JavaScript?

A

A reusable piece of code that encapsulates functionality and can be imported/exported.

20
Q

True or false: JavaScript supports multiple inheritance.

A

FALSE

JavaScript uses prototype-based inheritance.

21
Q

What is localStorage?

A

A web storage feature that allows storing key-value pairs in a web browser.

22
Q

Fill in the blank: Template literals are enclosed by _______.

A

Backticks (`)

23
Q

Define event delegation.

A

A technique that allows a single event listener to manage events for multiple child elements.

24
Q

What is a synchronous operation?

A

An operation that blocks execution until it completes.

25
True or false: **NaN** stands for 'Not a Number'.
TRUE
26
What does **AJAX** stand for?
**Asynchronous JavaScript and XML**, a technique for creating asynchronous web applications.
27
Fill in the blank: **JavaScript** can be used on both the _______ and client-side.
Server
28
Define **prototype**.
An object from which other objects inherit properties and methods.