Quiz
Week 8 - 12
Create a free account to finish this quiz
Save your progress and see your final score.
Already have an account? Sign in
Questions in this quiz (159)
1The String object is used for ________________________________. A string stores a __________________________.
- Atranslating coding languages, linear data
- Bstoring and manipulating text, sequence of characters
- Cmoving the whole coordinate system, sequence of text
- Dorganizing text, series of sequences
2= means Assignment : Assigns the value. var x = 10, x equals 10. The left operand gets set to the value of the
expression on the right- ATrue
- BFalse
3Equality:
- ATests multiple expression to ensure equality.
- BTests two expressions for balance and likeness.
- CTests two expressions for equality. The result is true if the expressions are equal.
- DTests multiple expressions for likeness. The result is false if the expressions are unequal
4== lenient: console.log(23 == "23"); // true
=== strict: console.log(23 === "23"); // returns false
lenient will check_______________________________.- Athe values of variable and convert them to a common type
- Bconfirm the expressions are equal
- Callows for values to be adjusted to become equal
- Dthe values of variable and convert them to a uncommon type
5|| means _____ ! means ____
- Aand, are
- Bor, and
- Cnot, but
- Dor, not
6Boolean: The Boolean object represents two values: "equal" or “unequal".
- ATrue
- BFalse
7Object:
- AAn object is a collection of variables and functions.
- BAn object is a place holder for data
- CAn object is created with variables and functions
- DAn object is a gathering of data under one body
8Method: Special functions that belong to objects
- ATrue
- BFalse
9The DOM - The Document Object Model is an application programming interface (API) It defines:_________________________________________________.The nodes of every document are organized in a tree structure called the DOM tree.
- Ahow documents are accessed to create a flow.
- Bcreates documents to be filed chronologically.
- Cthe logical structure of documents and the way a document is accessed and manipulated.
- Dthe logical structure of interfaces to interact with documents and manipulation.
10The nodes of every document are organized in a tree structure called the DOM tree.
- ATrue
- BFalse
11AJAX:
- AAsynchronous JavaScript + XML
- BAltered JavaScript Access XML
- CApplication JavaScript + XML
- DAbbreviated JavaScript + XML
12AJAX is a new programming language and a new way to use existing standards.
- ATrue
- BFalse
13AJAX:
- Aallows us to organize files to be defined how they are accessed and manipulated.
- Ballows for users to save work after reloading the whole web page
- Cis a new programming language used to an updated XML
- Dallows us to exchange data with a server, and update parts of a web page, without reloading the whole page.
14the keystone of AJAX is the XMLHttpRequest object. (XHR object)
- ATrue
- BFalse
15The XMLHttpRequest object is used to:
- Aexchange data with a server behind the scenes.
- Brequest data from the server.
- Cretrieve data from the databases.
- Dexchange data with a database behind the scenes.
16The XMLHttpRequest object can: ( more than one may apply)
- APull data from the local host
- BUpdate a web page without reloading the page
- CExchange information with the database to upload information more efficiently
- DRequest & receive data from a server (php and mySQL) after the page has loaded
17It’s very important to understand that XML doesn’t do anything per se. It’s purpose is to ___________________________.
- Asort and organize information
- Baccess and manipulate information
- Cstore and transport information
- Dcreate and sort informaion
18JSON: JavaScript Object Notation
- ATrue
- BFalse
19Unlike XML, JSON is NOT syntax for storing and exchanging text information.
- ATrue
- BFalse
20JSON is now the preferred method as it is smaller than XML, and faster and easier to parse.
- ATrue
- BFalse
21JSON: It is derived from the JavaScript scripting language for representing simple data structures and associative arrays, called objects.
- ATrue
- BFalse
22With JSON, you can:
- Asimplify objects with text and curly braces
- Brepresent complex objects and mappings with text and curly braces
- Crepresent complex objects
- Dmap texts with curly braces
23The JSON text format is NOT syntactically identical to the code for creating JavaScript objects.
- ATrue
- BFalse
24The Fetch API is a:
- Aproposed standard that aims to solve some of the issues associated with XHR on the modern web
- Bproposed standard to solve complex packets of information being sent in chunks
- Cprogramming language used to fetch information then organize it into a string
- Da method of retrieving data and manipulating data without having to reload web page
25One major issue that XHR can present is what's known as Callback Hell. This is the situation where you want a series of things to happen in sequence. The solution we typically use for this in JavaScript is to create a series of nested functions which can result in a code structure that's difficult for humans to read and can create a call stack that presents debugging challenges.
- ATrue
- BFalse
26The word 'asynchronous', aka 'async' just means:
- A'to sync one at a time'
- B'takes some time' or 'happens in the future, not right now'
- C'to pull information at a later time'
- D'to instantly occur'
27The cause of callback hell is when:
- Ayou try to load too much complex data at once
- Bwhen you try to fetch too much information
- Cwhen data is attempted to be manipulated frequently
- Dpeople try to write JavaScript in a way where execution happens visually from top to bottom
28Simply put, Vue.js is a:
- Aprogressive JavaScript library that focuses on building user interfaces
- Bproposed standard that aims to solve some of the issues associated with XHR on the modern web
- Ca collection of variables and functions.
- Dplace to store and manipulate text, sequence of characters
29Single-Page Applications (SPAs)
- Aare web apps that load a single HTML page and dynamically updates that page as the user interacts with the app
- Bloads web apps one page at a time to create a more efficient user interaction
- Cupdates web page as user interacts with it
- Dfetches information faster for single HTML pages
30The main advantage of SPAs is that the app can respond to user interactions without fully reloading the page, resulting in a much more fluid user experience.
- ATrue
- BFalse
31The Virtual DOM is an abstraction of the HTML DOM. It is lightweight and detached from the browser specific implementation details. Since the DOM itself was already an abstraction, the virtual DOM is, in fact, an abstraction of an abstraction.
- ATrue
- BFalse
32State:
- Adefines variables and functions
- Bdefines 'true' or 'false'
- Cis essentially just what your program, app or web page is currently doing
- Dthe current function being used
33Axios is a promised-based HTTP client for making Ajax requests, and will work great for our use. It provides a simple and rich API.
- ATrue
- BFalse
34Model - A slightly modified plain JavaScript object. vm._data // The Model
- ATrue
- BFalse
35A setter is a method that gets the value of a specific property
- ATrue
- BFalse
36A setter is a method that sets the value of a specific property
- ATrue
- BFalse
37View - How the data/models are flowed into the page (Data-binding) i.e. The actual HTML/DOM that the user sees.
- ATrue
- BFalse
38View Model -
- Aa way to view the model
- Bdifferent ways a model can be viewed
- Can object used to view a model
- Dan object that syncs the Model and the View
39The most basic form of data binding is text interpolation using the “Mustache” syntax (double curly braces):
<span>Message: {{ msg }}</span>- ATrue
- BFalse
40Directives - You can extend HTML functionality by using directives. They are commands sprinkled throughout your HTML. Directives are prefixed with v- to indicate that they are special attributes provided by Vue, and as you may have guessed, they apply special reactive behaviour to the rendered DOM.
- ATrue
- BFalse
41|| means
- Aor
- Band
- Cvalue
- Dnot
42! means?
- Anot
- Band
- Cor
- Drequest
43The readyState property holds the status of the XMLHttpRequest.
- ATrue
- BFalse
44State means it is essentially just what your program, app, and web page is currently doing?
- ATrue
- BFalse
45The XMLHttpRequest object can update a web page without reloading the page and can request and receive data from a server (php and mySQL) after the page has loaded.
- ATrue
- BFalse
46The keystone of AJAX is the XMLHttpRequest object.
- ATrue
- BFalse
47It's very important to understand that XML doesn't do anything per se. It's purpose is to
- Astore data
- Bstore and transport information
- Cinformation
- Dtake data and hold it till needed
48The XMLHttpRequest object is used to exchange data with a server behind the scenes.
- ATrue
- BFalse
49Ajax allows us to exchange data with a server and update parts of a web page without reloading the whole page.
- ATrue
- BFalse
50Although x in AJAX stands for XML, JSON is used more than XML nowadays because of it's many advantages such as being lighter and a part of JavaScript.
- ATrue
- BFalse
51The string object is used for storing and manipulating text. A string stores a sequence of characters.
- ATrue
- BFalse
52Boolean objects represents two values which are?
- ATrue and False
- BYes and no
- CValue and number
- Dpercentage and integer
53= means assignment: it assigns the value.
for instance: var x =10, x equals 10.
The left operand gets set to the value of the expression on the right?- ATrue
- BFalse
54With JSON you represent complex objects and mappings with text and curly braces.
- ATrue
- BFalse
55The readyState property holds the status of the?
- AXHL
- BXML and Object
- CObject of a function
- DXMLHttpRequest
56The readyState changes from 0 to 4?
- ATrue
- BFalse
57Method: The HTTP method to use, such as "GET" and "POST"?
- ATrue
- BFalse
58url does what?
- AThe url sends request.
- BThe url breaks server connection.
- CThe url is the address of the web page.
- DThe url sends an object.
59async: An optional boolean parameter, defaulting to true, indicating whether or not to perform the operation asynchronously.
- ATrue
- BFalse
60Setting async to false means that the statement you are calling has to complete before the next statement in your function can be called.
- ATrue
- BFalse
61asyn set true will begin it's execution and the next statement will be called regardless of whether the async statement has completed yet.
- ATrue
- BFalse
62formdata is a
- Avariable that contains a string.
- Bvalue that contains an object.
- Cdata that gets stored in a function.
- Dplaceholder.
63To get the response from the server, we use the requestText property of the XMLHttpRequest object.
- ATrue
- BFalse
64onreadyStateChange is a
- Aproperty used to call a function
- Bproperty used to define a function and callback to be executed when the readyState changes.
- Cproperty used to set a variable and set a value to it.
- Dproperty to get data from the server.
65formSubmitted() will cause it to immediately invoke.
- ATrue
- BFalse
66In JavaScript every function is a first class object.
- ATrue
- BFalse
67When passing a callback function as a parameter to another function we are only passing the callback function definition.
- ATrue
- BFalse
68We want javaScript to capture the
- Adata and store it.
- Binformation and send it via an ajax request instead.
- Cinformation and send it to the user.
- Dvalues and output them into the console.
69count means
- Acount all elements in a file and do something.
- Bcount all elements in an array or something in an object.
- Ccount all elements in store them.
- Dcount all elements and make them do something.
70echo: outputs one or more strings.
- ATrue
- BFalse
71.= is the php equivalent to += we are using concatenation.
- ATrue
- BFalse
72Anything that was echoed via php is inserted into the request.responseText.
- ATrue
- BFalse
73HTTP is a protocol and part of the protocol is sending request headers.
- ATrue
- BFalse
74"GET" is
- Abasically for just getting (retrieving) data.
- Ba method to get data.
- Cbasically gets values at users request.
- Da function that sets rules.
75"POST" is
- Astoring or updating data, or ordering a product or sending E-mail.
- Bstoring data
- Ca function to store variables
- Dsetting up an email
76The keystone of ajax is the XMLHttpRequest object. (XHR object)
- ATrue
- BFalse
77The XMLHttpRequest object is used to exchange data from a server behind the scenes.
- ATrue
- BFalse
78The readyState property holds the status of the XMLHttpRequest.
- ATrue
- BFalse
79To send a request to the server we use
- Aopen() and send() methods of the XMLHttpRequest object.
- Bonload() method.
- Coffset property.
80send(string) is only used for POST requests.
- ATrue
- BFalse
81mySqli_query() sends a unique query to the currently active database on the server.
- ATrue
- BFalse
82AJAX stands for Asynchronous Javascript and XML.
- ATrue
- BFalse
83JSON stands for JavaScript Object Notation.
- ATrue
- BFalse
84status == 200) means okay.
- ATrue
- BFalse
85Every Vue application starts by creating a root Vue instance with the Vue constructor function.
- ATrue
- BFalse
86vm stands for
- Aview model
- Bvalue model
- Cvue mode
- Dvalue mode
87When you instantiate a Vue instance, you need to pass in an options object which can contain options for data, template, element to mount on, methods, lifecycle callbacks, and more.
- ATrue
- BFalse
88{data} is the data object for the Vue instance?
- ATrue
- BFalse
89Vue already knows that i'm referring to a property of the data object.
- ATrue
- BFalse
90When a Vue instance is created, each data property component prop etc is
- Atraversed and setters are added
- Btraversed and getters and setters are collected
- Ctraversed and getters and setters are added for each
- Dtraversed for storing a variable
91Getters and Setters behave like properties when called.
- ATrue
- BFalse
92Re-rendering involves updating Vue's virtual DOM, which is sort of model of the actual DOM that can be updated much faster.
- ATrue
- BFalse
93The getter and setter are visible to the user, but under the hood they enable Vue to perform dependency-tracking and change-notification when properties are accessed or modified.
- ATrue
- BFalse
94Every component instance has a watcher instance, that records any properties "touched" during the components render as dependencies.
- ATrue
- BFalse
95Due to the limitations of modern JavaScript, Vue cannot detect property addition or deletion.
- ATrue
- BFalse
96Since Vue performs the getter/setter conversion process during instance initialization, a property must be present in the data object in order for Vue to convert it and make it reactive.
- ATrue
- BFalse
97Declarative-Rendering
- AA system that enables us to declarative render data to the DOM using syntax also known as text-interpolation or mustache syntax. {{ message }}
- BA system that enables us to declare a value to a mustache syntax and use it to get data. {{ message }}
- CA system that enables us to receive data from the DOM and store it in an array to call a function.
98Directives are prefixed with v- to indicate that they are special attributes provided by Vue, and apply special behavior to the rendered DOM.
- ATrue
- BFalse
99Vue.js code will not validate in your text editor, it must run in browser that vue.js syntax is rendered/removed.
- ATrue
- BFalse
100Filters can be in two places:
- Amustache
- Bparenthesis and curly brackets
- Cv-bind
- Dinside a function and if statement
101With Vue you can register your filters in two different ways: Globally and Locally.
- ATrue
- BFalse
102Filters need to return on every single update, so if you have something like an input that updates every time you type , it's not very performant.
- ATrue
- BFalse
103Dynamic attributes use v-bind to manipulate or set values of attributes and dynamically bind one or more attributes or component prop to an expression.
- ATrue
- BFalse
104A common need for data binding is manipulating an elements class
- Alist and its inline styles.
- Bvalues and properties
- Clist
- Dgetter
105In JavaScript, a truthy value is a value that is considered true when evaluated in a Boolean context.
- ATrue
- BFalse
106Vue.js allows us to
- Ahandle events triggered by the user.
- Bhandling events help add interactivity to web apps by responding to users input.
- Cprovides us with v-on directive to handle these events.
- Dstores values the user inputs and uses them.
107Benefits to using v-on: makes it easier to locate the handler function implementations within your js code by skimming the html template.
- ATrue
- BFalse
108When a view model is destroyed
- Aall event listeners are removed automatically
- Ball users inputs are removed
- Call event listeners are enabled and working
109We can use the v-on directive to listen to DOM events and run some JavaScript when they're triggered.
- ATrue
- BFalse
110The new Vue allows us to create a methods object that contains methods to be mixed into the Vue instance.
- ATrue
- BFalse
111this is the context of event handlers refers to Vue instance invoking the handler and is used to access items in the data object.
- ATrue
- BFalse
112Equality: Tests two expressions for equality. The result is true if the expressions are equal.
- ATrue
- BFalse
113A string object is used for
- Astoring and manipulating text. A string stores a sequence of characters.
- Bstoring and changing text. A string holds a sequence of characters and changes it based on user.
- Cstores text. A string stores text till it needs it from the server.
114XMLHttpRequest is a JavaScript object that was designed by MIcrosoft and adopted by Mozilla, Apple, and Google.
- ATrue
- BFalse
115XMLHttpRequest cna be used to retrieve any type of data, not just XML.
- ATrue
- BFalse
116All modern browsers have a built-in XMLHttpRequest object.
- ATrue
- BFalse
117We can use an if else statement to try and create the XHR object by using XMLHttpRequest();
- ATrue
- BFalse
118The readyState property holds the status of the XMLHttpRequest.
- ATrue
- BFalse
119X in AJAX stands for XML.
- ATrue
- BFalse
120XML was originally used as "the packaging" and stands for extensible markup language.
- ATrue
- BFalse
121HTML was designed to display data.
- ATrue
- BFalse
122<?xml version="1.0" encoding="UTF-8"?>
The first line is the XML declaration. It defines the XML version (1.0) and the encoding used (UTF-8)
The next line describes the root element of the document.
( We are saying this document contains player information)- ATrue
- BFalse
123If the response from the server is not XML, use the responseText property.
- ATrue
- BFalse
124"X" in AJAX stands for
- AXHML
- BHML
- CXML
- DXMHL
125XML was originally used as
- A"functioning element"
- B"the packaging"
- C"the fetching api"
126XML stands for extensible markup language.
- ATrue
- BFalse
127XML is deigned for the transportation and storing data.
- ATrue
- BFalse
128We will use XML to package and transport our items/data.
- ATrue
- BFalse
129 document.querySelector("#name").innerHTML= xmldoc.getElementsByTagName("firstname") [0].childNodes[0].nodeValue;
• We are saying find the element with the id of “name”, now fill it with some information using innerHTML
look inside of the xml we just sent and find the element with the tag name “firstname”.
Now look inside for the first child node [0] and grab the first value nodeValue [0]
*Our xml information uses a zero based index- ATrue
- BFalse
130header('Content-Type: text/xml');
• This is what alerts java script that it is getting XML back and it identifies the output as valid XML- ATrue
- BFalse
131Much like XML, JSON is syntax for storing and exchanging text information.
- ATrue
- BFalse
132JSON is now the preferred method as it is
- Asmaller than XML
- Bfaster and easier to parse
- Cstores data better and easier
- Dhelps user to read code
133JSON is derived from the JavaScript scripting language for representing simple data structures and associative arrays, called objects.
- ATrue
- BFalse
134 The JSON text format is syntactically identical to the code for creating JavaScript objects.
- ATrue
- BFalse
135When receiving JSON from the server we will use the built in JSON.parse() method, which parses a string as JSON.
- ATrue
- BFalse
136Why use JSON? 4 answers.
- ANo end tags
- BShorter
- CQuicker to read and write
- DBottom line: more efficient to use JSON
- ELikes to write code nice
137 JSON data is written as name/value pairs.
• A name/value pair consists of a field name (in double quotes), followed by a colon, followed by a value
Example: "firstName": "Billy" //this translates to firstName = "Billy"- ATrue
- BFalse
138JSON files can be written as
- Aobjects and arrays
- Bvariables
- Cfunctions
139We will use JSON.parse to parse the information.
• parse: Analyze (a sentence) into its parts and describe their syntactic roles.- ATrue
- BFalse
140 JSON is easier and more efficient to use.
• XML packages information as well, but we are left dealing with more packaging in the end.
• By using JSON we are individually packaging our information so that we can sort it and put it in different places rather than “one chunk” as we have done in previous examples.- ATrue
- BFalse
141if(request.readyState === 4) { // done
if(request.status === 200) { // complete document.querySelector("#feedback").innerHTML = request.responseText;
}
}
*note: The server is responsible for providing the status, while the user agent provides the readyState- ATrue
- BFalse
142readyState - Changes from 0 to 4:
0: request not initialized
1: server connection established
2: request received
3: processing request
4: request finished and response is ready- ATrue
- BFalse
143Asynchronous code: AJAX calls
- it executes out of sequence.
-Application doesn't stop and wait for something to execute.
-no order.- ATrue
- BFalse
144Callbacks: naming convention for using JS functions.
- instead of immediately returning a result.
-it takes time.- ATrue
- BFalse
145Fetch API: it performs a lot of AJAX functions without having to code them.
- it is good to know what's happening behind the scenes.
- the syntax is cleaner and easier and shorter.- ATrue
- BFalse
146Polyfills: JS files that you link to so that it works in older browser.
- patching holes in older browsers so it works.- ATrue
- BFalse
147Syntaxt you must use when working with arrays:
- Dot (.) syntax .syntaxt
-and square brackets [ ]- ATrue
- BFalse
148Vue.js is an open source JavaScript framework for building user interfaces and single-page applications.
(adds in interactivity into your websites or apps)- ATrue
- BFalse
149Vue.js uses an HTML based template syntaxt
eg. {{message}}- ATrue
- BFalse
150Why use Vue.js?
- Aruntime performance
- Bfeatured rich
- Csimple
- Dsmooth intergration with Laravel
- Eit's fast
- Fhas a client-side routing that can set up different routes
151Virtual DOM: is an abstraction of the actual DOM
(IMPORTANT: creating a virtual DOM and making changes there is faster than using the actual DOM for efficiency)- ATrue
- BFalse
152View: how data/models are flowed into the page (data-binding)
- ATrue
- BFalse
153View-Model: an object that syncs the model and the view
- ATrue
- BFalse
154Vue is reactive and it instantly changes within the page as it creates single page applications.
Var vm-new Vue({
//options
})
Options objects can have inside of it are,
Data, Templates, Elements to mount on, Methods, Lifecycle call backs.- ATrue
- BFalse
155The setters and getters are visible to the user and are pre-written code in vue doing it for us.
- ATrue
- BFalse
156Decorative rendering: {{message}} that instantly displays onto the page.
- ATrue
- BFalse
157CDN stands for content delivery network.
- ATrue
- BFalse
158Filters: process the value before updating the DOM
- ATrue
- BFalse
159The purpose of XML: transportation and storage of data.
- ATrue
- BFalse
Information
- Description
- Quiz on Week 8 - 12, created by Jaremy Bannon on 28/11/2018.
- Author
- Jaremy Bannon
- Language
- English
- Views
- 10
- Rating
- No ratings yet Rate this quiz