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).
Create a free account and access millions of resources
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
14 questions
Petit Fours
Quiz
•
12th Grade - University
12 questions
ロジックテスト (Đề kiểm tra năng lực IT)
Quiz
•
University
8 questions
SESI 2 PAKET B ENGLISH
Quiz
•
1st Grade
10 questions
L5 Ôn tập CĐ 1 Bài 3 Thư điện tử (Email)
Quiz
•
2nd Grade
10 questions
Revision 3 BE B1+
Quiz
•
Professional Development
15 questions
Nghiệp vụ lễ tân G2 - Chương 1
Quiz
•
Professional Development
10 questions
DEBAT HPD223
Quiz
•
University
12 questions
Teaching across different age groups
Quiz
•
Professional Development
Popular Resources on Wayground
5 questions
This is not a...winter edition (Drawing game)
Quiz
•
1st - 5th Grade
25 questions
Multiplication Facts
Quiz
•
5th Grade
10 questions
Identify Iconic Christmas Movie Scenes
Interactive video
•
6th - 10th Grade
20 questions
Christmas Trivia
Quiz
•
6th - 8th Grade
18 questions
Kids Christmas Trivia
Quiz
•
KG - 5th Grade
11 questions
How well do you know your Christmas Characters?
Lesson
•
3rd Grade
14 questions
Christmas Trivia
Quiz
•
5th Grade
20 questions
How the Grinch Stole Christmas
Quiz
•
5th Grade
Discover more resources for Professional Development
5 questions
This is not a...winter edition (Drawing game)
Quiz
•
1st - 5th Grade
18 questions
Kids Christmas Trivia
Quiz
•
KG - 5th Grade
11 questions
How well do you know your Christmas Characters?
Lesson
•
3rd Grade
10 questions
Area
Quiz
•
3rd Grade
15 questions
Fun Christmas Trivia for Kids
Quiz
•
2nd Grade
26 questions
Christmas Songs
Quiz
•
2nd - 3rd Grade
20 questions
Disney Characters
Quiz
•
KG
17 questions
Multiplication facts
Quiz
•
3rd Grade
