JavaScript Core Concepts Vocabulary Flashcards

0.0(0)
studied byStudied by 0 people
learnLearn
examPractice Test
spaced repetitionSpaced Repetition
heart puzzleMatch
flashcardsFlashcards
Card Sorting

1/48

flashcard set

Earn XP

Description and Tags

A collection of vocabulary terms and definitions related to core concepts of JavaScript, helpful for exam preparation.

Study Analytics
Name
Mastery
Learn
Test
Matching
Spaced

No study sessions yet.

49 Terms

1
New cards

Console Object

A debugging tool in JavaScript that shows runtime execution and logs information.

2
New cards

console.error()

Method specifically designed for logging errors in the console.

3
New cards

console.time() and console.timeEnd()

Console methods used for measuring performance of code execution.

4
New cards

console.table()

Displays data in a tabular format for easier reading.

5
New cards

let vs var

'let' is block-scoped while 'var' is function-scoped.

6
New cards

const

Prevents reassignment of the variable, but object properties can still be modified.

7
New cards

Hoisting

A mechanism where variable and function declarations are processed before code execution.

8
New cards

const x = {name: 'John'}; x.name = 'Jane';

Valid use of 'const' declaration as object properties can be modified.

9
New cards

Primitive data type

Basic types in JavaScript such as String, Number, Boolean, Symbol, BigInt, undefined, and null.

10
New cards

typeof null

Returns 'object' in JavaScript.

11
New cards

BigInt

Data type used for representing very large integers beyond the limits of Number.

12
New cards

null vs undefined

null represents an intentional absence of value, while undefined indicates a variable has been declared but not assigned a value.

13
New cards

'5' + 3

Results in '53' due to type coercion in JavaScript.

14
New cards

=== operator

Checks for value equality without type conversion (strict equality).

15
New cards

Falsy values

Values in JavaScript that evaluate to false: false, 0, empty strings, null, undefined, and NaN.

16
New cards

Short-circuit evaluation

Conditionally execute code based on truthiness using && and || operators.

17
New cards

Higher-order function

A function that takes another function as an argument or returns a function.

18
New cards

Function declarations vs expressions

Function declarations can be called before they're defined, while function expressions cannot.

19
New cards

Pure function

A function that always returns the same output for the same input and has no side effects.

20
New cards

Arrow function

A shorter syntax for writing functions using the '=>' syntax.

21
New cards

array.filter()

Method used to create a new array with elements that pass a test.

22
New cards

Access property named 'user-id'

Use obj['user-id'] to access properties with special characters.

23
New cards

Spread operator (…)

Expands an array into individual elements.

24
New cards

Destructuring

Technique to extract values from arrays or properties from objects into distinct variables.

25
New cards

Constructor() method

Method in a class used to initialize new object instances.

26
New cards

'extends' keyword

Creates a child class that inherits from a parent class.

27
New cards

'super' keyword

Used to call methods from the parent class or constructor in a class.

28
New cards

Static method

A method that is called on the class itself, not on instances.

29
New cards

Class vs Constructor function

Classes are syntactic sugar over constructor functions and prototypal inheritance.

30
New cards

JavaScript modules

To organize code, encapsulate functionality, and manage dependencies.

31
New cards

Named exports vs Default exports

Named exports can export multiple values, while default exports can only export one value per module.

32
New cards

Importing a default export

Use import name from './file.js'.

33
New cards

Namespace imports

Importing all exports from a module into a single object.

34
New cards

querySelector() vs getElementById()

querySelector() can select elements using CSS selectors, while getElementById() only selects by ID.

35
New cards

textContent vs innerHTML

innerHTML deals with HTML content, while textContent only deals with plain text.

36
New cards

Event delegation

Adding a single event listener to a parent element that handles events for its children.

37
New cards

classList property

Provides a way to add, remove, and toggle classes on an element.

38
New cards

Promise

An object that represents the eventual completion or failure of an asynchronous operation.

39
New cards

'await' keyword

Pauses execution until a Promise is resolved.

40
New cards

Error handling in async/await code

Handled using try/catch blocks.

41
New cards

Callback hell problem

When nested callbacks become unmanageable, creating deeply nested code.

42
New cards

JSON.stringify()

Converts a JavaScript object into a JSON string.

43
New cards

fetch API initial return

A Promise that resolves to the Response object.

44
New cards

JSON.parse()

Method used to parse a JSON string into a JavaScript object.

45
New cards

Promise.all()

Handles multiple promises together and waits for all of them to resolve.

46
New cards

State of a Promise

A Promise before it is either fulfilled or rejected is called Pending.

47
New cards

HTTP method in fetch API

Uses GET method by default in the fetch API.

48
New cards

Synchronous vs Asynchronous

Synchronous code blocks execution until completed, while asynchronous code allows other code to run while waiting.

49
New cards

Promise.race()

Returns the result of the first promise that resolves or rejects.