Dart

 20 Minutes
 10 Questions


This test is designed to assess a student's knowledge of the basics of technology and the Dart programming language. It will cover topics such as data types, variables, functions, classes, and other fundamental concepts. The test will also include questions about the syntax and semantics of Dart code. The goal is to evaluate a student's understanding of the fundamentals of technology and Dart programming.


Example Question:

Multiple-Choice
Consider the two Dart code snippets below:



Code Snippet A
void fetchData() {
 for (int i = 0; i < 1e8; ++i) {}
 print('Data fetched');
}

void main() {
 print('Fetching data...');
 fetchData();
 print('Done.');
}




Code Snippet B
Future<void> fetchData() async {
 await Future.delayed(Duration(seconds: 2));
 print('Data fetched');
}


void main() async {
 print('Fetching data...');
 await fetchData();
 print('Done.');
}



Which of the following statements is most accurate?