Typescript Quiz Preparation Part 4

Welcome to your Typescript Quiz Preparation Part 4

Name
Email
What is a const enum in TypeScript?

What is the correct way to reverse an array arr in TypeScript?

How do you access the Green value from the Color enum?

How do you define an enum Color with values Red, Green, and Blue in TypeScript?

How do you find the length of an array elements in TypeScript?

What does the map method do to an array numbers in TypeScript?

Which of the following correctly declares an array of boolean values?

Which of the following is the correct way to cast a variable value of type any to type boolean?

What is the main benefit of using const enums?

What is explicit casting in TypeScript?

How do you define a numeric enum Days with values Sunday, Monday, and Tuesday starting from 0 in TypeScript?

How do you remove the last element from an array values in TypeScript?

What is the output of the following code? let names: string[] = ['Alice', 'Bob', 'Charlie']; names.splice(1, 1); console.log(names);

What is the default numeric value of Green in the following enum? enum Color { Red, Green, Blue }

Which of the following correctly defines an enum Status with values Active, Inactive, and Pending?

This Post Has 7 Comments

  1. Areeba

    Thank you so much making quiz for us.

  2. Maryam Ali Asghar

    Thanks for this quizz.

  3. Rahat Bano

    Very Helpful. You are such a great teacher

  4. Bushra afaq

    Its good to know about some topics in type script Keep.it up…

  5. Ainy

    Thankx superb quiz 4 our preparation

  6. Hina Nisar

    Amazing quiz the best option is that retake for best practice. Thank you for sharing.

Leave a Reply