2334 Final Exam

¡Supera tus tareas y exámenes ahora con Quizwiz!

In a React component, the onSubmit attribute is added to the ___ element to specify a submit event handler

<form>

Given HTML and JQuery code, what is the resulting DOM transformation? <p>It is <em>so much</em> fun to learn <strong>new</strong> things!</p> $("em").wrap("<strong></strong>");

<p>It is <strong><em>so much</em></strong> fun to learn <strong>new</strong> things!</p>

which compound assignment operator assigns numbers with 9

*=

The JavaScript code contains a function convertPrice(), which converts the price from one currency to another. What is the correct way to call convertPrice() when the amount field is changed?

$("#amount").change(convertPrice);

Which line of code adds the property to center the text for <h2> elements?

$("h2").css("text-align", "center");

Which line of code adds class highlight to all <li> tags that descend from a <ul> tag?

$("ul li").addClass("highlight");

What is one purpose of npm? a. Loads packages as a Node.js project is running b. Updates and installs packages for a Node.js project c. Compiles a Node.js project into a single JavaScript file

??

What replaces XXX in the code below so log reQuest() executes before any route callback functions a. app.logRequest() b. app.use(logRequest) c. logRequest()

??

How should a project created with Create React App be modified so the App component can use Bootstrap classes? a. Add a link element to index.html that imports Bootstrap b. Add a style element to index.html that includes the definition of all Bootstrap classes c. Create an App.css that include, all the Bootstrap classes

???

What can be inferred about the jQuery library in this line of code? <script src="jquery-3.5.0.min.js"></script> a. This library was minified to reduce file size b. This library will not download, because the cross-origin attribute is missing c. The code in this library was extended, to make it more programmer friendly

???

Which jQuery selector type is $("li:last") a. Basic filter selector b. Attribute selector c. Content filter selector

???

The TodoItems component renders the item list with li elements: <li key=(item.key)>. What is assigned to item.key? a. Integer indicating when the item was added b. Item's array index c. Sixteen character has value

????

What makes JSON a preferred way to transport Ajax data? a. JSON data looks more like HTML code b. The jQuery library has more functions for parsing JSON data c. JSON data is parsed automatically

????

How does the unshift() method change the following array()

Adds blue to beginning of array

In the following delete click event handler to delete a song, when is the done() method called?

After the song is deleted

Which is the correct order of events in token based authentication AGet request for protected resource BToken generated CPost request with username and password DToken Validation

CBAD

How can the code segment ensure the movie API returns a valid movie with ID 456

Check value of response.ok

Fill in the blank to eliminate the owner property from the pokemon object

delete

In a typical Node.js file structure, where is a Mongoose model stored?

In a separate directory for models

What middleware enables an Express application to parse data posted from a web form?

express.urlencoded()

Which of the given allows for the reuse of code blocks in Pug

Mixins

In JQuery, when is the ready event triggered?

Once the document object model has been loaded

What information does the jwt-simple module's encode and decode methods need to encode and decode a JWT

Server's secret key

Why might a programmer add an empty array as the second argument to use Effect()

So the function argument is called only once

Which React Bootstrap component is typically used to indicate that the user must wait for an action to complete?

Spinner

What happens if a React list is rendered that is missing a key?

The list displays along with a console warning

Why is a key sometimes needed to access a third- party web-based API

To obtain a key, a developer must agree to restrictions on data received

What is output to the console?

["Are you t", "lking to me?"]

What is missing from the call to fetch() to POST a JSON-encoded movie to a movie API

body: JSON.stringify(movie)

What attribute of an input element can be validated when text is entered on a webpage?

value

the variable findCost has_____

local scope

A programmer uses a ____ function to parse data that is posted to a route in an express application

middleware

the ____ tool is used to tun Create React App, and then ____ is used to start development web server that listens on port 3000

npx, npm

How is the age field accessed after the following code executes?

obj.age

In the following JSON, the data type of friends is ______

object

Which XXX assigns a click event handler to the React component's button?

onClick=(clickHandler)

A react component's submit event handler usually calls event.preventDefault() in order to ____

stop the browser from submitting from data in an HTTP request

What XXX is missing so the Movie component below displays the movie's title attribute

{ props.title}


Conjuntos de estudio relacionados

MS II Exam 3 -Cirrho,Pancre, HepA-C, Trach, RA, SLE, &HIV

View Set

Properties of Water and Important for Life

View Set