Latest Deals

TypeScript - JavaScript's Superset Fresco Play MCQs Answers


Disclaimer: The main motive to provide this solution is to help and support those who are unable to do these courses due to facing some issue and having a little bit lack of knowledge. All of the material and information contained on this website is for knowledge and education purposes only.

Try to understand these solutions and solve your Hands-On problems. (Not encourage copy and paste these solutions)

TypeScript - JavaScript's Superset Fresco Play MCQs Answers


Course Path: Modern Web Development/JS LIBRARIES/TypeScript - JavaScript's Superset

All Question of the Quiz Present Below for Ease Use Ctrl + F to find the Question.


Quiz on Introduction to TypeScript


1.We can rename a .js file to .ts file generally.

  1. False
  2. True

Answer: 2)True

2.TypeScript is a __________.

  1. New version of JavaScript
  2. Compiler
  3. Dynamically type-checked language
  4. Super-set of JavaScript

Answer: 4)Super-set of JavaScript

3.A JavaScript file cannot be renamed to a TypeScript file.

  1. False
  2. True

Answer: 1)False

4.The value of TypeScript is writing _________.

  1. Safer code
  2. Less code

Answer: 1)Safer code

5.A JavaScript file cannot be renamed to a TypeScript file.

  1. False
  2. True

Answer: 1)False

6.Typescript compiler tsc converts code to _________.

  1. Assembly Language
  2. JavaScript
  3. Machine Language
  4. AngularJS

Answer: 2)JavaScript

7.TypeScript was made public by __________.

  1. Sun
  2. Microsoft
  3. Oracle
  4. ECMA

Answer: 2)Microsoft

8.TypeScript is __________.

  1. Functional
  2. Object Oriented
  3. Symbolic
  4. Procedural

Answer: 2)Object Oriented


Quiz on TypeScript Grammar


1.Static type checking is done at ________.

  1. Run time
  2. Compilation time

Answer: 2)Compilation time

2.Generics allows accepting arguments of _________.

  1. Only one type
  2. None of the options
  3. Different types

Answer: 3)Different types

3.Annotations can be implemented as __________.

  1. length: number
  2. length=12
  3. static length=12
  4. var lengthC='1'

Answer: 1)length: number

4.Which type is assigned to variables with null type?

  1. string
  2. None of the options
  3. boolean
  4. any

Answer: 2)None of the options

5.Type Annotations allow us to _______.

  1. Cast a reference of a base class to one of its derived classes
  2. Record the intended contract of the function or variable
  3. Cast to a supertype
  4. Reassign the type of data

Answer: 2)Record the intended contract of the function or variable

6.During run time, _______ checking is done.

  1. Dynamic Type
  2. Static Type

Answer: 1)Dynamic Type

7.A type system is a set of ________.

  1. Predefined Functions
  2. Data
  3. Rules
  4. Variables

Answer: 3)Rules


Quiz on Data Types


1.Generics is a/an _______.

  1. Class
  2. Object
  3. Template
  4. Functions

Answer: 3)Template

2.Which of the following is the right way of defining enum?

  1. enum Enum {}
  2. const enum DNA {}
  3. declare enum Enum {}
  4. All the options

Answer: 4)All the options


Quiz on Object Oriented Way of Approach


1.The following are correct ways of defining variables in TypeScript, except _________.

  1. var NumberOfDNA=10231
  2. var DNA:string
  3. var DNA:string= "CGATAATCGGGGAATTTCAG"
  4. var 10231

Answer: 4)var 10231

2.Inheritance is implemented by using the ________ keyword.

  1. implements
  2. extends
  3. namespace
  4. None of the options

Answer: 2)extends

3." var jarvis = function (x: number, y?: number): number {} " showcases _________.

  1. Defining Parameter
  2. Both the options
  3. Type annotation

Answer: 2)Both the options

4.Syntax for a decorator is _________.

  1. @symbol
  2. ?symbol{}
  3. *(symbol)
  4. #symbol

Answer: 1)@symbol

5.Which of the options is used appropriately in JavaScript code?

  1. function reverse(s: string) : string;
  2. function reverse (s: String) : String;

Answer: 1)function reverse(s: string) : string;

6.value && typeof value == "DataType" is used for _________.

  1. Overloading
  2. Type annotation
  3. Overriding
  4. Inheritance

Answer: 1)Overloading

7.Which of the two is used appropriately in JavaScript code:

  1. function reverse(s: string) : string;
  2. function reverse (s: String) : String;

Answer: 1)function reverse(s: string) : string;


Quiz on Inheritance & Polymorphism


1.Which keyword is used for Inheritance in TypeScript?

  1. follows
  2. extends
  3. defines
  4. implements

Answer: 2)extends

2.Which keyword is used to access base class properties?

  1. super
  2. extends
  3. base
  4. implements

Answer: 1)super

3.TypeScript uses prototypical inheritance instead of classical inheritance.

  1. True
  2. False

Answer: 2)False

4.Which of the following is/are inherited from base class?

  1. method
  2. Both the options
  3. variables

Answer: 2)Both the options

5.The code snippet " if (value && typeof value == "string") {}; is used for ______________.

  1. Parameterising
  2. Inheritance add-on
  3. Overriding
  4. Overloading

Answer: 4)Overloading


TypeScript Final Assessment


