4 months ago • WebDev Warriors

What is middleware in Express?

Database connector

Function between request and response

API tester

Frontend router

152 answered

4 months ago • WebDev Warriors

Which file manages dependencies in Node.js?

dependency.json

package-lock.json

package.json

modules.json

67 answered

4 months ago • WebDev Warriors

setTimeout(() => console.log("A"), 0);
console.log("B");

A B

B A

A only

B only

41 answered

4 months ago • WebDev Warriors

Which keyword creates block scope?

var

let

const

Both B and C

57 answered

5 months ago • WebDev Warriors

let a = 5;
let b = a++;
console.log(a, b);

5 6

6 5

6 6

5 5

44 answered

5 months ago • WebDev Warriors

console.log(typeof NaN);

NaN

object

number

undefined

63 answered

5 months ago • WebDev Warriors

What does process.nextTick() do?

Executes after 1 second

Executes before next event loop phase

Creates thread

Stops event loop

30 answered

5 months ago • WebDev Warriors

Which is NOT part of Node.js event loop phases?

Timers

Poll

Check

Compile

74 answered

5 months ago • WebDev Warriors

console.log([] == false);

true

false

Error

undefined

47 answered

5 months ago • WebDev Warriors

What is closure in JavaScript?

A function with no return

A function bundled with lexical scope

Object inheritance

Loop control

41 answered