Quiz 1

Quiz 1

University

26 Qs

quiz-placeholder

Similar activities

IBP CAT 2 DICT21S

IBP CAT 2 DICT21S

University

24 Qs

CS201 Web Development (02022022)

CS201 Web Development (02022022)

University

25 Qs

Segurança em PHP

Segurança em PHP

10th Grade - University

22 Qs

Thinking in HTML

Thinking in HTML

University

30 Qs

Tech 1273 Retrieval Activities

Tech 1273 Retrieval Activities

University

21 Qs

IAW_2AS3_PHP_1

IAW_2AS3_PHP_1

1st Grade - University

23 Qs

RETO 1 PRIMERA EVALUACIÓN

RETO 1 PRIMERA EVALUACIÓN

University

25 Qs

Code Quiz

Code Quiz

KG - University

21 Qs

Quiz 1

Quiz 1

Assessment

Quiz

Computers

University

Hard

Created by

Abhishek Chaudhari

FREE Resource

26 questions

Show all answers

1.

MULTIPLE CHOICE QUESTION

45 sec • 1 pt

What is the difference between interface and abstract class in TypeScript inheritance?

Interfaces define structure, abstract classes define behavior and partial structure.

Both define structure, but interfaces cannot have implementations.

Both define behavior, but interfaces cannot be instantiated.

2.

MULTIPLE CHOICE QUESTION

30 sec • 1 pt

Which component in TypeScript compiles .ts files into .js files?

TypeScript Parser

TypeScript Compiler

JavaScript Engine

TypeScript Module

3.

MULTIPLE CHOICE QUESTION

30 sec • 1 pt

Which keyword is used to declare a block-scoped variable in TypeScript?

var

let

const

Both b and c

4.

MULTIPLE CHOICE QUESTION

30 sec • 1 pt

How do you import a module in TypeScript?

import { myModule } from './myModule';

require('./myModule');

load('./myModule');

fetch('./myModule');

5.

MULTIPLE CHOICE QUESTION

30 sec • 1 pt

Which operator is not allowed in TypeScript because of strict type checking?

==

===

!==

All are allowed

6.

MULTIPLE CHOICE QUESTION

30 sec • 1 pt

What is the primary advantage of TypeScript over JavaScript?

Faster execution time

Enhanced type safety during development

More concise syntax

Built-in support for browser execution

7.

MULTIPLE CHOICE QUESTION

30 sec • 1 pt

What is the correct syntax for defining a named function in TypeScript?

function myFunction() {}

let myFunction = () => {}

const myFunction = function() {}

All of the above

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?