QUESTION 1 The onreadystatechange property of the XMLHttpRequest object _____. i
ID: 3830436 • Letter: Q
Question
QUESTION 1
The onreadystatechange property of the XMLHttpRequest object _____.
is an integer reporting the status of the request
determines which event handler will be called when the XMLHttpRequest readyState property changes
is the data returned by the server as a text string
is the HTTP status code returned by the server
2 points
QUESTION 2
Which angular directive initializes the AngularJS environment
ng-app
ng-model
ng-bind
ng-repeat
2 points
QUESTION 3
Angular's _____ module handles both HTTP GET and POST requests.
$index
$routeMatch
$request
$http
2 points
QUESTION 4
You put ng-click="get_name()" in an opening button tag in your html, and you also have a template that looks like this, {{name}}. Assume the button is clicked. In the controller, what function would assign a name to the template?
get_name = function() {name="Rumpelstiltskin";};
$scope.get_name = function() {name="Rumpelstiltskin";};
$scope.get_name = function() {$scope.name = "Rumpelstiltskin";};
3 points
QUESTION 5
An AngularJS a _____ controls the movement of data to and from a designated section of a web page.
viewmaster
controller
whatnot
2 points
QUESTION 6
Angular's $http module sends and expects to receive data in the _____ format.
CSV
BSON
XML
JSON
2 points
QUESTION 7
With jQuery, to select a paragraph with a css class of "danger" you use _____.
$("#danger")
$("danger")
$(".danger")
$("danger.p")
2 points
QUESTION 8
For the following data structure located in an AngularJS controller, what template would display the calorie value?
$score.soup = {name: "tomato", calories: "225"};
{{soup.calories}}
{{"calories"}}
{{calories}}
{{$scope.soup.calories}}
3 points
QUESTION 9
The AngularJS $http response object has several properties, and the most important of these properties is the ____ property.
count
serial
upper_case
data
2 points
QUESTION 10
To facilitate client-side routing and single page apps, AngularJS offers us a ____ object.
$route
$routeProvider
$switch
$multiplexer
2 points
QUESTION 11
_____ is the process of of converting data to a format that can be stored or transmitted across a network and recovered later in the same format.
delta formatting
objectification
compression
serialization
2 points
QUESTION 12
Any Ajax request must be made to the same domain the requesting page came from; this prevents an issue called _____.
cross-site scripting
sql injection
key logging
data phishing
3 points
QUESTION 13
Which angular directive is added to an input tag and binds the value of the input element to a variable
ng-bind
ng-app
ng-model
ng-repeat
2 points
QUESTION 14
Angular's _____ module allows setting up a list of links as might be used in a single page app.
$index
$http
$scope
$routeProvider
2 points
QUESTION 15
In the name:value pairs that make up the JSON format, for example the word "color" in this object, {"color": "red"}, which of the following must be true of the name? Choose 2 answers.
It can be composed of any printable characters whatsoever
It cannot have any special characters except the underscore or the dollar sign.
It must not start with a number
It cannot start with an underscore
2 points
QUESTION 16
Using jQuery, you would set the content of a paragraph element with an id = "p3" to say "Howdy" using _____.
$(p3).html("Howdy");
$(#p3).html("Howdy");
$(".p3").html("Howdy");
$("#p3").html("Howdy");
3 points
QUESTION 17
Which angular directive, if added as an attribute to an HTML element, binds a variable to the innerHTML of that specific HTML element
ng-bind
ng-make
ng-app
ng-fix
2 points
QUESTION 18
Ajax is a mix of several technologies, and works by using a built-in JavaScript object named the _____.
spinner_object
Ajax_object
XMLHttpRequest object
JSONparallel_object
2 points
QUESTION 19
The _____ object holds the data and methods for the html section controlled by a controller.
$scope
$binder
$function
$route
2 points
QUESTION 20
AngularJS subscribes to the _____ design pattern.
model-view-controller
parallel-wicket
line_spinner
factory
2 points
QUESTION 21
The jQuery equivalent to window.onload() is _____.
$(document).ready()
$(document).load()
$(document).onload()
$(document).delay()
2 points
QUESTION 22
By default an Ajax exchange is _____.
asynchronous
synchronous
2 points
QUESTION 23
This jQuery code _____.
data = "color=orange";
url = "change.php";
$("#myDiv").load( url, data);
makes a POST request sending a color preference to a page named change.php.
makes a GET request sending a color preference to a page named change.php.
3 points
QUESTION 24
"This jQuery code _____.
data = {color: "orange"};
url = "change.php";
$("#myDiv").load( url, data);
makes a POST request sending a color preference to a page named change.php.
makes a GET request sending a color preference to a page named change.php.
3 points
QUESTION 25
The jQuery $(document).ready() handler _____.
ensures the contained code does not run until the DOM is available
automatically pops up an alert message to tell you when the document is ready.
causes code execution only when a button is clicked
2 points
QUESTION 26
To use Angular routing, which of the following properly sets up the module?
var app = angular.module('mainApp', ['ngRoute']);
var app = angular.module('mainApp', 'ngRoute');
var app = angular.module('mainApp', function('ngRoute'));
2 points
QUESTION 27
To use the AngularJS $http module, in your controller you need to add "$http" as a parameter to ____
in the module declaration itself.
the anonymous controller function that handles the call for data.
the config section of the module
2 points
QUESTION 28
In Javascript, how would we assign the value entered in a textbox to a variable named x if the textbox had an id = 'age' ?
x = document.getElementByTag("textbox").value;
x = document.id("age").value;
x = document.attachElement("name").value;
x = document.getElementById("age").value;
2 points
QUESTION 29
This code is _____.
var getPI = function () {return 3.14159; };
an anonymous function
a comprehension
a function of x
a boolean function
3 points
QUESTION 30
Consider this code. What does the '/' mean?
app.config(function($routeProvider) {
$routeProvider .when('/', {
templateUrl : 'base.html',
controller : 'mainController'
});
it means 'none of the above'
it means any possible url
it means the default page of the app
it means return an error
3 points
QUESTION 31
Which angular directive binds a JavaScript data structre to a repeating element like a HTML list, division, or HTML table and generates the HTML from that data structure.
ng-model
ng-app
ng-repeat
ng-bind
2 points
QUESTION 32
Assume below that the variable named URL has been assigned a proper value. Which statement requests data and puts that data in a $scope variable named soups?
$http.get(URL).then(function(){ soups = soups.data;} );
$http(URL)then(function(items){$scope.soups = data;});
$http.get(URL).then(function(items){ $scope.soups = items.data; });
"$http.get(URL, function(data){soups = data;});"
3 points
QUESTION 33
The jQuery equivalent to innerHTML is _____.
inner()
html()
add()
text()
2 points
QUESTION 34
The JSON format is essentially a JavaScript data structure that has been converted into a single string.
True
False
2 points
QUESTION 35
"By default, Ajax is restricted to requesting data only from the domain the requesting page originated from."
True
False
2 points
QUESTION 36
"Some of the NOSQL databases, like MongoDB or CouchDB, store data is a format that is essentially the JSON format."
True
False
2 points
QUESTION 37
jQuery often handles the differences among browser behaviors for you.
True
False
2 points
QUESTION 38
JSON is a general purpose syntax for exchanging data in a string format.
True
False
2 points
QUESTION 39
Ajax enables the user's browser to interact with your web server in a way that allows exchanging data without posting a whole complete page to the web server for each request.
True
False
2 points
QUESTION 40
"Angular's $http service handles requests for exchanging data with the web server, and manages the conversion to and from JSON for you automatically."
True
False
2 points
QUESTION 41
jQuery allows animating various HTML elements.
True
False
2 points
QUESTION 42
"Templates cannot hold expressions, only individual variables."
True
False
2 points
QUESTION 43
"The function that calls an asynchronous request ""blocks"" until the request is complete."
True
False
2 points
QUESTION 44
"Routing is included in the version 1.4 AngularJS files, so you don't need to add an additional file."
True
False
2 points
QUESTION 45
With this JavaScript code, how do you assign the population for KY to the variable p?
m = [
{state: "IN", population: 6.6 },
{state: "OH", population: 11.6},
{state: "KY", population: 4.4 },
{state: "TN", population: 6.5}
];
p = m[1].population + " million."
p = m[2].population + " million."
p = m[2][1] . " million."
p = m[1].population . " million."
p = m[0].population + " million."
is an integer reporting the status of the request
determines which event handler will be called when the XMLHttpRequest readyState property changes
is the data returned by the server as a text string
is the HTTP status code returned by the server
Explanation / Answer
The answer to the 1st question is determines which event handler will be called when the XMLHttpRequest readyState property changes
Related Questions
drjack9650@gmail.com
Navigate
Integrity-first tutoring: explanations and feedback only — we do not complete graded work. Learn more.