front-end developer capstone coursera week 4 quiz answers
Final Graded Quiz
1. Which of the following is not part of the CSS box model?
- Border
- The outline property
- Padding
- Margin
2. What is the first parameter you pass to the addEventListener() method?
- The target of the event.
- An optional Boolean value to use either event bubbling or event capturing.
- A string describing the type of event, such as click.
- A function that will handle the event.
3. True or False: When creating a new branch using the git branch command, that branch is only available to other developers once the branch is pushed to the remote repository.
- True
- False
4. Which of the following elements can you find in a user story for a website? Select all that apply.
- A feature of the website written from the perspective of the user.
- A user’s personal information.
- A user’s need or goal.
- A detailed list of requirements.
5. When designing a website using CSS grid, what code can you use to design three columns where the second column uses twice the space as the other two?
- grid-auto-columns: auto;
- grid-template-columns:1fr2fr1fr;
- grid-column-gap: 2fr;
- grid-template-rows: 1fr 2fr 1fr;
6. What is the very first step when creating a wireframe in Figma?
- Gather requirements
- Create a frame
- Create a grid
7. What does the git clone command do?
- It fetches the changes from the remote repository.
- It creates a new git repository.
- It creates a local copy of a remote repository.
8. Which of the following is not a valid Open Graph meta tag?
- <meta property=”og:image” content=”image.jpg”>
- <meta property=”og:description” content=”Page Description”>
- <meta property=”og:url” content=”https://example.com/page”>
- <meta property=”og:keywords” content=”keyword1, keyword2″>
- <meta property=”og:title” content=”Page Title”>
9. In the following component, which element is the top-level element?
- <ul>
- <>
- <li>
10. Which of the following hooks is most appropriate for tracking complex application state in React?
- useState
- useEffect
- useReducer
12. Which of the following statements about CSS grids are true? Select all that apply.
- CSS grids are created using the display property with a value of grid.
- CSS grids are created using the float property.
- CSS grids can be used to create inline-block elements.
- CSS grids can be used to create flexible layouts.
13. At which stage of the UX design process do you put yourself in the user's situation to get a better understanding of their requirements?
- Ideation
- Prototype
- Define the problem
- Empathize
14. Which one of the following is a valid object in JavaScript?
- var anObject = { ‘car’: ‘ford’ };
- var anObject = ‘car’: ‘ford’;
- var anObject = [ ‘car’: ‘ford’ ];
- var anObject = new Object[ ‘car’ : ‘ford’ ];
15. What will be the output of the following code?
var shoe = {};
shoe.type = 'sneaker';
shoe.brand = 'Nike';
shoe.info = function () { console.log('Nike sneaker') }
console.log(shoe.info)
- undefined
- ‘Nike sneaker’
- [ Function (anonymous) ]
- [ Function (info) ]
16. What will be the output of the following code?
var dataType = typeof('what is my type?');
console.log(dataType);
- undefined
- number
- object
- string
17. In programming, which paradigm separates data and functionality?
- Declarative programming
- Imperative programming
- Functional programming
- Object-oriented programming
18. What will be the output of the following code?
console.log(bat);
const bat = 'Not a vampire';
- ‘Not a vampire’
- Uncaught ReferenceError
- undefined
- null
19. What is wrong with the following code?
var house = {
doors: 8,
garage: 'Yes'
}
console.log(Object.keys(house));
- undefined
- [ ‘doors’, ‘garage’ ]
- ‘doors’
‘garage’ - { ‘doors’, ‘garage’ }
20. When implementing a form in React, which type of components are recommended to be used?
- Docile component
- Controlled component
- Volatile component
- Uncontrolled component
21. What is the default behavior of React rendering?
- React will only render the component and not any children associated with it.
- React will recursively re-render all of a component’s children when the component renders depending on props and context.
- React only renders child components associated with the parent component.
- React will recursively re-render all of a component’s children when the component renders.
22. Which one of the following is true about naming custom hooks?
- It must at most be 12 characters long.
- It must have a name that begins with use.
- It must have a name that begins with an underscore.
- It must have a name that ends with Log.
23. Using CSS, which one of the following is the correct way to place some text in the center of the enclosing HTML element?
- alignment: center;
- text-align: center;
- text: center;
- text: middle;
24. Which one of the following is true about block elements?
- They only occupy the width and height of their content.
- They do not appear on a new line.
- They only occupy the height of their content.
- They occupy the full width and height of the parent element.
25. Which one of the following internet protocols allows you to securely list, send, receive and delete files on a server?
- Post Office Protocol (POP)
- Simple Mail Transfer Protocol (SMTP)
- File Transfer Protocol (FTP)
- SSH File Transfer Protocol (SFTP)
26. One of the design element principles is direction, what is this principle concerned with?
- The space between elements that forms its own shape.
- Adding depth and effects to a design.
- Using color to create moods and atmosphere.
- Guiding the users gaze to different parts of the page.
27. Fill in the blank: A ______ contains both tangible and intangible elements like patterns, components, guidelines, and other designer and developer tools.
- design system
- development system
- design board
- marketing system
28. Fill in the blank: React components return JSX expressions. In these expressions, the content between an opening and closing tag is passed as a unique prop called ______.
- element
- children
- component
- parents
29. What happens if a script fails during the Continuous Integration (CI) process?
- The process will retry a finite amount of times until it crashes.
- The process continues until a developer intervenes.
- The failing script is skipped and the process continues.
- A report is sent to developers and the process stops.
30. Which one of the following describes a valid use of a hook?
- Using a conditional statement inside a hook.
- Using a hook in a JavaScript function.
- Using a state hook inside a conditional statement.
- Using a hook inside a conditional statement.