Coding convention
Quiz
•
Professional Development
•
KG - 3rd Grade
•
Practice Problem
•
Medium
Phuong Q
Used 1+ times
FREE Resource
Enhance your content in a minute
10 questions
Show all answers
1.
MULTIPLE CHOICE QUESTION
30 sec • 1 pt
Which of the following is incorrect branch naming.
Bugfix: bugfix/*
Feature: feature/*
Hotfix: hotfix/*
Release: master/*
Answer explanation
Release: release/*
2.
MULTIPLE CHOICE QUESTION
30 sec • 1 pt
Which of the following is prefered function declaration?
function test() {}
const test = () => {}
3.
MULTIPLE CHOICE QUESTION
30 sec • 1 pt
import * as React from 'react'
YES
NO
Answer explanation
- This is the new convention for importing React: Introducing the New JSX Transform – React Blog
- Easier to upgrade and supports tree-shaking.
4.
MULTIPLE CHOICE QUESTION
30 sec • 1 pt
Which of the following is Function Declaration
function Button(): React.ReactElement {/* */}
const Button: React.FC = () => {/* */}
Answer explanation
- Globals are bad
- Explicit types over generalized ones
5.
MULTIPLE CHOICE QUESTION
30 sec • 1 pt
Always use React Fragment to render multiple React components over array and wrapper div:
1function ComponentA() {
return <>
<ComponentB />
<ComponentC />
</>
}
YES
NO
Answer explanation
- A React Fragment doesn’t create a HTML tag, it helps improve performance, and prevent bugs.
- Unlike array, a React Fragment doesn’t need to specify key prop to its children.
6.
MULTIPLE SELECT QUESTION
45 sec • 1 pt
[Iterating objects] Which of the following statements are preferred?
for (const x in someObj) { if (!someObj.hasOwnProperty(x)) continue;}
for (const x in someObj) { }
for (const x of Object.keys(someObj)) { }
for (const [key, value] of Object.entries(someObj)) { }
7.
MULTIPLE CHOICE QUESTION
30 sec • 1 pt
someArr.forEach((item, index) => {
someFn(item, index);
});
SHOULD
SHOULD NOT
Answer explanation
Do not use Array.prototype.forEach, Set.prototype.forEach, and Map.prototype.forEach. They make code harder to debug and defeat some useful compiler checks (e.g. reachability).
Access all questions and much more by creating a free account
Create resources
Host any resource
Get auto-graded reports

Continue with Google

Continue with Email

Continue with Classlink

Continue with Clever
or continue with

Microsoft
%20(1).png)
Apple
Others
Already have an account?
Similar Resources on Wayground
10 questions
Confidence
Quiz
•
1st Grade
10 questions
22.02.2021 PROF. DR. AHMET KIDEYŞ 1. TEST
Quiz
•
University
12 questions
8.1 - Grammar Practice
Quiz
•
Professional Development
12 questions
What do you want to be?
Quiz
•
2nd - 12th Grade
10 questions
Dangerous Goods
Quiz
•
University
10 questions
How to Give Feedback?
Quiz
•
12th Grade
10 questions
HTML-1
Quiz
•
KG - 3rd Grade
13 questions
Crédito II
Quiz
•
KG
Popular Resources on Wayground
15 questions
Fractions on a Number Line
Quiz
•
3rd Grade
20 questions
Equivalent Fractions
Quiz
•
3rd Grade
25 questions
Multiplication Facts
Quiz
•
5th Grade
22 questions
fractions
Quiz
•
3rd Grade
20 questions
Main Idea and Details
Quiz
•
5th Grade
20 questions
Context Clues
Quiz
•
6th Grade
15 questions
Equivalent Fractions
Quiz
•
4th Grade
20 questions
Figurative Language Review
Quiz
•
6th Grade
Discover more resources for Professional Development
15 questions
Fractions on a Number Line
Quiz
•
3rd Grade
20 questions
Equivalent Fractions
Quiz
•
3rd Grade
22 questions
fractions
Quiz
•
3rd Grade
10 questions
Groundhog Day Trivia Questions
Interactive video
•
3rd - 6th Grade
9 questions
Point of View
Quiz
•
3rd - 4th Grade
10 questions
Area
Quiz
•
3rd Grade
10 questions
Groundhog Behavior and Hibernation Facts
Interactive video
•
3rd - 5th Grade
20 questions
Identifying Fractions
Quiz
•
3rd Grade
