Notice: Due to an ongoing migration of our storage and publishing system, material requested since last month will not be uploaded for the time being, and new requests are paused. All existing notes remain available.

Unit 1 MCQs Getting Started with Node.JS & Handling Data I/O in Node.js

INT222 — Advanced Web Development 50 questions. Pick an option to check it.

Read the notes

0 of 50 answered 0 right 0 wrong , 50 left

  1. Question 1 of 50

    Which JavaScript engine is Node.js built upon?

  2. Question 2 of 50

    Which of the following best describes the nature of Node.js?

  3. Question 3 of 50

    Who created Node.js?

  4. Question 4 of 50

    What does REPL stand for in the context of Node.js?

  5. Question 5 of 50

    Which command allows you to enter the Node.js REPL environment in a terminal?

  6. Question 6 of 50

    In the Node.js REPL, what does the underscore variable (_) represent?

  7. Question 7 of 50

    Which command is used to initialize a new Node.js project and create a package.json file?

  8. Question 8 of 50

    Which flag can be used with 'npm init' to skip the questionnaire and use default values?

  9. Question 9 of 50

    Where does npm install the dependencies for a local project by default?

  10. Question 10 of 50

    Which file stores the metadata and dependency list for a Node.js project?

  11. Question 11 of 50

    Which function is used to include modules in Node.js?

  12. Question 12 of 50

    Which of the following is a Core Module in Node.js?

  13. Question 13 of 50

    How do you export a function or object from a module in Node.js using CommonJS?

  14. Question 14 of 50

    Which syntax is correct to import a local module located in the same directory?

  15. Question 15 of 50

    What is the purpose of the 'events' module in Node.js?

  16. Question 16 of 50

    Which class is the primary component of the 'events' module?

  17. Question 17 of 50

    Which method of EventEmitter is used to register a listener for an event?

  18. Question 18 of 50

    Which method of EventEmitter causes an event to occur?

  19. Question 19 of 50

    What is a 'callback' in Node.js?

  20. Question 20 of 50

    What is the convention for the first argument of a Node.js callback function?

  21. Question 21 of 50

    What is 'Callback Hell'?

  22. Question 22 of 50

    Which method is used to read a file asynchronously in Node.js?

  23. Question 23 of 50

    What happens if you use 'fs.writeFile()' on an existing file?

  24. Question 24 of 50

    Which 'fs' method is used to add data to a file without overwriting it?

  25. Question 25 of 50

    How do you delete a file using the 'fs' module?

  26. Question 26 of 50

    Which method converts a JavaScript object into a JSON string?

  27. Question 27 of 50

    Which method parses a JSON string into a JavaScript object?

  28. Question 28 of 50

    What is a Stream in Node.js?

  29. Question 29 of 50

    Which type of stream can generally be used to read data from a source?

  30. Question 30 of 50

    What is the purpose of the 'pipe()' method in streams?

  31. Question 31 of 50

    Which module allows you to work with file paths specifically?

  32. Question 32 of 50

    Which Node.js module provides compression and decompression functionality?

  33. Question 33 of 50

    Which function creates a stream that compresses data using Gzip?

  34. Question 34 of 50

    What are the three states of a Promise?

  35. Question 35 of 50

    Which method is used to handle the successful resolution of a Promise?

  36. Question 36 of 50

    Which method is used to catch errors in a Promise chain?

  37. Question 37 of 50

    What does the 'async' keyword do when placed before a function?

  38. Question 38 of 50

    The 'await' keyword can only be used inside which type of function?

  39. Question 39 of 50

    What is the benefit of using async/await over callbacks?

  40. Question 40 of 50

    What is the global object in Node.js equivalent to 'window' in browsers?

  41. Question 41 of 50

    Which global variable holds the directory name of the current module?

  42. Question 42 of 50

    Which method checks if a file exists in Node.js (Modern approach)?

  43. Question 43 of 50

    What is a 'Duplex' stream?

  44. Question 44 of 50

    What is the file extension typically used for a file containing CommonJS module code?

  45. Question 45 of 50

    How can you install a package globally using npm?

  46. Question 46 of 50

    What does 'npm' stand for?

  47. Question 47 of 50

    When using 'fs.createReadStream', which event is fired when the file is completely read?

  48. Question 48 of 50

    In a Promise, what happens if you return a value in a .then() block?

  49. Question 49 of 50

    What is the main advantage of Streams over reading files into memory?

  50. Question 50 of 50

    Which core module allows you to create a web server?

That's unit 1

Answer a few questions and your score shows up here.