TypeScript Quiz TypeScript Quiz 1 / 28What is TypeScript? A type of JavaScript library A superset of JavaScript A new programming language A CSS preprocessor 2 / 28Which of the following is the correct way to declare a variable in TypeScript? let myVar: number = 10; let myVar: "number" = 10; let myVar => number = 10; myVar = 10 :number; 3 / 28How do you define an interface in TypeScript? interface Person { name: string; age: number; } type Person { name: string; age: number; } class Person { name: string; age: number; } struct Person { name: string; age: number; } 4 / 28Which keyword is used to specify that a class implements an interface? uses inherits implements extends 5 / 28What is the purpose of the readonly modifier in TypeScript? To declare a variable that cannot be changed To create a variable that is only accessible within its class To ensure a variable is not null To make a variable accessible only within a specific module 6 / 28Which of the following types is not a basic type in TypeScript? string boolean number tuple 7 / 28How do you specify an optional property in an interface? property?: type property: type? property: type = null property: ?type 8 / 28Which of the following statements is true about TypeScript? TypeScript code cannot be run directly in the browser TypeScript is not backward compatible with JavaScript TypeScript does not support ES6 features TypeScript does not allow dynamic typing 9 / 28What is the output type of the following function in TypeScript?function greet(): string { return "Hello, World!";}Click on Extem for view full code void string any null 10 / 28What is the result of 5 + '5' in JavaScript? 0 Error undefined 55 11 / 28Which function is used to print something in the console in JavaScript? log() print() console.log() display() 12 / 28What keyword is used to declare a variable in JavaScript? var let const All of the above 13 / 28What does DOM stand for in JavaScript? Document Object Model Data Object Model Dynamic Object Model Document Order Model 14 / 28What does the CSS property "transition" do? It defines a transition effect for an element's color It specifies the duration and timing function for a CSS property's transition effect It moves an element from one position to another smoothly It transforms an element's shape 15 / 28Which CSS selector targets elements based on their attribute values? Class selector ID selector Attribute selector Pseudo-class selector 16 / 28Which CSS property is used to create a shadow effect around an element? shadow-effect box-shadow element-shadow shadow-box 17 / 28What does the CSS property "display: none;" do? It hides an element without affecting the layout of the page It removes an element from the document flow and collapses the space it occupies It makes an element transparent It sets the element's display to its default value 18 / 28Which CSS property is used to control the spacing between lines of text within an element? line-height text-spacing line-spacing font-spacing 19 / 28What is the default value of the "position" property in CSS? relative absolute static fixed 20 / 28How do you comment in CSS? <!-- Comment --> /* Comment */ // Comment // Comment // 21 / 28How can you include CSS in your HTML document? Using the tag Using the tag Using the tag Using the tag 22 / 28What does the "float" property in CSS do? It makes text "float" to the top of the page It aligns elements to the center of the page It positions an element to the left or right, allowing text and inline elements to wrap around it It removes an element from the normal document flow 23 / 28Which CSS property is used to add rounded corners to an element? border-style corner-style border-radius curve-border 24 / 28What does the "box-sizing" property in CSS control? The space between elements The width and height of an element including padding and border, but not margin The width and height of an element excluding padding and border The alignment of text within an element's box 25 / 28How do you select an element with the id "example" in CSS? #example .example example id.example 26 / 28Which CSS property is used to change the text color of an element? text-color color text-style font-color 27 / 28What does CSS stand for? Cascading Style Sheets Creative Style Selector Central Style System Cascading Source Style 28 / 28What is the correct HTML tag for inserting a line break? <br> Your score isThe average score is 92% 0% Restart quiz