Quiz
Quiz: TypeScript. Basic Types and Variable Declarations.
This quiz has question types that open in the usual player.
Questions in this quiz (5)
1Please select correct basic types that are available in TypeScript:
- Anumber, null, binary, string, boolean
- Bstring, boolean, enum, null, never
- Cboolean, char, string, number
- Dboolean, number, int, enum, void
2Please select correct TypeScript variable declarations. Choose all that apply.
- Ax = "My String";
- Blet z = "My String";
- Clet a: string = "My String";
- Dlet myAge: int = 25;
- Elet c as string = "My String";
- Flet b = ("My String" as string);
3let variable declaration is accessible anywhere within their containing function, module, namespace, or global scope.
- ATrue
- BFalse
4Please use drag and drop to make sure that variable sentence contains the following string: "Hello, my name is Joe Bloggs. I'm 44 years old."
let myName = "Joe Bloggs";
let myAge: number = 44;
let sentence: string = `Hello, my name is [blank_start]${myName}[blank_end]. I'm [blank_start]${myAge}[blank_end] years old.`;- A{myName}
- B{$myName}
- C${myName}
- D$myName
- E$myAge.toString()
- F${myAge}
- G{$myAge.toString()}
- H{$myAge}
5The following code will output in the console:
enum make { Audi = 100, BMW = 200, Citroen=300, Ford, Holden, Hyundai, Jaguar, Kia, Lada }
let myCarMake: make = make.Ford;
console.info(myCarMake.toString());- AFord
- B400
- C301
- Dsyntax error
Information
- Description
- User has deleted their subject information Quiz on Quiz: TypeScript. Basic Types and Variable Declarations., created by Deleted user on 25/04/2017.
- Author
- Deleted user
- Language
- English
- Views
- 56
- Tags