1.Accessing a class of a module from outside is impossible in TypeScript.

  1. False
  2. True

Answer: 1)False

2.How can we access a class of module from outside?

  1. namespace classToBeExported{}
  2. It is not possible in TypeScript due to safety concerns
  3. By using implements
  4. By using export

Answer: 4)By using export

3.How can we access a class from a module from outside?

  1. By using import
  2. By using export
  3. By using module
  4. By using namespace

Answer: 2)By using export

4.Why are optional parameters added?

  1. To assure that value is always assigned to the variable
  2. To avoid confusion
  3. To avoid assigning value for parameterised variable
  4. To add more than three parameters

Answer: 4)To add more than three parameters

5.What is the form associated with @expression?

  1. None of the options
  2. Constructors
  3. Module initialisation
  4. Decorators

Answer: 4)Decorators

6.The following types are supported by TypeScript, except ______.

  1. boolean
  2. enum
  3. string
  4. integer

Answer: 4)integer

7.Compiled .js of .ts containing class will also have class.

  1. False
  2. True

Answer: 1)False

8.What does " function f(l: number, w: number){} " demonstrate?

  1. Type annotation
  2. Reassigning data type
  3. Namespace
  4. Modules

Answer: 1)Type annotation

9.Contextual typing in TypeScript is a form of ___________.

  1. It does not exist
  2. Type Inference
  3. Type Checking
  4. Inheritence

Answer: 2)Type Inference

10._________ in the command line enables experimental support for decorators.

  1. "target": "ES5"
  2. "experimentalDecorators": true
  3. "compilerOptions": {}
  4. "tsc --target ES5 --experimentalDecorators"

Answer: 4)"tsc --target ES5 --experimentalDecorators"

11.During compilation time, ________ checking is done.

  1. Static type
  2. Dynamic type

Answer: 1)Static type

12.Decorators provide a way for ________________.

  1. None of the options
  2. Annotation
  3. Meta-programming syntax
  4. Both the options

Answer: 4)Both the options

13.At most, how many decorators can be applied to a declaration?

  1. Only one per declaration
  2. Three
  3. Multiple
  4. Only one in a single line

Answer: 2)Three

14.Type System is a _____________.

  1. Compiler
  2. Scripting Language
  3. Programming Language
  4. Set of rules

Answer: 4)Set of rules

15.any type is assigned to the variable in case of _____________________.

  1. not initialising nor defining the type of variable
  2. not initialising the variable
  3. "Zero" or "0" assigned to the variable
  4. null value assigned to the variable

Answer: 1)not initialising nor defining the type of variable

16.Dynamic type checking is done at __________.

  1. Compilation time
  2. Run time

Answer: 2)Run time

17.Which of the following demonstrates function overloading, if possible, in TypeScript?

  1. if (value && typeof value == "number"){}
  2. get len():string
  3. var f = 0;
  4. var a = function (n1: number, n3?: number) : number{}

Answer: 1)if (value && typeof value == "number"){}

18.Enum organizes a _______.

  1. Set of un-related values
  2. Set of related values

Answer: 2)Set of related values

19.What is true about Mixins in TypeScript?

  1. They are mixed together to form a new class
  2. They are partial classes
  3. All the options
  4. Each class is focused on a particular activity

Answer: 3)All the options

20.Which of the options is used appropriately in JavaScript code?

  1. function reverse(s: string) : string;
  2. function reverse (s: String) : String;

Answer: 2)function reverse (s: String) : String;

21.The interface of TypeScript is usually converted to JavaScript.

  1. False
  2. True

Answer: 1)False

22.TypeScript provides access to private members through ___________.

  1. finally block
  2. get and set
  3. try and catch block
  4. set only

Answer: 2)get and set

23.The optional parameter can be defined by using "?".

  1. True
  2. False

Answer: 1)True

24.During compilation, TypeScript code gets converted to assembly language.

  1. True
  2. False

Answer: 2)False

25.The following are ways to declare a variable in TypeScript, except ________.

  1. var lengthB:string
  2. var localLength=13
  3. var lengthA:string = "meter"
  4. var 2

Answer: 4)var 2

26.TypeScript is an open source programming language.

  1. True
  2. False

Answer: 1)True


If you want answers to any of the fresco play courses feel free to ask in the comment section, we will surely help.

7 Comments

Any comments and suggestion will be appreciated.

  1. Can you please provide TypeScript - JavaScript's Superset Fresco Play Hands-on solution.
    Your solutions are really very helpful to understand the concepts well. Thank you!!

    ReplyDelete
    Replies
    1. No need to do that they are just for practice purpose. Open and close each hands-on after some time pass will be reflected.

      Delete
    2. Yaa that worked!! Thank you so much!

      Delete
  2. can you please share the code for fibonacci sequence in javascript.

    ReplyDelete
  3. It is showing not passed for me after opening and closing the hands-on. Will you please upload the solution it is very helpful

    ReplyDelete
  4. I need hands on solutions for the above course(TypeScript - JavaScript's Superset Fresco Play)

    Please provide them.

    ReplyDelete
  5. can somone provide hanson solution for TypeScript - JavaScript's Superset

    ReplyDelete

Post a Comment

Any comments and suggestion will be appreciated.

Previous Post Next Post

Join Telegram Channel

Join Notes Bureau Lets Teach and Learn

Join Telegram Channel