
TypeScript Functions Quiz
Authored by A Lakshman
Instructional Technology
Professional Development

AI Actions
Add similar questions
Adjust reading levels
Convert to real-world scenario
Translate activity
More...
Content View
Student View
10 questions
Show all answers
1.
MULTIPLE CHOICE QUESTION
30 sec • 1 pt
What is the return type of the function 'greet'?
void
boolean
number
string
2.
MULTIPLE CHOICE QUESTION
30 sec • 1 pt
Which of the following is a valid parameter type in TypeScript?
string
float
text
integer
3.
MULTIPLE CHOICE QUESTION
30 sec • 1 pt
What does the '?' signify in the function 'log'?
It indicates an optional parameter.
It indicates a default value.
It indicates a required parameter.
It indicates a return type.
4.
MULTIPLE CHOICE QUESTION
30 sec • 1 pt
What is the purpose of the 'add' function?
To subtract two numbers.
To concatenate two strings.
To return the sum of two numbers.
To log a message.
5.
MULTIPLE CHOICE QUESTION
30 sec • 1 pt
In the function 'subtract', what are the types of parameters x and y?
string
boolean
number
void
6.
MULTIPLE CHOICE QUESTION
30 sec • 1 pt
How would you define a function that takes two numbers and returns their product?
function multiply(a: number, b: number): number { return a * b; }
function multiply(a: string, b: string): number { return a * b; }
function multiply(a: number, b: number): boolean { return a * b; }
function multiply(a: number, b: number): void { return a * b; }
7.
MULTIPLE CHOICE QUESTION
30 sec • 1 pt
What is the output of the function 'log' if called with 'Hello' and 'INFO'?
Hello
[DEBUG] Hello
[INFO] Hello
[ERROR] Hello
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
13 questions
ELECTRICAL TECHNOLOGY
Quiz
•
1st Grade - Professio...
10 questions
BASICS OF MANAGEMENT
Quiz
•
Professional Development
10 questions
CM16 Cinématique - Mouvements et trajectoires
Quiz
•
Professional Development
10 questions
SFRP September 2023 Knowledge Check
Quiz
•
Professional Development
15 questions
Fundamental of Common Rail Diesel Fuel System
Quiz
•
University - Professi...
10 questions
March Quiz
Quiz
•
Professional Development
15 questions
Scratch: Events, Loops and The Coordinate System
Quiz
•
2nd Grade - Professio...
10 questions
ELECTRICIAN THEORY
Quiz
•
Professional Development
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 Instructional Technology
10 questions
How to Email your Teacher
Quiz
•
Professional Development
6 questions
3RD GRADE DECLARATION OF INDEPENDENCE EXIT TICKET
Quiz
•
Professional Development
19 questions
Black History Month Trivia
Quiz
•
6th Grade - Professio...
22 questions
Multiplying Exponents with the Same Base
Quiz
•
9th Grade - Professio...
40 questions
Flags of the World
Quiz
•
KG - Professional Dev...