Javascript Flashcards

1
Q

IIFE

A

An immediately invoked function expression (IIFE) in JavaScript is a function that runs as soon as it is defined. It allows running a function while avoiding polluting the global namespace. [1]

An IIFE is defined by wrapping a function expression inside parentheses and calling it immediately.

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

why so many async

A

different from python, in JavaScript , When a method is called, the calling thread won’t pause execution and wait for the method to complete before continuing.

This can lead to race conditions or unexpected behavior if you rely on the previous function’s result.

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