Google News
logo
TypeScript - Quiz(MCQ)
A)
strongly typed
B)
object oriented
C)
compiled language
D)
All of the above

Correct Answer :   All of the above


Explanation : TypeScript is a strongly typed, object oriented, compiled language. It was designed by Anders Hejlsberg (designer of C#) at Microsoft.

A)
Apple
B)
IBM
C)
Microsoft
D)
Google

Correct Answer :   Microsoft


Explanation :

TypeScript is a programming language developed and maintained by Microsoft Technical Fellow Steve Lucco. It is a strict syntactical superset of JavaScript and adds optional static typing to the language. It is designed for the development of large applications and transpiles to JavaScript. As it is a superset of JavaScript, existing JavaScript programs are also valid TypeScript programs.
 
TypeScript may be used to develop JavaScript applications for both client-side and server-side execution (as with Node.js or Deno). Multiple options are available for transpilation. The default TypeScript Compiler can be used, or the Babel compiler can be invoked to convert TypeScript to JavaScript.
 

A)
October 2011
B)
October 2012
C)
October 2013
D)
October 2014

Correct Answer :   October 2012


Explanation : TypeScript was first made public in October 2012 (at version 0.8), after two years of internal development at Microsoft.

A)
True
B)
False
C)
--
D)
--

Correct Answer :   False

A)
noImplicitAny
B)
noAutoType
C)
Implicit = FALSE
D)
autoTypeAssignment = FALSE

Correct Answer :   noImplicitAny

A)
noAutoType
B)
noFalseyInits
C)
strictChecksRequired
D)
strictNullChecks

Correct Answer :   strictNullChecks

A)
TypeScript is portable
B)
TypeScript is just JavaScript
C)
TypeScript supports other JS libraries
D)
All of the above

Correct Answer :   All of the above


Explanation : All of the above are the Features of TypeScript.

A)
.d.tp
B)
.d.td
C)
.d.ts
D)
.d.ty

Correct Answer :   .d.ts


Explanation : TypeScript Definition file (with .d.ts extension) provides definition for external JavaScript libraries.

A)
True
B)
False
C)
Can be true or false
D)
None of the above

Correct Answer :   True


Explanation : TypeScript supports Object Oriented Programming concepts like classes, interfaces, inheritance.

A)
never
B)
similar
C)
unknown
D)
--

Correct Answer :   unknown

A)
any[]
B)
string[]
C)
string
D)
unknown[]

Correct Answer :   string[]

A)
Makes you read it for better clean code
B)
Allows only adding but not deleting elements in the array
C)
Makes it private and can only be used in the file its created
D)
Allows no changes and is there simply to be read from and not modified

Correct Answer :   Allows no changes and is there simply to be read from and not modified

A)
True
B)
False
C)
--
D)
--

Correct Answer :   False

A)
3
B)
4
C)
5
D)
6

Correct Answer :   3


Explanation : At its heart, TypeScript has the following three components : Language, The TypeScript Compiler and The TypeScript Language Service.

A)
Case-sensitive
B)
Case-insensitive
C)
depends on typescript version
D)
None of the above

Correct Answer :   Case-sensitive


Explanation : TypeScript is case-sensitive. This means that TypeScript differentiates between uppercase and lowercase characters.

A)
1
B)
2
C)
3
D)
4

Correct Answer :   2


Explanation : TypeScript supports the following types of comments : Single-line comments And Multi-line comments.

A)
True
B)
False
C)
--
D)
--

Correct Answer :   False

A)
const ourTuple = [101]
B)
const ourTuple = ['Coding God', 101]
C)
const ourTuple = [101, 101, 'Coding God', 'Coding God']
D)
const ourTuple = [101, 'Coding God']

Correct Answer :   const ourTuple = [101, 'Coding God']

A)
Strings
B)
Booleans
C)
Numbers
D)
None of the above

Correct Answer :   Strings

A)
True
B)
False
C)
--
D)
--

Correct Answer :   True

A)
Idolizing
B)
Improving
C)
Extending
D)
Duplicating

Correct Answer :   Extending

A)
String and Boolean
B)
String and Number
C)
Number and Boolean
D)
Number and Number Array

Correct Answer :   String and Number

A)
0
B)
1
C)
5
D)
10

Correct Answer :   0

A)
True
B)
False
C)
--
D)
--

Correct Answer :   True

A)
1
B)
2
C)
3
D)
4

Correct Answer :   3

A)
method
B)
function
C)
constructor
D)
class

Correct Answer :   class


Explanation : A class in terms of OOP is a blueprint for creating objects. A class encapsulates data for the object.

A)
a superset of TypeScript
B)
the official name of TypeScript
C)
a project whose goal is to make types dynamic
D)
a project that provides a central repository of TypeScript definitions for NPM packages which do not have types

Correct Answer :   a project that provides a central repository of TypeScript definitions for NPM packages which do not have types

A)
string
B)
string | undefined
C)
string | null
D)
unknown

Correct Answer :   string | undefined

A)
void
B)
any
C)
any[]
D)
unknown

Correct Answer :   void

A)
type
B)
mocking
C)
visibility
D)
inheritance

Correct Answer :   visibility

A)
True
B)
False
C)
--
D)
--

Correct Answer :   False

A)
True
B)
False
C)
--
D)
--

Correct Answer :   True

A)
Yes
B)
No
C)
Can be yes or no
D)
None of the above

Correct Answer :   Yes

A)
Overload
B)
Inheriting
C)
Extending
D)
Override

Correct Answer :   Override

A)
Boolean var bValue: boolean = false
B)
Number var age: number = 16
C)
String var name: string = "jon"
D)
All of the above

Correct Answer :   All of the above

A)
Object, Array, Symbol
B)
Array, Object, Boolean
C)
Boolean, Number, String
D)
Object, String, Number

Correct Answer :   Boolean, Number, String

A)
Implicit
B)
Explicit
C)
Both (A) and (B)
D)
None of the Above

Correct Answer :   Explicit

A)
The react mode will emit React.addElement
B)
The output of react mode will have a .jsx file extension
C)
These modes only affect the emit stage - type checking is unaffected
D)
The preserve mode will keep the JSX as part of the output to be further consumed by another transform step

Correct Answer :   The preserve mode will keep the JSX as part of the output to be further consumed by another transform step

A)
A variable name should contain alphabets and numeric digits
B)
A variable name cannot begin with a digit
C)
It cannot contain spaces and special characters except underscore (_) and dollar ($) sign
D)
All of the above

Correct Answer :   All of the above