首页 > > 详细

CS591留学生讲解、辅导Java编程语言、讲解CRUD operations、辅导Java 辅导留学生 Statistics统计、回归、迭

CS591 Quiz 1 Name: ____________________________________
1. What is printed on the console after running this snippet?
const delayed = function ( ) {
setTimeout(
function () {
let x = 42
return x}, 2000)}
console.log('starting run')
const x = delayed()
console.log('x is now', x)
console.log('ending run')
2. What does it mean to say that a function will block?
3. Once a blocked function has completed its work on a worker thread, when is it moved into the
execution queue?4. Briefly explain how a Promise works at a high level.
5. What is a lambda function?
6. In what order does Express middleware run?
7. Correct the error in this route:
router.get('/string', function (req, res, next) {
let string = “Hey now!”;
})
8. Which HTTP verbs are typically mapped onto CRUD operations to define a RESTful
interface?9. What are the three arguments in an Express middleware function, and what do they
represent?
10. What line must be included in a module in order for it to expose an interface?
11. What is npm, and what role does it serve?
12. What does the acronym JSON stand for?
13. Assume that you are writing a route that matches a POST of a form on the client. On what
object will the POSTed form values be found?14. What function might you use to run a set of Promises in such a way that the function returns
only when all of the Promises have resolved?
15. How is a callback function used in JavaScript?
16. What does the command ‘npm install morgan’ accomplish?
17. What function do the backtick (`) characters provide in a line of code such as
console.log(`The value is ${val}`)18. Why do we consider generators to be pausable functions?
19. Can the Node server run on a port other than 3000?
20. What file does the command ‘npm install’ read while running?

联系我们
  • QQ:99515681
  • 邮箱:99515681@qq.com
  • 工作时间:8:00-21:00
  • 微信:codinghelp
热点标签

联系我们 - QQ: 99515681 微信:codinghelp
程序辅导网!