Angular and Typescript Quiz - 3
|
Total Questions : 28
|
« 1 2 3 4 »
1. What are the components of TypeScript?
a) TypeScript Language
b) TypeScript Compiler
c) TypeScript Language Service
d) All of these
Wrong! Try again.
Wrong Again!Try one more chance.
Wrong! The correct answer is d) All of these are components of TypeScript
Correct! All of these are components of TypeScript
2. typescript provides type checking at
a) compile time
b) load time
c) run time
d) none of above
Wrong! Try again.
Wrong Again! Try one more chance.
Wrong! The correct answer is a) compile time
Correct! compile time
3. It is possible to combine multiple ts files in one js file
a) True
b) False
Wrong! Try again.
Wrong Again! Try one more chance.
Wrong! The correct answer is a) True
Correct! True
4. TypeScript default access to class members is private
a) True
b) False
Wrong! Try again.
Wrong Again! Try one more chance.
Wrong! The correct answer is b) false
Correct! false
5. What is the output?
class MyClass {
let a=12;
}
var obj=new MyClass();
console.log("Value of a="+a);
a) a is private and cannot be accessed
b) Error as variable a is block scope
c) Value of a =12
d) None of above
Wrong! Try again
Wrong Again! Try one more chance.
Wrong! The correct answer is b) Error as variable a is in block scope
Correct! Error as variable a is in block scope
6. Typescript is ......... of JavaScript
a) superset
b) subset
c) Both of above
d) Both of above
Wrong! Try again.
Wrong Again! Try one more chance.
Wrong! The correct answer is a) superset
Correct!
superset
7. Which of the following is a valid typescript statement?
a) var a:string ="hello";
b) var string a="hello";
c) string a="hello";
d) var a="hello" : string
Wrong! Try again.
Wrong Again! Try one more chance.
Wrong! The correct answer is a) var a:string ="hello";
Correct! var a:string ="hello";
|