100% satisfaction guarantee Immediately available after payment Both online and in PDF No strings attached 4.2 TrustPilot
logo-home
Exam (elaborations)

INF 651 Quiz and Test Exams (Latest Update) Verified Answers (Questions and Answers) NEW

Rating
-
Sold
-
Pages
79
Grade
A+
Uploaded on
28-02-2025
Written in
2019/2020

• Question 1 10 out of 10 points Which developer tool stores your project in an online code repository and allows you to share it with others? Selected Answer: GitHu b Correct Answer: GitHu b • Question 2 10 out of 10 points The command line interface for git is called: Selected Answer: Git Bash Correct Answer: Git Bash • Question 3 10 out of 10 points To begin using git with a project, the first command you should issue is: Selected Answer: git init Correct Answer: git init • Question 4 10 out of 10 points Concerning web development, MDN is an acronym for: Selected Answer: Mozilla Developer Network Correct Answer: Mozilla Developer Network • Question 5 10 out of 10 points You can use git inside of Visual Studio Code. Selected Answer: True Correct Answer: Tr ue • Question 6 10 out of 10 points Which of the following is NOT an integrated development environment (IDE)? Selected Answer: Git Bash Correct Answer: Git Bash • Question 7 10 out of 10 points In the Visual Studio Code file tree, a file that has a U beside it indicates it has been uploaded by git. Selected Answer: False Correct Fals Answer: e • Question 8 10 out of 10 points What option should always be included with the command git commit? Selected Answer: - m Correct Answer: - m • Question 9 10 out of 10 points After adding your file changes to your git repository with git add, what is the next step git requires? Selected Answer: git commit Correct Answer: git commit • Question 10 10 out of 10 points Which developer tool tracks each change to your project on your computer? Selected Answer: gi t Correct Answer: gi t • Question 1 10 out of 10 points I need to generate a random number between 1 and 50. Help me by filling in the blank to complete the equation. _______(Mm() * 50) + 1; Selected Answer: M r Answers: M nd M r M M nc • Question 2 10 out of 10 points Javascript variables are named using ____________________. Selected Answer: camelCase Answers: camelCase proper case all upper case all lower case • Question 3 10 out of 10 points What type of data will the following line of code return? "taco cat".indexOf('taco',1) !== -1; Selected Answer: boolean Answers: string undefin ed boolean number • Question 4 10 out of 10 points I need to return the remainder of 13 divided 5. Which operator achieves the result I need? Selected Answer: % Answers: /= // / % • Question 5 10 out of 10 points Choose the result of: 2 + 3 + "paddy" + "wagon"; Selected Answer: 5paddywagon Answers: 5paddywagon 5 paddy wagon 23paddywagon 2 3 padding wagon • Question 6 10 out of 10 points If I declare a variable like this: let myInt; It automatically has a value of zero. Selected Answer: Fals e Answers: Tru e Fals e • Question 7 10 out of 10 points let myName = "Dave"; The letter "e" has an index position of 3. Selected Answer: Tru e Answers: Tru e Fals e • Question 8 10 out of 10 points Using the .slice() method, complete the following code so that it returns the last 4 characters of whatever value myString holds. myS(________); Selected Answer: -4 Answers: -4 myString + 4 4 myS gth • Question 9 10 out of 10 points let myInt = 0; myInt++; The variable myInt is now equal to zero because zero plus zero is still zero. Selected Answer: Fals e Answers: Tru e Fals e • Question 10 10 out of 10 points Choose the result of: "humpty" + 3 + 2 + "dumpty"; Selected Answer: humpty32dump ty Answers: humpty32dump ty humpty5dumpt y humpty 3 2 dumpty error: undefine d • Question 1 10 out of 10 points It is easy to create an endless loop by mistake. What should we add to the code block of the loop below to prevent it from being an endless loop? Select ALL answers that will work (together if necessary) to prevent the loop from being an endless loop. var x = 1; while (x > 0){ (x); } Selected Answers: x++ A break statement An IF statement to check if x > 50 Answers: x++ A break statement x = M(Mm() * 1 0) +1; An IF statement to check if x > 50 • Question 2 10 out of 10 points Which statement in a for loop is required? Select the best answer. Selected Answer: None - all for loop statements are optional. Answers: Statement 3 Statement 1 Statement 2 None - all for loop statements are optional. • Question 3 10 out of 10 points Select the answer that best completes this sentence: A for loop has ________ optional parts (aka expressions and aka statements - depending on the source you read). Selected Answer: thre e Answers: four thre e no two • Question 4 10 out of 10 points I need to construct an IF statement that checks if the value of x is divisible by 2. Select the best answer to complete the IF statement with the desired outcome. if (_____________) { (x + ' is divisible by 2.'); } else { (x + ' is NOT divisible by 2.'); } Selected Answer: x % 2 === 0 Answers: x / 2 == = 0 x % 2 === 0 x % 2 === 1 x / 2 == = 1 • Question 5 10 out of 10 points You cannot have over five ELSE IF statements in your IF statement. Selected Answer: Fals e Answers: Tru e Fals e • Question 6 10 out of 10 points Please fill-in the blank to complete the for loop below so it will execute the loop once for each letter in any name the user enters: var myName = 'any-name-entered'; //do not take this string literally - It should work for Dave or Harold or Sue or whoever enters their name. for (var x = 0; x < ____________; x++) { case-sensitive - no spaces please (myName[x]); } Selected Answer: myN gth Correct Answer: Evaluation Method Correct Answer Exact Match myNh • Question 7 10 out of 10 points An IF statement must include an ELSE to execute if the IF condition is false. Selected Answer: Fals e Answers: Tru e Fals e • Question 8 10 out of 10 points Fill-in the blank to complete the following ternary statement. Casesensitive. No spaces please. shipState !== "KS" __ ('No Sales Tax.') : ('We need to add sales tax.'); Selected Answer: ? Correct Answer: Evaluation Method Correct Answer Exact Match ? • Question 9 10 out of 10 points An IF, ELSE IF statement must end with an ELSE to execute if none of the previous conditions were true. Selected Answer: Fals e Answers: Tru e Fals e • Question 10 10 out of 10 points switch(cityName) { case "Denver": ('MST'); ______; default: ('CST'); } Please complete the code above by filling in the blank. No space please. Casesensitive. Selected Answer: brea k Correct Answer: Evaluation Method Correct Answer Exact Match • Question 1 10 out of 10 points const age = 30; { const isEven = (number) => { return number % 2 === 0; }; (isEven(age)); } Is the above valid code that will execute without an error? Selected Answer: True Correct Answer: Tr ue • Question 2 10 out of 10 points Fill-in the blank to complete the function definition. Case-sensitive - no spaces please. _________ multiply(a,b) { return a * b; } Selected Answer: functi on Correct Answer: Evaluation Method Correct Answer Exact Match function • Question 3 10 out of 10 points const squared = function (number) { return number * number; } How do you call this function with a parameter of 10? Selected Answer: squared(1 0); Correct Answer: squared(1 0); • Question 4 10 out of 10 points When we know we will receive a value from a function, you could also say the function will __________ a value. Select the best answer. Selected Answer: retur n Correct Answer: retur n • Question 5 10 out of 10 points const sum = (num1, num2) => { return num1 + num2; } (sum(10)); What is output to the console? Selected Answer: Na N Correct Answer: Na N • Question 6 10 out of 10 points var name = "Dave"; { var name = "John"; } (name); What is output to the console? Selected Answer: Joh n Correct Answer: Joh n • Question 7 10 out of 10 points What type of data will this function return when called on the variable myNum? function overOneHundred(number) { return number > 100; } var myNum = 50; Selected Answer: boolea n Correct Answer: boolea n • Question 8 10 out of 10 points Variables created in the global scope may be used inside of a local scope. Selected Answer: True Correct Answer: Tr ue • Question 9 10 out of 10 points Built-in Browser functions are referred to as ________________. Select the best answer. Selected Answer: method s Correct Answer: method s • Question 10 10 out of 10 points const number = 50; if (number > 10) { const message = "The number is greater than 10."; } (message); What will be output to the console? Selected Answer: An error. Correct Answer: An error. • Question 1 10 out of 10 points let myDog = "Tyson"; myDog = myD(""); myDog = myD(); (myDog); What is output to the console? Selected Answer: T,y,s,o, n Answers: T y s o n Tyson T,y,s,o, n T-y-s-on Response Feedback: Righ t! • Question 2 10 out of 10 points Select ALL that can be stored in an array. Selected Answers: boolea n array string numbe r Answers: boolea n array string numbe r Response Feedback: Boo m! • Question 3 10 out of 10 points const myData = ['Dave','23','true']; What type of data is in index position 1? Selected Answer: string Answers: numbe r string boolea n array Response Feedback: Don't quote me... but yes! • Question 4 10 out of 10 points const myArray = ["Supreme", 16.99, ["parmesan packets","pepper packets","napkins"], "delivery"]; Which answer holds the string value "pepper packets"? Selected Answer: myArray[2][1] Answers: myArray["pepper packets"] myArray[1][2] myArray[2][1] myArray[1][0] • Question 5 10 out of 10 points const myGuitars = ['Strat','Les Paul','Tele','Explorer','Wolfgang']; I execute the following line of code: delete myGuitars[0]; What is the value of myGuitars[0] now? Selected Answer: undefined Answers: Les Paul Tele Nothing.. myGuitars[0] is no longer part of the array. undefined Response Feedback: Bing o! • Question 6 10 out of 10 points const myCars = ["Camaro","Hummer","Mustang","Tesla"]; I want to replace the array element holding the string value "Tesla" with an array element holding the string value "Gremlin". Please complete the following line of code to help me achieve the desired result: myCe(_______________); Selected Answer: 3, 1, "Gremlin" Answers: 2, 0, "Gremlin" 3, 0, "Gremlin" 2, 1, "Gremlin" 3, 1, "Gremlin" • Question 7 10 out of 10 points const myGuitars = ["Les Paul","Strat","SG","Tele"]; I want to log the element of the array that holds the "SG" string value to the console. What goes in the blank to complete the line of code: (_________); Selected Answer: myGuitars[2] Answers: myGuitars[S G] myGuitars["S G"] myGuitars[3] myGuitars[2] • Question 8 10 out of 10 points I want to add the value "Gibson Explorer" to the end of an array. Which method do I use? Selected Answer: .push() Answers: .push() .shift() .pop() .unshift () Response Feedback: push() it real good! • Question 9 10 out of 10 points const myArray = ["Pepperoni", 12.99, ["parmesan packets","pepper packets"], ["napkins","paper plates"]]; How many dimensions is myArray? Selected Answer: 2 Answers: 3 2 4 1 Response Right Feedback: on! • Question 10 10 out of 10 points const myTreble = ["Vocals","Guitar"]; const myBass = ["Bass","Drums"]; Complete the following line of code with the method that combines the above arrays into one new array named myBand: const myBand = myTreble.________(myBass); Selected Answer: conca t Answers: push conca t join appen d • Question 1 10 out of 10 points A function stored in an object is referred to as a _________________. Selected Answer: metho d Answers: eleme nt metho d proper ty array • Question 2 10 out of 10 points const { name, major, gpa } = student; Utilizing destructuring, I have just defined __________________. Selected Answer: three variables from the properties within the student object Answers: an array of properties from the student object three variables from the properties within the student object a new object named student with three properties one variable named student from three properties in an object. • Question 3 10 out of 10 points To programmatically access the property value of an object with an iterator variable, you must use _________________ notation. Selected Answer: brack et Answers: index brack et neste d dot • Question 4 10 out of 10 points We can access object properties with ________________________. Select ALL that apply. Selected Answers: dot notation bracket notation Answers: variable notation index notation dot notation bracket notation Response Feedback: Dot["correct "]! • Question 5 10 out of 10 points If you want to add new properties or methods to an object, you must define the object with the keyword let. Selected Answer: Fals e Answers: Tru e Fals e • Question 6 10 out of 10 points const guitars = {make: 'Gibson', model: 'Les Paul'}; This is an example of creating a Javascript object with _____________________. Selected Answer: an Object literal Answers: an Object constructor an Object literal a class the keyword new Object(); Response Feedback: You are literally correct! • Question 7 10 out of 10 points function myRide({ make, model, year }) { (`I drive a ${year} ${make} ${model}.`); } I have an object named myCar with multiple properties including make, model, and year. How do I call the above function? Selected Answer: myRide(myCar); Answers: myRide(make, model, year); myRide(myC, myC, myC); myRide(...myCar); myRide(myCar); • Question 8 10 out of 10 points We can add new properties and methods to Child objects, and they will also have access to the properties and methods they inherit from their Parent objects. Selected Answer: Tru e Answers: Tru e Fals e Response Feedback: That's right! Child objects inherit properties and methods, but we can also add new ones. • Question 9 10 out of 10 points const myDegreeMap = { semester: { spring21 : { classes: ['sociology','math','programming'] } } }; Given the above object, how do I access the value "programming"? Selected Answer: myDegreeMes[2]; Answers: myDegreeMa mming; myDegreeMes[2]; myDegreeMes["progra mming"]; myDegreeMes.2; • Question 10 10 out of 10 points If I want to return the value of an object property, I must reference the _____________ using dot or bracket notation. Selected Answer: key Answers: literal variab le positio n key • Question 1 10 out of 10 points To construct a subclass based on a parent class, what keyword must be used in the declaration of the subclass? Selected Answer: exten ds Answers: make super inherit s exten ds • Question 2 10 out of 10 points Which symbol indicates a private field declaration within a class? Selected Answer: # Answers: # % ! $ • Question 3 10 out of 10 points Using a Factory Function to create objects allows the objects to have _________________________. Selected Answer: private properties and private methods Answers: private properties and private methods private methods but not private properties private properties but not private methods only public properties and methods • Question 4 10 out of 10 points Identify the static JSON method: Selected Answer: stringi fy Answers: stringi fy concat send split • Question 5 10 out of 10 points What keyword must be used when referring to properties in a class constructor? Selected Answer: this Answers: super exten ds this const • Question 6 10 out of 10 points When receiving JSON, which JSON method converts the string data back into an object? Selected Answer: parse( ) Answers: read() object () parse( ) codify () • Question 7 10 out of 10 points In the video for JavaScript Classes, they are compared to a "blueprint" or _________________ for creating objects. Selected Answer: templa te Answers: instanc e templa te method functio n • Question 8 10 out of 10 points To inherit the properties of a parent class, what keyword must be invoked in a subclass constructor? Selected Answer: super Answers: sudo inherit super exten ds • Question 9 10 out of 10 points Instead of retrieving an object property value with dot notation, it is best practice to add a ______________ method that retrieves the value. Selected Answer: getter Answers: setter value Of getter retriev al • Question 10 10 out of 10 points As a naming convention, what symbol has traditionally indicated a JavaScript property should be considered private? Selected Answer: _ (underscore) Answers: ## (double hash) $ (dollar sign) _ (underscore) # (hash) • Question 1 4 out of 4 points const myGuitars = ["Les Paul","Strat","SG","Tele"]; I want to log the element of the array that holds the "SG" string value to the console. What goes in the blank to complete the line of code: (_________); Selected Answer: myGuitars[2] Answers: myGuitars[3] myGuitars[2] myGuitars[S G] myGuitars["S G"] • Question 2 4 out of 4 points Variables created in the global scope may be used inside of a local scope. Selected Answer: Tru e Answers: Tru e Fals e • Question 3 4 out of 4 points When we know we will receive a value from a function, you could also say the function will __________ a value. Select the best answer. Selected Answer: return Answers: call return execut e invoke • Question 4 4 out of 4 points Choose the result of: "humpty" + 3 + 2 + "dumpty"; Selected Answer: humpty32dump ty Answers: humpty32dump ty humpty5dumpt y humpty 3 2 dumpty error: undefine d • Question 5 0 out of 4 points My javascript has the three following lines: ("Hello!"); alert("Hi!"); ("World?"); After I click run, what do I see in the devtools console? Selected Answer: Hello ! World ? Answers: Hello ! Hi! World ? Hello ! World ? Hi! Hello ! Hello ! World ? • Question 6 4 out of 4 points const myData = ['Dave','23','true']; What type of data is in index position 1? Selected Answer: string Answers: string array numbe r boolea n • Question 7 4 out of 4 points const age = 30; { const isEven = (number) => { return number % 2 === 0; }; (isEven(age)); } Is the above valid code that will execute without an error? Selected Answer: Tru e Answers: Tru e Fals e • Question 8 4 out of 4 points I need to construct an IF statement that checks if the value of x is divisible by 2. Select the best answer to complete the IF statement with the desired outcome. if (_____________) { (x + ' is divisible by 2.'); } else { (x + ' is NOT divisible by 2.'); } Selected Answer: x % 2 === 0 Answers: x % 2 === 0 x / 2 == = 0 x / 2 == = 1 x % 2 === 1 • Question 9 4 out of 4 points const squared = function (number) { return number * number; } How do you call this function with a parameter of 10? Selected Answer: squared(10); Answers: squared[10]; squared => 10; squared(10); function squared(number=10); • Question 10 4 out of 4 points Select the answer that best completes this sentence: A for loop has ________ optional parts (aka expressions and aka statements - depending on the source you read). Selected Answer: thre e Answers: thre e no four two • Question 11 4 out of 4 points const myArray = ["Supreme", 16.99, ["parmesan packets","pepper packets","napkins"], "delivery"]; Which answer holds the string value "pepper packets"? Selected Answer: myArray[2][1] Answers: myArray[1][2] myArray["pepper packets"] myArray[1][0] myArray[2][1] • Question 12 4 out of 4 points Javascript variables are named using ____________________. Selected Answer: camelCase Answers: all upper case all lower case camelCase proper case • Question 13 4 out of 4 points If you want to add new properties or methods to an object, you must define the object with the keyword let. Selected Answer: Fals e Answers: Tru e Fals e • Question 14 4 out of 4 points Instead of retrieving an object property value with dot notation, it is best practice to add a ______________ method that retrieves the value. Selected Answer: getter Answers: getter value Of setter retriev al • Question 15 4 out of 4 points Choose the result of: 2 + 3 + "foot" + "ball"; Selected Answer: 5football Answers: 5football 5 foot ball 2 3 foot ball 23footbal l • Question 16 4 out of 4 points In the Visual Studio Code file tree, a file that has a U beside it indicates it has been uploaded by git. Selected Answer: Fals e Answers: Tru e Fals e • Question 17 4 out of 4 points As a naming convention, what symbol has traditionally indicated a JavaScript property should be considered private? Selected Answer: _ (underscore) Answers: ## (double hash) # (hash) $ (dollar sign) _ (underscore) • Question 18 4 out of 4 points An IF statement must include an ELSE to execute if the IF condition is false. Selected Answer: Fals e Answers: Tru e Fals e • Question 19 4 out of 4 points What option should always be included with the command git commit? Selected Answer: - m Answers: -a - m -q -u • Question 20 4 out of 4 points To construct a subclass based on a parent class, what keyword must be used in the declaration of the subclass? Selected Answer: exten ds Answers: inherit s super make exten ds • Question 21 4 out of 4 points const { name, major, gpa } = student; Utilizing destructuring, I have just defined __________________. Selected Answer: three variables from the properties within the student object Answers: one variable named student from three properties in an object. a new object named student with three properties three variables from the properties within the student object an array of properties from the student object • Question 22 4 out of 4 points Using the .slice() method, complete the following code so that it returns the last 4 characters of whatever value myString holds. myS(________); Selected Answer: -4 Answers: -4 myS gth 4 myString + 4 • Question 23 4 out of 4 points When issuing a () statement, you expect to see the output on the web page. Selected Answer: Fals e Answers: Tru e Fals e • Question 24 4 out of 4 points const myCars = ["Camaro","Hummer","Mustang","Tesla"]; I want to replace the array element holding the string value "Tesla" with an array element holding the string value "Gremlin". Please complete the following line of code to help me achieve the desired result: myCe(_______________); Selected Answer: 3, 1, "Gremlin" Answers: 2, 0, "Gremlin" 3, 1, "Gremlin" 3, 0, "Gremlin" 2, 1, "Gremlin" • Question 25 4 out of 4 points const number = 50; if (number > 10) { const message = "The number is greater than 10."; } (message); What will be output to the console? Selected Answer: An error. Answers: The number is less than 10. An error. Nothing. The number is greater than 10. • Question 1 10 out of 10 points When debugging, Chrome DevTools offers many different types of ____________________. Selected Answer: breakpoint s Answers: elements breakpoint s debuggers g() • Question 2 10 out of 10 points Which panel in Chrome DevTools allows you to debug JavaScript? Selected Answer: Sources Answers: Elements Sources Applicatio n Performan ce • Question 3 10 out of 10 points We can create blocks of code for error handling... especially when working with user input. Select ALL the code block names we use for error handling: Selected Answers: Final ly Catc h Try Answers: Final ly Catc h Try Else Response Feedback: Try, Catch, and Finally... that's it! • Question 4 10 out of 10 points try { throw new Error('This is a custom error.'); } catch(e) { (`${}: ${ge}`); } // In the code above, what does e represent? Select ALL that apply. Selected Answers: the catchID the error object we created in the Try block of code a parameter for the Catch block of code Answers: the catchID the error object we created in the Try block of code an event a parameter for the Catch block of code Response Feedback: Right on! • Question 5 10 out of 10 points What keyword can we put in our code to pause its execution and instantly launch the developer console? Selected Answer: debugge r Answers: debugge r break stop breakpoi nt • Question 6 10 out of 10 points The first step in debugging your code is to _________________________. Selected Answer: reproduce the bug Answers: start using () check variable values pause your code with a breakpoint reproduce the bug • Question 7 10 out of 10 points Errors may only be displayed in the console with () Selected Answer: Fals e Answers: Tru e Fals e Response Feedback: Right! You can display an error in the console any way you want. () and () are a couple of examples. • Question 8 10 out of 10 points Select the properties of an Error object instance. (standard and nonstandard according to MDN are both valid here) Selected Answers: messag e stack name Answers: type messag e stack name Response Feedback: Correc t! • Question 9 10 out of 10 points When we want our code to create an error, we use this keyword: Selected Answer: throw Answers: throw consol e call windo w Response Feedback: Throw it away! • Question 10 10 out of 10 points Select ALL the Javascript error types that were discussed in our class video: Selected Answers: SyntaxError TypeError ReferenceEr ror Answers: SyntaxError ValueError TypeError ReferenceEr ror Response Feedback: Yeah! That wasn't easy! MDN lists six core types in your assigned readings. • Question 1 10 out of 10 points I have created a paragraph with javascript. I still need to create the text to go in it. Which method do I use to create the text? Selected Answer: eTextNod e() Answers: eElement () eTextCont ent() eInnerHT ML() eTextNod e() Response Feedback: It's all Nodes these days! • Question 2 10 out of 10 points I need to select ALL of the paragraph elements in the DOM. Which method or methods will let me do this? (Select ALL that apply) Selected Answers: ElementsByTagNa me('p') SelectorAll('p') Answers: ElementById('p') Selector('p') ElementsByTagNa me('p') SelectorAll('p') • Question 3 10 out of 10 points There are 5 paragraphs in the DOM. I need to change the text color of the 2nd paragraph to white. Which line of code will achieve my goal? Selected Answer: ElementsByTagName('p') [1]. = 'white'; Answers: ElementsByTagName('p'). = 'white'; Selector('p'). = 'white'; ElementsByTagName('p') [1]. = 'white'; ElementsByTagName('p') [2]. = 'white'; Response Feedback: You nailed it! • Question 4 10 out of 10 points The HTML Document Object Model is often referred to as ________________________. Selected Answer: a tree Answers: a class XML a tree an array Response Feedback: You are correct!!! • Question 5 10 out of 10 points The textContent property of an HTML element may contain HTML markup. Selected Answer: Fals e Answers: Tru e Fals e Response Feedback: Right on! • Question 6 10 out of 10 points I need to select every other div element inside a section element with the id attribute of "view1". Which selector do I need? Selected Answer: SelectorAll('#view1 div:nth-oftype(2n)') Answers: SelectorAll('view1 div:nth- child(2)') SelectorAll('div:nth-child(2)') Selector('#view1 div:nth-oftype(2n)') SelectorAll('#view1 div:nth-of- type(2n)') • Question 7 10 out of 10 points I have a div with an id attribute of "divOne". It is inside the body element. I create a new div like this: var newDiv = eElement('div'); I want to add my newDiv to the document AFTER divOne. Which line of code achieves my goal? Selected Answer: dChild(newDiv); Answers: ElementById('divOne').insertAfter( newDiv); OdChild(newDiv); dChild(newDiv); ElementById('divOne').insertBefore (newDiv); Response Feedback: Right on... when you append it to the body, it defaults to the bottom of the document. • Question 8 10 out of 10 points I create a div element on my page. Inside the div element, I create a paragraph element. When discussing the relationship of the div element to the paragraph element, the div is referred to as the _______________ of the paragraph. Selected Answer: parent Answers: ancest or parent father child Response Feedback: Indee d! • Question 9 10 out of 10 points Select ALL of the things found within the Document Object Model (no partial credit): Selected Answers: attribute s nodes whitespa ce elements Answers: attribute s nodes whitespa ce elements Response Feedback: Yahoo! You're all clear! • Question 10 10 out of 10 points Which method will select only one element from the DOM? Selected Answer: ElementById() Answers: ElementsByClassN ame() ElementById() SelectorAll() ElementsByTagNa me() • Question 1 10 out of 10 points Before calling an initApp() function, it is good practice to listen for the DOMContentLoaded event OR the _____________________ event of the document so we know the DOM elements we want to select exist. Selected Answer: readystatechang e Answers: onreadystatecha nge readyState readystatechang e onreadyState • Question 2 10 out of 10 points Which type of storage may still be retrieved after we close our browser and then revisit the web app at another time? Selected Answer: localStorage Answers: appStorage localStorage sessionStora ge dbStorage • Question 3 10 out of 10 points We use event listeners instead of putting JavaScript inline in our HTML elements. This separation of concerns is a principle of ___________________________. Selected Answer: Unobtrusive JavaScript Answers: Pure JavaScript Unobtrusive JavaScript JavaScript Separati on Default JavaScript • Question 4 10 out of 10 points I have created a function named doTheStuff. Select the line of code that calls doTheStuff with a click event listener when the button is clicked: Selected Answer: EventListener("click", doTheStuff, false); Answers: EventListener("click", () { doTheStuff() }, false); doTheSEventListener("click", function() { doTheStuff() }, false); EventListener("click", doTheStuff()); EventListener("click", doTheStuff, false); Response Feedback: Right! We just name the function. You do not need the operators. We could call the function inside an anonymous function, but this is not necessary or the "proper" way unless we are calling more than one function. • Question 5 10 out of 10 points Look at the following line of code: EventListener('click',function(magic) {('abracadabra')}; What does "magic" refer to? Selected Answer: the event object Answers: an unknown variable the document object a parameter to pass when we call the function the event object Response Feedback: You are on fire! That one was not easy. • Question 6 10 out of 10 points When an event triggers on the element that creates the event, and then moves outward to trigger the same event on a container element, it is called event _______________. Selected Answer: bubblin g Answers: bubblin g purging capturi ng flaggin g • Question 7 10 out of 10 points The addEventListener has 3 parameters: the event to listen for, the function to call, and optionally, the ________________. Selected Answer: useCapture Answers: useBubbling preventDefau lt stopPropagati on useCapture • Question 8 10 out of 10 points I have an HTML form. I want to apply form validation via JavaScript instead of letting the form submit right away. To keep this from happening, JavaScript lets me apply _____________________ to the submit event. Selected Answer: preventDefault () Answers: preventDefault () stopPropagati on() submitDelay() stopEvent() • Question 9 10 out of 10 points I am adding a click event listener to a div. The div is a child of the body element. The body element already has a click event. If I click on the div, the click event of the body will also occur. Help me complete this code by filling in the blank (exact match, case-sensitive) to prevent the click event of the body from firing. DEventListener('click', function(e){ e.___________________ ; ('I hope you get it!'); }); Selected Answer: stopPropagati on() Correct Answer: Evaluation Method Correct Answer Exact Match stopPropagation() Response Awesom Feedback: e! • Question 10 Selected Answer: Whichever element ini triggered the click eve Answers: The element in ener() 10 out of 10 points Look at the following line of code: EventListener('click',function(event) {(t)}; We are listening for the click event. When a click occurs, it calls the anonymous function. What is the t referring to? the global window var Whichever element ini triggered the click eve The document in ener() • Question 1 10 out of 10 points Section 508 compliance is required for all organizations that provide goods or services. Selected Answer: Tru e Answers: Tru e Fals e • Question 2 10 out of 10 points The ___________________ guidelines are organized around the POUR principles. Selected Answer: Web Content Accessibility Answers: Web Content Accessibility Web Accessibility Initiative Web Accessibility In Mind Accessible Rich Internet Application • Question 3 10 out of 10 points What does the acronym POUR stand for? Selected Answer: Perceivable, Operable, Understandable, Robust Answers: Perceivable, Operable, Understandable, Robust Progressive, Operable, Understandable, Readable Progressive, Operable, Unlimited, Robust Perceivable, Operable, Unlimited, Readab le • Question 4 10 out of 10 points Which Section 508 requirement makes sure the coding of a website, software, operating systems, etc. is compatible with assistive technologies? Selected Answer: technical Answers: support progressi ve technical functiona l • Question 5 10 out of 10 points ARIA changes the behavior of the elements it is applied to. Selected Answer: Fals e Answers: Tru e Fals e • Question 6 10 out of 10 points The ______________________________ specification adds the ability to modify and enhance the semantic meaning of elements in the DOM. Selected Answer: WAIARIA Answers: W3C WAIARIA WebAI M WCAG • Question 7 10 out of 10 points Semantic HTML improves A11y. Selected Answer: Tru e Answers: Tru e Fals e • Question 8 10 out of 10 points Landmark elements are important for screen reader navigation. Select ALL of the landmark elements that help create "hot spots" on a web page. Selected Answers: main nav head er Answers: main nav div head er • Question 9 10 out of 10 points You can enable a screen reader in Chrome using the ________________________ extension. Selected Answer: ChromeVox Answers: WAVE Evaluation Tool Alexa WebAIM ChromeVox • Question 10 10 out of 10 points To be legally compliant with Section 508, a web site must meet how many "main" requirements? Selected Answer: 3 Answers: 4 2 3 5 • Question 1 10 out of 10 points Every function must be imported on a separate line. Selected Answer: Fals e Answers: Tru e Fals e • Question 2 10 out of 10 points Each(user => { () }); In the above code, what is the word user referring to? Selected Answer: An element in the users array. Answers: A parameter in the users function. An element in the users array. A method in the users class. A property in the users object. • Question 3 10 out of 10 points A module may have more than one default export. Selected Answer: Fals e Answers: Tru e Fals e • Question 4 10 out of 10 points Each(user => { () }); The above code ________________________________________. Selected Answer: logs the user id property of every user object contained in the users array. Answers: logs the user id property of every user object contained in the users array. won't work. logs the user id property of one user object contained in the users array. logs the key of each user element contained in the users object. • Question 5 10 out of 10 points A module is required to have a default export. Selected Answer: Fals e Answers: Tru e Fals e • Question 6 10 out of 10 points I have a module with three functions: add(), subtract(), and multiply(). I want to import all three functions. Select all of the correct statements to accomplish this. Selected Answers: import { add, subtract, multiply } from "./myF"; import { add } from "./myF"; import { subtract } from "./myF"; import { multiply } from "./myF"; import * as Calculator from "./myF"; Answers: import { add, subtract, multiply } from "./myF"; import { add } from "./myF"; import { subtract } from "./myF"; import { multiply } from "./myF"; import add, subtract, multiply from "./myF"; import * as Calculator from "./myF"; • Question 7 10 out of 10 points I receive user data in JSON format. I need to add all of the user ages together for a sum total as the first step for calculating an average age. What higher order function will I likely use to achieve this goal? Selected Answer: reduce( ) Answers: map() forEac h() filter() reduce( ) • Question 8 10 out of 10 points I receive user data in JSON format that has a field containing each user's average monthly purchase amount. I need to create a new array from this data containing an annual purchase projection for each user by multiplying their average monthly purchase by 12. What higher order function will I most likely use to achieve this goal? Selected Answer: map() Answers: map() reduce( ) filter() forEac h() • Question 9 10 out of 10 points Select ALL higher order functions that return new arrays. Selected Answers: filter() map() Answers: filter() forEac h() reduce( ) map() • Question 10 10 out of 10 points I receive user data in JSON format. I need to exclude all users under the age of 21. What higher order function will I likely use to achieve this goal? Selected Answer: filter() Answers: forEac h() map() reduce( ) filter() • Question 1 10 out of 10 points A callback is a ___________________ that is passed to a function as a parameter. Selected Answer: functio n Answers: variabl e object functio n promis e • Question 2 10 out of 10 points Functions must be defined with the await keyword to use async within. Selected Answer: Fals e Answers: Tru e Fals e • Question 3 10 out of 10 points By telling the receiving API what type of data we expect returned, we may receive different data. Where do we put this information in our fetch() call? Selected Answer: In the Accept property of the headers object. Answers: In the URL of the API endpoint. In the Accept property of the headers object. In the body mixin of the options object. In the Content-Type of the headers object. • Question 4 10 out of 10 points If I attempt to return the value of a fetch() call immediately without using a thenable or the await keyword, what will I receive? Selected Answer: A pending promise. Answers: A rejected promise. A pending promise. An empty array. A fulfilled promise. • Question 5 10 out of 10 points When using Fetch to request data, the optional second parameter Fetch accepts is a ______________________________. Selected Answer: objec t Answers: URL integ er objec t array • Question 6 10 out of 10 points The http POST method sends parameters in the API endpoint URL. Selected Answer: Fals e Answers: Tru e Fals e • Question 7 10 out of 10 points The .json() method of the body mixin returns a _________________________. Selected Answer: promis e Answers: promis e object string boolea n • Question 8 10 out of 10 points When using Fetch to request data, the first parameter Fetch accepts is usually a ______________________________. Selected Answer: URL Answers: object intege r URL boolea n • Question 9 10 out of 10 points You may await the resolution of more than one promise within an async function. Selected Answer: Tru e Answers: Tru e Fals e • Question 10 10 out of 10 points Promises have how many possible states? Selected Answer: 3 Answers: 1 3 4 2

