A RetroSearch Logo

Home - News ( United States | United Kingdom | Italy | Germany ) - Football scores

Search Query:

Showing content from https://www.geeksforgeeks.org/quizzes/typescript-functions-quiz/ below:

Quiz about TypeScript Functions Quiz

Which of the following is the correct way to declare a function type in TypeScript?

What does the function keyword represent in TypeScript?

Which of the following is the correct signature for a function that accepts two parameters of type string and returns a boolean?

What is function overloading in TypeScript?

In function overloading, which of the following is true?

Which of the following correctly demonstrates function overloading in TypeScript?

What is the result of the following TypeScript code?

JavaScript
function add(x: number, y: number): number;
function add(x: string, y: string): string;
function add(x: any, y: any): any {
    return x + y;
}
console.log(add(5, 10));

Which of the following is the correct way to cast a string to a number in TypeScript?

How does type assertion work in TypeScript when casting?

Consider the following code in TypeScript. What is the result when the function sum() is called with two string arguments?

JavaScript
function sum(a: number, b: number): number;
function sum(a: string, b: string): string;
function sum(a: any, b: any): any {
    return a + b;
}
console.log(sum("Hello", "World"));

There are 10 questions to complete.

Take a part in the ongoing discussion


RetroSearch is an open source project built by @garambo | Open a GitHub Issue

Search and Browse the WWW like it's 1997 | Search results from DuckDuckGo

HTML: 3.2 | Encoding: UTF-8 | Version: 0.7.4