0% found this document useful (0 votes)
44 views4 pages

TypeScript Course Completion Results

The summary shows the results of a TypeScript exam on Platzi where the person scored 9.33 and answered 14 out of 15 questions correctly. They passed the TypeScript fundamentals course and can access their digital diploma.

Translated by

ScribdTranslations
Copyright
© All Rights Reserved
We take content rights seriously. If you suspect this is your content, claim it here.
Available Formats
Download as PDF, TXT or read online on Scribd
0% found this document useful (0 votes)
44 views4 pages

TypeScript Course Completion Results

The summary shows the results of a TypeScript exam on Platzi where the person scored 9.33 and answered 14 out of 15 questions correctly. They passed the TypeScript fundamentals course and can access their digital diploma.

Translated by

ScribdTranslations
Copyright
© All Rights Reserved
We take content rights seriously. If you suspect this is your content, claim it here.
Available Formats
Download as PDF, TXT or read online on Scribd

7/9/22 Invalid input. URL cannot be translated.

22.350 pts

Fundamentals of TypeScript Course

You passed the course.


Congratulations, you can now access yourdigital diploma

9.33 14/15
Hits
Qualification

1. What is the command to enable TypeScript code analysis in a


JavaScript file?

@ts-check

2. What is the correct option to tell the TS compiler the version of JavaScript to use?
which must be transpiled?

npx tsc src/** --target es6

3. If this variable is defined let myProductPrice = 100; what type does TS infer?

number

Unable to access or translate content from external links. 1/4


7/9/22 The provided text is a URL and does not contain any translatable content.

4. What is the correct way to define a hexadecimal in TS?

let hex = 0xfff;

5. A practical test is to define a variable with a boolean value like this: const
myBoolean: Boolean = true;

No, since the boolean with uppercase should be avoided.

6. Taking into account this instruction `const rta = 1 + '1';` what would be the data type that
Does TS infer from the response?

string

7. What would be the correct way to define an array that only supports numbers and
booleans?

let mixed: (number | boolean )[];

8. What would be the correct way to define a variable that only supports numbers and
strings?

let myVar: number | string;

9. Considering this code: `type Sizes = 'S' | 'M' | 'L' |'XL'; let shirtSize: Sizes;`
Is the value assigned to shirtSize valid?

FALSE

The provided text is a URL and does not contain translatable content. 2/4
7/9/22, 21:24 Unable to access the provided URL to retrieve content for translation.

10. What is the correct way to define an optional parameter in


a function?

function sum(a?: number) {}

11. If I want to declare a function that has no return, which of the following words
Would you use TS reserved?

void

12. Which of these forms is the correct way to define an object as parameters of
a function?

The provided text does not contain translatable content. REVIEW CLASS
}

13. What is the correct way to create your own type to define the attributes of a
Product?

type Product = { title: string, createAt: Date, stock: number, shirtSize?: Sizes };

14. When there are libraries that do not have type support, for example in the case of lodash.
we can add support for types using the command...

npm install @types/lodash --save-dev

15. What is the correct typing to create a variable that supports strings and null?

Invalid input. Please provide a text to translate. 3/4


7/9/22, 21:24 Unable to access or translate URL content.

let myName: (string | null) = null;

RETURN

Invalid input, please provide a text to translate. 4/4

You might also like