Show more Read less











Whoops! We can’t load your doc right now. Try again or contact support.

Document information

Uploaded on
February 28, 2025
Number of pages
79
Written in
2019/2020
Type
Exam (elaborations)
Contains
Questions & answers

Subjects

Content preview

 Question 1
10 out of 10 points

Which developer tool stores your project in an online code repository and allows
you to share it with others?

Selected
Answer:
GitHu
b

Correct
Answer:
GitHu
b

 Question 2
10 out of 10 points

The command line interface for git is called:

Selected
Answer:
Git
Bash

Correct
Answer:
Git
Bash

 Question 3
10 out of 10 points

To begin using git with a project, the first command you should issue is:

Selected
Answer:
git
init

Correct
Answer:
git
init

 Question 4
10 out of 10 points

, Concerning web development, MDN is an acronym for:

Selected
Answer:
Mozilla Developer
Network

Correct
Answer:
Mozilla Developer
Network

 Question 5
10 out of 10 points

You can use git inside of Visual Studio Code.

Selected
Answer:
True

Correct Tr
Answer: ue

 Question 6
10 out of 10 points

Which of the following is NOT an integrated development environment (IDE)?

Selected
Answer:
Git
Bash

Correct
Answer:
Git
Bash

 Question 7
10 out of 10 points

