Docsity

WGU C777 Web Development Applications Practice Exam – HTML, CSS, JavaScript, Forms & Respo, Exams of Web Application Development

Toggle sidebar
bg1
012455506786966466
66466866 6
!"#"$%"#"5&'
'
6('
)*9+,6-'
./7606,6,6/66661
696.'
2.6,6667663,3.'
4.6046,696756/76066.'
8.696,6,666960,687.'
'
4668./7606,6,6/666
61696.'
'
866 6860966/66
/96696:6,66/,6,66160
66.'
'
6"'
)4++1;3,,63660606
,766/666730600<6-'
.0<66<6'
pf3
pf4
pf5
pf8
pf9
pfa
pfd
pfe
pff
pf12
pf13
pf14
pf15
pf16
pf17
pf18
pf19
pf1a
pf1b
pf1c
pf1d
pf1e
pf1f
pf20
pf21
pf22
pf23
pf24
pf25
pf26
pf27
pf28
pf29
pf2a
pf2b
pf2c
pf2d
pf2e
pf2f
pf30
pf31
pf32
pf33
pf34
pf35
pf36
pf37
pf38
pf39
pf3a
pf3b
pf3c
pf3d
pf3e
pf3f

Partial preview of the text

Download WGU C777 Web Development Applications Practice Exam – HTML, CSS, JavaScript, Forms & Respo and more Exams Web Application Development in PDF only on Docsity!

Question 1 In JavaScript, what is a closure? A. A function bundled together with references to its lexical environment. B. A method used to close open database connections asynchronously. C. A design pattern that prevents objects from being modified. D. An event handler that terminates event propagation in the DOM. Question 2 In CSS Grid Layout, which property allows defining named grid areas that can be referenced by grid items using grid-area? A. grid-template-areas B. grid-area-names C. grid-layout-map D. grid-container-zones Question 3 Which HTMLS input attribute automatically focuses the form control when the page loads? A. active B. autofocus C. selected D. default-focus Question 6 What is the default event flow phase in which event listeners are triggered during standard DOM event bubbling? A. Capturing phase B. Target phase C. Bubbling phase D. Propagation pause phase Question 7 Which HTMLS element allows developers to provide multiple alternative image resources for different screen sizes or device resolutions? | 9 9 F > Question 8 Which JavaScript Promise method accepts an iterable of promises and returns a single Promise that resolves when all of the promises in the iterable have resolved? A. Promise.any() B. Promise.race() C. Promise.allSettled() D. Promise.all() B. aggregate() C. fold() D. accumulate() Correct Answer: A. reduce() Detailed Rationale: The reduce method runs a reducer callback function across array elements to accumulate a single return value. Question 11 In the HTMLS Drag and Drop API, which property of the event object is used to store and transfer data during a drag-and-drop operation? A. dataTransfer B. payloadTransfer C. dragData D. transferObject Correct Answer: A. dataTransfer Detailed Rationale: The dataTransfer object holds the data being dragged during a drag-and-drop interaction. Question 12 Which selector has the highest specificity in CSS? A. Element selector B. Class selector C. ID selector D. Universal selector Correct Answer: C. ID selector Detailed Rationale: ID selectors carry higher specificity weight than class selectors, pseudo-classes, and element selectors. Question 13 In the JavaScript event loop, how are callbacks from asynchronous operations like setTimeout handled relative to synchronous code? A. They execute immediately before synchronous code runs. B. They are placed in a task queue and executed after the call stack is empty. C. They interrupt synchronous loops mid-execution. D. They bypass the call stack entirely and run on dedicated hardware threads. A. align-self B. align-item-override C. flex-align D. justify-self Correct Answer: A. align-self Detailed Rationale: align-self allows default alignment (specified by align-items on the flex container) to be overridden for individual flex items. Question 16 Which JavaScript event fires on the window object when storage in localStorage or sessionStorage is modified in another tab or window? A. change B. update C. storage D. persist Correct Answer: C. storage Detailed Rationale: The storage event is fired on a document's window object when a localStorage or sessionStorage item is added, modified, or deleted in another context. Question 17 In Scalable Vector Graphics (SVG), which path command letter is used to draw an absolute cubic Bézier curve? A.M B.L cc D.Z Correct Answer: C. C Detailed Rationale: The C command in an SVG path data string draws a cubic Bézier curve using two control points and an endpoint. Question 18 Which JavaScript array method returns a new array containing all elements that pass the test implemented by the provided callback function? A. find() B. filter() Question 20 Which HTMLS form element provides an autocomplete drop-down list of suggested options for a text input? A. B Cc. D Correct Answer: B. Detailed Rationale: The datalist element specifies a list of pre-defined options for an input control, enabling autocomplete suggestions. Question 21 What does the keyword this refer to inside a standard function call when executing in JavaScript strict mode? A. The global window object B. undefined C. The document object D. null Correct Answer: B. undefined Detailed Rationale: In strict mode, regular function calls leave this undefined rather than defaulting to the global object. Question 22 Which CSS3 function allows calculating CSS property values using mathematical expressions with mixed units (e.g., percentages and pixels)? A. math() B. compute() C. calc() D. eval() Correct Answer: C. calc() Detailed Rationale: The calc() function allows mathematical expressions with different CSS units when assigning property values. Question 23 Which HTML5/JavaScript API allows running scripts in background threads separate from the main rendering thread? A. Web Workers API Question 25 In CSS Grid Layout, what does the fractional unit (fr) represent? A. A fixed pixel dimension scaled by browser zoom level. B. A fraction of the available space in the grid container. C. A relative font size based on root font settings. D. A floating-point ratio relative to the element's height. Correct Answer: B. A fraction of the available space in the grid container. Detailed Rationale: The fr unit distributes free space proportionally among grid tracks. Question 26 Which JavaScript object method prevents new properties from being added and marks existing properties as non-configurable and non- writable? A. Object.seal() B. Object.freeze() C. Object.lock() D. Object.protect() Correct Answer: B. Object.freeze() Detailed Rationale: Object.freeze() makes an object immutable by preventing additions, deletions, and modifications of properties. Question 27 Which global HTMLS attribute enables users to edit the content of any element directly in the browser? A. editable B. contenteditable C. modify-text D. user-editable Correct Answer: B. contenteditable Detailed Rationale: The contenteditable attribute is an enumerated attribute indicating whether an element can be edited by the user. Question 28 Which CSS pseudo-element inserts generated content immediately before an element's actual content? A. ::before Question 30 Which CSS media feature checks if the device is in portrait or landscape orientation? A. screen-mode B. aspect-ratio C. orientation D. display-rotation Correct Answer: C. orientation Detailed Rationale: The orientation media feature tests whether the viewport is in landscape or portrait mode. Question 31 Which JavaScript array method returns the value of the first element in the array that satisfies the provided testing function? A. filter() B. find() C. search() D. indexOf() Correct Answer: B. find() Detailed Rationale: The find method returns the first matching element value rather than an array of all matches. Question 32 Which HTMLS input attribute specifies a regular expression that the input's value must match during validation? A. match B. regex C. pattern D. constraint Correct Answer: C. pattern Detailed Rationale: The pattern attribute defines a regular expression against which form input is validated. Question 33 Which CSS property determines how an image or video should be resized to fit its containing element box (e.g., cover or contain)? A. object-fit