
TypeScript Functions Quiz

Quiz
•
Instructional Technology
•
Professional Development
•
Hard
A Lakshman
FREE Resource
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
Create a free account and access millions of resources
Similar Resources on Wayground
10 questions
Flutter_Q5

Quiz
•
Professional Development
8 questions
Day 01 - Welcome to Web Development

Quiz
•
Professional Development
5 questions
Module 1 Microsoft Excel 2013 - Intoduction to Excel

Quiz
•
Professional Development
10 questions
TLE LIVE QUIZ

Quiz
•
Professional Development
10 questions
React.js basic

Quiz
•
Professional Development
10 questions
Intro to Node.js

Quiz
•
Professional Development
11 questions
JavaScript - Introdução

Quiz
•
Professional Development
10 questions
Candidates Exam – Node.js + Vue.js

Quiz
•
Professional Development
Popular Resources on Wayground
12 questions
Unit Zero lesson 2 cafeteria

Lesson
•
9th - 12th Grade
10 questions
Nouns, nouns, nouns

Quiz
•
3rd Grade
10 questions
Lab Safety Procedures and Guidelines

Interactive video
•
6th - 10th Grade
25 questions
Multiplication Facts

Quiz
•
5th Grade
11 questions
All about me

Quiz
•
Professional Development
20 questions
Lab Safety and Equipment

Quiz
•
8th Grade
13 questions
25-26 Behavior Expectations Matrix

Quiz
•
9th - 12th Grade
10 questions
Exploring Digital Citizenship Essentials

Interactive video
•
6th - 10th Grade
Discover more resources for Instructional Technology
11 questions
All about me

Quiz
•
Professional Development
10 questions
How to Email your Teacher

Quiz
•
Professional Development
5 questions
Setting goals for the year

Quiz
•
Professional Development
14 questions
Disney Trivia

Quiz
•
Professional Development
14 questions
2019 Logos

Quiz
•
Professional Development
7 questions
How to Email your Teacher

Quiz
•
Professional Development
11 questions
NFL Football logos

Quiz
•
KG - Professional Dev...
20 questions
Employability Skills

Quiz
•
Professional Development