
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
10 questions
Sejarah dan Nama Mobil
Quiz
•
Professional Development
8 questions
Order and Quote Maintenance
Quiz
•
Professional Development
13 questions
Exhaust System Rectification Works
Quiz
•
University - Professi...
10 questions
Class 2 - Objects and attributes
Quiz
•
Professional Development
11 questions
Teste Lógica - Portugol
Quiz
•
Professional Development
11 questions
Google Calendar, Sites, and Keep
Quiz
•
Professional Development
10 questions
Drawing and detail sheets
Quiz
•
Professional Development
15 questions
A test of CALL (computer assisted language learning )
Quiz
•
University - Professi...
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 Instructional Technology
26 questions
Christmas Movie Trivia
Lesson
•
8th Grade - Professio...
25 questions
Christmas Movies
Quiz
•
Professional Development
20 questions
Christmas Trivia
Quiz
•
Professional Development
15 questions
Fun Holiday Trivia
Quiz
•
Professional Development
25 questions
Name That Tune - Christmas
Quiz
•
Professional Development
29 questions
Christmas Song Emoji Pictionary
Quiz
•
Professional Development
9 questions
Holiday Movie Trivia
Lesson
•
Professional Development
34 questions
Winter Trivia
Quiz
•
Professional Development