In the Visual Studio Code file tree, a file that has a U beside it indicates it has
been uploaded by git.

Selected
Answer:
False

, Correct Fals
Answer: e

 Question 8
10 out of 10 points

What option should always be included with the command git commit?

Selected
Answer:
-
m

Correct
Answer:
-
m

 Question 9
10 out of 10 points

After adding your file changes to your git repository with git add, what is the
next step git requires?

Selected
Answer:
git
commit

Correct
Answer:
git
commit

 Question 10
10 out of 10 points

Which developer tool tracks each change to your project on your computer?

Selected
Answer:
gi
t

Correct
Answer:
gi

, t

 Question 1
10 out of 10 points

I need to generate a random number between 1 and 50. Help me by filling
in the blank to complete the equation.


_______(Math.random() * 50) + 1;




Selected
Answer:
Math.floo
r

Answers: Math.rou
nd



Math.floo
r

Math.ceil

Math.tru
nc

 Question 2
10 out of 10 points

Javascript variables are named using ____________________.

Selected
Answer:
camelCase

Answers:

camelCase

proper case

Get to know the seller

Seller avatar
Reputation scores are based on the amount of documents a seller has sold for a fee and the reviews they have received for those documents. There are three levels: Bronze, Silver and Gold. The better the reputation, the more your can rely on the quality of the sellers work.
ProfGoodlucK Rasmussen College
View profile
Follow You need to be logged in order to follow users or courses
Sold
3466
Member since
4 year
Number of followers
2866
Documents
8604
Last sold
1 day ago
High Quality Exams, Study guides, Reviews, Notes, Case Studies

All study solutions.

4.0

700 reviews

5
376
4
131
3
82
2
39
1
72

Recently viewed by you

Why students choose Stuvia

Created by fellow students, verified by reviews

Quality you can trust: written by students who passed their tests and reviewed by others who've used these notes.

Didn't get what you expected? Choose another document

No worries! You can instantly pick a different document that better fits what you're looking for.

Pay as you like, start learning right away

No subscription, no commitments. Pay the way you're used to via credit card and download your PDF document instantly.

Student with book image

“Bought, downloaded, and aced it. It really can be that simple.”

Alisha Student

Frequently asked questions