TypeScript Functions Quiz

TypeScript Functions Quiz

Professional Development

10 Qs

quiz-placeholder

Similar activities

Zoom Cafe EP4

Zoom Cafe EP4

Professional Development

13 Qs

Python 1: Datos_Operadores

Python 1: Datos_Operadores

Professional Development

10 Qs

Funciones

Funciones

Professional Development

12 Qs

JS Basic

JS Basic

Professional Development

10 Qs

Table and Data Types - 3

Table and Data Types - 3

Professional Development

6 Qs

C# TOPIC NEW-2

C# TOPIC NEW-2

Professional Development

15 Qs

Webinar Series 12 : Membangun Aplikasi Web Modern

Webinar Series 12 : Membangun Aplikasi Web Modern

Professional Development

10 Qs

Family_test

Family_test

Professional Development

12 Qs

TypeScript Functions Quiz

TypeScript Functions Quiz

Assessment

Quiz

Instructional Technology

Professional Development

Hard

Created by

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

Create resources
Host any resource
Get auto-graded reports
or continue with
Microsoft
Apple
Others
By signing up, you agree to our Terms of Service & Privacy Policy
Already have an account?