Match the TypeScript code snippets in the first column with the corresponding mistake in the second column. Identify the error in each literal type assignment.
Boolean, number, string, null, undefined and literal types
Literal types error matching
Report a typo
Match the items from left and right columns
let language: "TypeScript" = "JavaScript"; let flag: false = true; let flag: boolean = "on";let isActive: true = 'true';The literal type does not match the assigned value, despite having the same representation.
The literal type does not match the assigned boolean value.
The
boolean type does not match the assigned string value.The literal string type does not match the assigned string value.
Create a free account to access the full topic
By continuing, you agree to the JetBrains Academy Terms of Service as well as Hyperskill Terms of Service and Privacy Policy.