Open In App

full | stack contest 4 | Question 16

Last Updated : 01 Feb, 2023
Improve
Improve
Like Article
Like
Save
Share
Report

What is the syntax for declaring a variable in TypeScript?
 

(A)

var x: string = “hello”;

(B)

let x: string = “hello”;

(C)

const x: string = “hello”;

(D)

x: string = “hello”;


Answer: (B)

Explanation:

Quiz of this Question
Please comment below if you find anything wrong in the above post


Like Article
Suggest improvement
Share your thoughts in the comments

Similar Reads