WebApp Midterm

Which of the following is not a JavaScript engine found in a browser:?
Neptune
V8
JavaScriptCore
SpiderMonkey
Which of the following is not a language that Node.js is written in?
C++
JavaScript
Assembler
C
According to the Medium article what does the author Argwal state Node.js can do easily that a browser has limited or no ability to do?
A) Access the native file system
B) Do low-level networking
C) Manage processes
D) either a) or b)
E) either a) or c)
What version of JavaScript should you set the WebStorm IDE to according to the class 1 notes?
ES5
ECMAScript 7
ECMAScript 6
ECMAScript 2017
What does the command npm --init do?
Creates a new package.json file
Creates a new project.json file
Creates a new project directory and meta data
Creates a new project directory
What does the --save switch do on a npm install command?
Saves the package in the global area
Saves the package to the local folder
Updates the package.json file
Records the output of the installation to a log file
If I have a node package with version 2.79.0, what does the zero represent?
Incremental release number
Minor release number
Patch number
Major release number
Which of the following are valid lines of code if you wanted to have your code use ES6 syntax?
A) let multiply = (x, y) => x * y;
b) var multiply = function(x, y) {return x*y;}
C) let multiply = (x, y) => { return x * y }
D) either a) or b)
E) either a) or c)
The terms ES6 and ES2015 are interchangeable?
True
False
What yargs method do you use to give an alternative name to a parameter?
Resolve
Argv
Alias
Process
What is the argument passed in a promise.all statement sometimes known as?
Promise.all does not accept arguments
An iterable
A promise chain
A callback
How many arguments are in a standard "callback interface"? :
1
4
2
3
The "await" keyword is an alternative to using a .then method?
True
False
I must export a function with the same name that it was defined with?
True
False
What 2 callbacks do we provide to a promise? :
Resolve, reject
Resolve, process
Await, reject
Resolve, await
What is the last method executed in a yargs command?
Process
Argv
Resolve
Alias
The correct syntax for referencing a module in the same folder as a driver program would be:
Const rtns = require('.someroutines')
Const rtns = require('../someroutines')
Const rtns = require('./someroutines')
Const rtns = require('/someroutines')
If I use an "await" in a function, that function must be declared with the async keyword?
True
False
Which of the following best describe how the GOC data was obtained in lab2?
We used a callback wrapped in a promise to obtain the data
We used a promise to obtain the data
We used a callback to obtain the data
We used a chain of promises to obtain the data
What does the acronym UTF-8 stand for?
Uniform Transformation Format 8 bit
Uniform Translation Format 8 bit
Unicode Transformation Format 8 bit
Unicode Translation Format 8 bit
What two parameters are passed to the callback in the fs.readFile method? :
An error object and the contents from the read
Contents from the read, and the file status
An error object and a write buffer
A read buffer and a write buffer
What characters did we run the string method split on? :
Newline, return
Newline, tab
Tab, return
Newline, backspace
When manually building the json array, what array method was used to add entries into the array?
Shift
Push
Splice
Unshift
What file system method was utilized to determine whether a file existed or not?
.determine
.exists
.stat
.locate
Which intrinsic JSON method is used convert objects to strings?
.toString
.Parse
.makeString
.Stringify
If I have some JSON that is not in an array I can still determine the number of elements in it?
True
False
For the case study we received all the necessary JSON from a single URL?
True
False
What file was created to contain constants for our program?
Env.json
Constants.json
Dotenv
.env
For the case study, the number of countries must match the number of alerts?
True
False
What database construct in Mongo is analogous to a table in a relational database?
Collection
Database
Document
Field
When working with the Mongo driver, if you connect to a database that doesn't exist, a new one is created for you?
True
False
Mongo uses the V8 JavaScript engine internally to process JavaScript?
True
False
What property of the returned variable from the userRoutines.UpdateOne method did we check to ensure the update worked?
DocumentsModified
ModifiedCount
DocumentsUpdated
UpdatedCount
What property of the returned variable from the userRoutines.DeleteOne method did we check to ensure the delete worked?
DocumentsDeleted
DeletedCount
RemovedCount
DocumentsRemoved
A promise is returned with the following code: db.collection('users').findOne({name: name})
True
False
When updating a document using the Mongo driver's updateOne method, what do we supply as the first argument in the update JSON?
Int representing the number of documents that were updated
An error variable
An ObjectId
The property(ies) to be updated
What database construct in Mongo is analogous to a row in a relational database?
Collection
Document
Field
Database
What property of the returned variable from the userRoutines.AddOne method did we check to ensure the add worked?
DocumentsInserted
DocumentsAdded
AddedCount
InsertedCount
What database construct in Mongo is analogous to a column in a relational database?
Database
Document
Field
Collection
Which of the following is not a real example of invoking middleware?
App.use...
App.get...
App.METHOD...
App.post....
Which of the following terms was given as an example of builtin middleware?
Static
Router
Application
Error
The body-parser package was installed to handle:
A) post operations
B) put operations
C) get operations
D) both a) and b)
E) both b) and c)
Which of the following is the correct format when specifying a GET route for a particular item?
Router.get('/somepath/${someparam}'....
Router.get('/somepath/someparam'....
Router.get('/somepath/{:someparam}'....
Router.get('/somepath/:someparam'....
What object or objects are available to the routing middleware when processing a GET request?
A) request
B) response
C) error
D) both a) and b)
E) both b) and c)
We should frequently use the nodemon package in a production environment
True
False
How many parameters would I provide to the callback when coding error middleware?
2
3
4
5
JavaScript defaults to GMT?
True
False
ExpressJS is an opinionated framework?
True
False
How many parameters would I provide to the callback when coding application middleware?
2
3
4
5
What event handler did we code on the MaterialUI component that filtered an array of strings?
A) onUpdateInput
B) onNewRequest
C) onChangeInput
D) either a) or b)
E) either a) or c)
What’s the name of the MaterialUI component that allows filtering of an array of strings?
FilterText
AutoComplete
SelectOne
FindOne
We used 3 parameters when doing a POST from the react client to our node backend this class?
True
False
What is the main container component for Material-UI?
< MuiTheme >
< Mui >
< MuiProvider >
< MuiThemeProvider >
What package is installed to support Material-UI?
Material
Google-ui
Material-google
Material-ui
What library did we call when issuing HTTP GET for remote server data from the react client?
Fetch
Request
Httprequest
Axios
This attribute has valid syntax for providing an inline style in JSX: style={margin-top: '10%', width: '80%'}
True
False
We used the array "Index" method to locate the desired user after obtaining the data from the server this class?
True
False
What syntax do you use to supply an inline style?
A) style={regular styles go here}
B) style={styles in JSON go here}
C) either a) or b)
D) None of the above
What syntax can you use to conditionally render a component in JSX?
{ if some-condition ....}
{ {expression && ...} }
{expression && ...}
{ { if some-condition ....} }
Which of the following does a browser's JavaScript engine not do?
Parses JS
Runs JavaScript on the browser
Interprets JavaScript at compile time
Interprets JavaScript at run-time
None of the above
The browser engine is aware of the outside world?
True
False
What territory does Node allow JavaScript to enter?
Server-Side
Client-Side
Both
What is Node primarily used for?
Access the native file system
Manage processes
Build network programs such as Web Servers
A & c
B & c
Best description of the term Non-blocking
Fat arrow
Pointer
Async
Synchronous
If I have a node package with version 3.80.2 what does the 80 stand for?
Incremental release number
Minor release numberp
Patch number
Major release number
If I have a node package with version 3.80.2 what does the 3 stand for?
Major release number
Incremental release number
Minor release number
Patch number
What ES2015 construct did we use to output formatted data to the console?
Fat arrow
Template literal
Async
None of the above
Which one of these were not the 3 main client side packages bundled in the starter zip file?
React
Babel
Nodemon
Webpack
What JavaScript file contains the default component in the react starter package?
Index.js
App.js
Index.js
App.js
I can set a state variable's data like this: let someStateVar = 'some stuff'
True
False
We can use an attribute to pass data into a JSX component?
True
False
What does a react element use instead of the standard attribute class?
Class
ClassName
ClassName
AttrClass
The Constructor is responsible for initializing state in a React class component?
True
False
What JavaScript file renders the output for the single page application in the react starter package?
Index.js
Index.js
App.js
App.js
What script is executed to initiate the development server in the react starter project?
Webstart
Init
Start
Build
What is actually "the page" of the single page application in the react starter project?
App.html
Index.js
App.js
Index.html
When creating a stateful react component what do we extend?
A) React.Component
B) React.Element
C) React.PureComponent
D) either a) or b)
E) either a) or c)
Instead of doing multiple React.createElement calls what do most react programmers use?
Params
Attributes
JSX
SetState
CSS
T/F Middleware functions do not have full access to the request and response objects?
True
False
Which one of these is not the 4 types of middleware?
Response
Application
Builtin
Router
Error Handling
Nodemon allows us to restart the server automatically when things are saved
True
False
Middleware is a filter that stands between the web server and service
True
False
{"name":"WebApp Midterm", "url":"https://www.quiz-maker.com/QPREVIEW","txt":"Which of the following is not a JavaScript engine found in a browser:?, Which of the following is not a language that Node.js is written in?, According to the Medium article what does the author Argwal state Node.js can do easily that a browser has limited or no ability to do?","img":"https://www.quiz-maker.com/3012/images/ogquiz.png"}
Powered by: Quiz Maker