Full reference of LinkedIn answers 2024 for skill assessments (aws-lambda, rest-api, javascript, react, git, html, jquery, mongodb, java, Go, python, machine-learning, power-point) linkedin excel test lösungen, linkedin machine learning test LinkedIn test questions and answers
Some of my WTF comments are a bit colorful but this type of test really does nothing but waste time. (apologies for the misspellings but I have to go)
Node.js
Q1. When a javaScript function is invoked (called) in Node, where is a new frame placed?
[x] the call stack
[ ] the event loop
[ ] the poll phase
[ ] the events queue
WTF:This question is ill formed. a javascript function when invoked places an execution context on the stack. The term frame in this context is imprecise and misleading
Q2. Which of the following is a core module in Node?
[ ] webpack
[x] crypto
[ ] request
[ ] chalk
WTF:It is possible for Node.js to be built without including support for the crypto module. In such cases, attempting to import from crypto or calling require('crypto') will result in an error being thrown. (from the node docs)
Q3. Which of the following Buffer class methods returns an uninitialized buffer?
[x] allocUnsafe
[ ] concat
[ ] from
[ ] alloc
Q4. Which of the following modules is NOT a built-in module in Node?
[x] ftp
[ ] events
[ ] dgram
[ ] http2
Q5. Which fs module method can be used to read the content of a file without buffering it in memory?
Q6. Which of the following DNS module methods uses the underlying OS facilities and does not necessarily perform any network communication?
[x] lookup
[ ] resolve
[ ] resolve4
[ ] reverse
This is about
Q7. How do you check that a value is a date object in Node?
[x] util.types.isDate(value)
[ ] assert.isDate(value)
[ ] console.isDate(value)
[ ] util.date(value)
Q8. Can you create an https web server with Node.js?
[ ] no, there are no modules supporting it yet
[x] yes, with the https or http2 modules
[ ] yes, through the path module
[ ] yes, with the http module
Q9. What is the Api that is designed to insulate Addons from changes in the underlying JavaScript engine?
[ ] A-API
[ ] Z-API
[x] N-API
[ ] X-API
WTF:There is absolutely no reason for any user of Node to have memorized this. This is a perfect example of a question that would only be answered correctly by someone who knows that they do not understand node but read the docs. Which is exactly what the test generators do as well.
Q10. Which CLI option can you use to debug a node script in Chrome DevTools?
[ ] --dev-tools
[x] --inspect
[ ] --chrome
[ ] --debug
WTF:Here is an example of an area that should be thoroughly tested ... inspect-brk vs inspect, how to setup an SSL link to a remote server etc. But it will never be included in a test like this because the creators of the test would have no clue how to do it.
Q11. How can you count the number of logical CPUs on the machine that is running Node?
[ ] node -p "process.cpus"
[ ] node -p "util.cpus().size"
[ ] node -p "process.os.cpus"
[x] node -p "os.cpus().length"
WTF:Once again this is a doc lookup issue not a node implementation issue. Also is this a test of node as a replacement for command line utilities or for node as a fullstack backend solution. If it is the latter then this question is off topic.
Q12. Which of the following is a method on the console object?
[ ] exit
[ ] test
[x] time
[ ] print
Q13. Which object is used to manage the cache of required modules?
[ ] global.cache
[ ] module.cache
[ ] process.cache
[x] require.cache
Q14. What is the command to silence all process warnings?
[ ] node index.js --trace-warnings
[x] node --no-warnings
[ ] node -trace-warnings
[ ] node index.js --no-warnings
WTF:Once again this is a doc lookup issue not a node implementation issue. Invoking node as a command line function is NOT how node is used in a fullstack environment other than as a quick and dirty testbed.
Q15. How can you use the promise API with a callback-based function like child_process.exec?
[ ] new Promise(child_process.exec())
[ ] util.promisify(child_process.exec())
[x] util.promisify(child_process.exec)
[ ] new Promise(child_process.exec)
Q16. Which of the following is NOT a Node repl command?
[ ] .brake
[x] .history
[ ] .editor
[ ] .save
WTF:repl has been supplanted by --inspect-brk and then using the chrome debugger. Testing for something that experienced node users have not used in over four years is bizarre
Q17. Which statement is true when you run the code shown below?
require('child_process').fork('script.js');
[ ] The forked process shares the event loop with the parent process
[ ] A new VM instance is created and the two VM instances will be shared between the forked process and the parent process.
[x] The forked process will have its own VM instance.
[ ] The forked process shares the same VM thread with the parent process.
Q18. If EventEmitter is in scope, which of the following lines of code will have an event emitter emitting a change event?
[x] EventEmitter.emit('change');
[ ] EventEmitter.new().emit('change');
[ ] (new EventEmitter()).emit('change');
[ ] new EventEmitter('change');
Explanation:
Because the EventEmitter is already in scope. No need to create new one.WTF:This is a silly gotcha question that tests nothing other than how carefully you read the question and trust that the poser of the question is competent.
Q19. Which of the following objects is a stream
[ ] process.uptime
[x] process.stdout
[ ] process
[ ] Buffer
Explanation:
process.stdout is Buffer type.
Q20. Which module variable holds the resolved aboslute path of the current module file?
[ ] __pathname
[ ] __location
[ ] __flder
[x] __filename
21. If the child_process module methods are in scope, what is a current way to execute the command ps -ef using a child process?
[ ] spawn("ps -ef")
[x] exec("ps -ef")
[ ] exec("ps", "-ef")
[ ] fork("ps -ef")
Q22.Which console method can be used to print the stack trace to the point of its execution?
[ ] stack
[x] trace
[ ] debug
[ ] print
Q23.When you run JavaScript in a Node.js application, which of the following elements in a Node.js stack actually executes that JavaScript?
[ ] the libuv library
[ ] the c-ares library
[x] the VM (like VS or Chakra)
[ ] the repl module
WTF:the term stack here is obtuse are you referring to the javscript stack or to the software that comprises node? Either way none of these answers are correct. The correect answer is the V8 api then translated to Chakra or SpiderMonkey or just V8. Most of the time it is just V8 because VSCode sucks as a node debugger.
Q24. Looking at the code below, what does the console show?
[x] to provide utilities to play with file and directory paths
[ ] to provide utilities to add and remove files
[ ] It is a retiring module.
[ ] to provide utilities to test files
WTF:
' play with file and directory paths' how is this more precise than the other options? Play is not a term of art. Does it mean go back and forth on a seesaw ,or jump up and down in a puddle? It is way too expansive to be a correct answer. The most accureate answer is "providing utilities to add and remove files" (even though the actual adding and removing requires FS as well. it is still less obtuse and more closely related to a correct answer) *
Q26.How do you make an HTTP server object active and listen to requests on certain ports?
[ ] server. start
[ ] server.activate
[x] server.listen
[ ] server. run
Q27.What does the code shown below do?
const fs = require('fs'); const os = require('os');
const system = os.platform(); const user = os.userInfo().username;
fs.appendFile('hello.txt', `Hello ${user} on ${system}`, (err) => { if (err) throw err; console.log('The data was appended to file!');}
);
[x] creates a text file hello.txt and appends customized text
[ ] creates an image file
[ ] console logs system information
[ ] creates a file named data and append numbers
Q28.How do you start a Node application, if the entry file is indexjs?
[ ] nodemon start
[ ] start index.js
[x] node index.js
[ ] node start
Q29.What is the purpose of the file system (fs) module?
[ ] to provide methods to work with requests and responses
[x] to provide methods to work with files
[ ] to provide methods to work with databases
[ ] to find new file systems
WTF:
Were the rest of this doc be precise i would not take issue with the answer but given the flavor of all other qustions both 1 and 4 are literally correct.*
Q30.What is the Node LTS version?
[ ] It is the current unstable version and is to be avoided.
[ ] It is the version that will be retired soon.
[ ] It is the version with the latest features.
[x] It is the safest version for long-term support.
WTF:That is not quite accurate... it is the version that has the latest features that are safest for long-term support. In other words it changes as a function of new reliable features... Over time there are many LTS versions that are no longer LTS... not because they have changed but instead because new functions are added that are deemed safe. In other words the key differentiator of one version to the next is not the designation but the new safe features that cause the designation.
Q31. Which of the following is NOT a valid stream in Node?
[x] process. stdinfo
[ ] process. stdin
[ ] process. stdout
[ ] process. stderr
WTF:Are you saying that this code will not work? process.stdinfo = process.stdout; process.stdinfo('blah'); Or are you saying that it is not a default valid stream?
Q32. You have a script.js file with the single line of code shown here. What will be the output of executing script.js with the node command?
console.log(arguments);
[ ] ReferenceError: arguments is not defined
[ ] an empty string
[ ] undefined
[x] an object representing an array that has five elements
Q33. Which choice is not a valid method on event emitters?
[x] start
[ ] on
[ ] once
[ ] off
Q34. Which special object is an instance of EventEmitter?Which special object is an instance of null?
[ ] process
[ ] Buffer
[ ] root
[x] require
WTF:
require is not an instance of anything it the old way to do import*
Q35. What is the command to get a list of available commands for Node.js?What is the command to get a list of available commands for Node.js?
[ ] node index.js -x
[ ] node -v
[x] node -h
[ ] node index.js -h
WTF:This is the type of questoin that should not be on this test... figuring out how to get help on node or any other modern app environment is easily performed but not standardized. Therefore the typcial path is to guess and allow the app to tell you how to get help by its response. The only difference in each of these queries is that two seconds later the correct one will display on the screen.
Q36. When a request event is received in the HTTP module, what is the type of the first argument passed to that event, usually named req?
[x] http.IncomingMessage
[ ] http.ServerRequest
[ ] http.ClientRequest
[ ] http.ServerResponse
Q37. What are the arguments passed to the module wrapper function?
[x] exports, require, module, filename, dirname
WTF:ECMA modules do not call the function a 'wrapper' function this is a commonjs legacy term related to polyfilling
Q38. Which library provides Node.js with the event loop?
[ ] V8
[ ] c-ares
[x] libuv
[ ] events
WTF:Why would anyone care about this unless they are working on node internals?
Q39. What does the .node file extension represent?
[ ] a C++ file that can have a .node extension and that Node will be able to execute directly.
[x] a C++ Addon file that is built with node-gyp
[ ] a JSON file that can have a .node extension as well as the .json extension
[ ] a JavaScript file that can have a .node extension as well as the .js extension
Q40. What can you export with module.exports?
[ ] only objects.
[ ] only functions
[ ] only variables and arrays
[x] functions, objects, arrays, or anything you assign to the module
Q41. Which core module in Node can you use to take advantage of multicore systems?
[ ] os
[ ] util
[x] cluster
[ ] net
WTF:Classic example of doc copying. from the first paragraph under the cluster section of the node documentation: "A single instance of Node.js runs in a single thread. To take advantage of multi-core systems, the user will sometimes want to launch a cluster of Node.js processes to handle the load." This type of question provides zero information about full stack node development.
Q42. Which core Node module has wrappers for OpenSSL methods?
[ ] SSL
[ ] hash
[x] crypto
[ ] TLS
WTF:cryto is optional node can run without it. And wrappers are a java and csharp concept that has no meaning in the javscript / node universe. If this is testing my ability to think like someone who learned csharp at microsoft then it is valid otherwise it is ill formed
Q43. Which line imports a promise-based version of the readFile method?
I believe that require has been replaced by import. In my code i am unable to use reuqire for module imports.*
Q44. According to the rules of semantic versioning, what does a release incrementing the third number in an npm version string communicate to users about the release changes?
[ ] Changes are not backwards compatible.
[ ] Changes might not be backward compatible and might break existing code.
[x] Changes are just bug fixes and no new features were added.
[ ] Changes will add new functionality but will not break any existing code.
WTF:are you referring to package.json installation? If so be specific. This is a question posed by someone who does not understand how yarn and npm are used and why.
Q45. What does REPL stand for?
[ ] run, examine, put, loop
[x] read, eval, print, loop
[ ] run, edit, print, loop
[ ] read, extend, print, loop
WTF:who cares what it stands for... what does it do? That is the correct question
What is missing from this test (assuming that Node is used for fullstack not just as a replacment for the command line)
- any composing related to handling io to a client - use of koa or express for processing client requests- ssl and other certificate handline- debugging using chrome- database interactions- routing- how to respond to http/s requests- basic http header handling- cors , file size, upload download
This is a shallow useless test of transient functionality:An experience node developer would have to look up most of these questions and would have likely never had to use many of them. This is not a good test of the use of node but instead a test of whether someone read the node online docs. In fact it reminds me of a DMV test in which there are deliberately wrong answers to make sure that you read the entire DMV drivers guide before taking the test.
Some of my WTF comments are a bit colorful but this type of test really does nothing but waste time. (apologies for the misspellings but I have to go)
Node.js
Q1. When a javaScript function is invoked (called) in Node, where is a new frame placed?
WTF: This question is ill formed. a javascript function when invoked places an execution context on the stack. The term frame in this context is imprecise and misleading
Q2. Which of the following is a core module in Node?
Q3. Which of the following Buffer class methods returns an uninitialized buffer?
Q4. Which of the following modules is NOT a built-in module in Node?
Q5. Which fs module method can be used to read the content of a file without buffering it in memory?
Explanation:
From official docs: https://nodejs.org/api/fs.html#fs_dir_read To minimize memory costs, when possible prefer streaming via fs.createReadStream().
Q6. Which of the following DNS module methods uses the underlying OS facilities and does not necessarily perform any network communication?
This is about
Q7. How do you check that a value is a date object in Node?
Q8. Can you create an https web server with Node.js?
Q9. What is the Api that is designed to insulate Addons from changes in the underlying JavaScript engine?
WTF: There is absolutely no reason for any user of Node to have memorized this. This is a perfect example of a question that would only be answered correctly by someone who knows that they do not understand node but read the docs. Which is exactly what the test generators do as well.
Q10. Which CLI option can you use to debug a node script in Chrome DevTools?
Q11. How can you count the number of logical CPUs on the machine that is running Node?
Q12. Which of the following is a method on the console object?
Q13. Which object is used to manage the cache of required modules?
Q14. What is the command to silence all process warnings?
Q15. How can you use the promise API with a callback-based function like child_process.exec?
Q16. Which of the following is NOT a Node repl command?
Q17. Which statement is true when you run the code shown below?
require('child_process').fork('script.js');
Q18. If EventEmitter is in scope, which of the following lines of code will have an event emitter emitting a change event?
[ ] new EventEmitter('change');
Explanation:
Because the EventEmitter is already in scope. No need to create new one. WTF: This is a silly gotcha question that tests nothing other than how carefully you read the question and trust that the poser of the question is competent.
Q19. Which of the following objects is a stream
[ ] Buffer
Explanation:
process.stdout is Buffer type.
Q20. Which module variable holds the resolved aboslute path of the current module file?
21. If the child_process module methods are in scope, what is a current way to execute the command ps -ef using a child process?
Q22.Which console method can be used to print the stack trace to the point of its execution?
Q23.When you run JavaScript in a Node.js application, which of the following elements in a Node.js stack actually executes that JavaScript?
Q24. Looking at the code below, what does the console show?
Q25.What is the purpose of the path module?
Q26.How do you make an HTTP server object active and listen to requests on certain ports?
Q27.What does the code shown below do?
Q28.How do you start a Node application, if the entry file is indexjs?
Q29.What is the purpose of the file system (fs) module?
Q30.What is the Node LTS version?
Q31. Which of the following is NOT a valid stream in Node?
Q32. You have a script.js file with the single line of code shown here. What will be the output of executing script.js with the node command?
console.log(arguments);
Q33. Which choice is not a valid method on event emitters?
Q34. Which special object is an instance of EventEmitter?Which special object is an instance of null?
Q35. What is the command to get a list of available commands for Node.js?What is the command to get a list of available commands for Node.js?
Q36. When a request event is received in the HTTP module, what is the type of the first argument passed to that event, usually named req?
Q37. What are the arguments passed to the module wrapper function?
Q38. Which library provides Node.js with the event loop?
Q39. What does the .node file extension represent?
Q40. What can you export with module.exports?
Q41. Which core module in Node can you use to take advantage of multicore systems?
Q42. Which core Node module has wrappers for OpenSSL methods?
Q43. Which line imports a promise-based version of the readFile method?
Q44. According to the rules of semantic versioning, what does a release incrementing the third number in an npm version string communicate to users about the release changes?
Q45. What does REPL stand for?
WTF: who cares what it stands for... what does it do? That is the correct question
What is missing from this test (assuming that Node is used for fullstack not just as a replacment for the command line)
- any composing related to handling io to a client - use of koa or express for processing client requests - ssl and other certificate handline - debugging using chrome - database interactions - routing - how to respond to http/s requests - basic http header handling - cors , file size, upload download
This is a shallow useless test of transient functionality: An experience node developer would have to look up most of these questions and would have likely never had to use many of them. This is not a good test of the use of node but instead a test of whether someone read the node online docs. In fact it reminds me of a DMV test in which there are deliberately wrong answers to make sure that you read the entire DMV drivers guide before taking the test.