Check out example codes for "typescript tutorial". It will help you in understanding the concepts better.

Code Example 1

var message:string = "Hello World" 
console.log(message)

Learn ReactJs, React Native from akashmittal.com