TypeScript

Typescript In Hindi – First Program

TypeScript
Loading...

Typescript In HindiFirst Program -Aaj Hum Iss Section Me Ye Padhenge Ki Typescript Me Program Ko Kaise Likh Sakte Hai, Kaise Isko Compile Karte Hai, Kaise Isko Run Kar Sakte Hai.

Chaliye Aaj Hum Ek PRogram Ko Text-Editor ME Likhte Hai , Compile Karte Hai, Run Karte Hai Or Console Pe Output Ko Display Karwayenge.

Yadi Aapne  HTML Full Course  And CSS Full Course And Python Full Course And PHP Full Course Nhi Read Kiya Hai To Aap Vah Bhi Read Kar Sakte Hai |

First Program in TypeScript in Hindi

function greeter(person) {  
	return "Hello, " + person; 
}
let user = 'masterprograming'; 
console.log(greeter(user)); 

Output:

Hello masterprograming

Uppar Likhe Gaye File Ko “.ts” extension Ke Sath Save Kar Dijiye.

Ab Apne System Me Command Prompt Ko Open Kijiye, Uss Wali Directory Me Path Set Kar Dijiye Jaha Par Aapne Iss Code File Ko Save Kiya Hai.Ab Compile Karne Ke Liye Aap Iss Command Ko Type Kar Dijiye tsc filename.ts Or Uske Baad Enter Press Kre.

Iske Badd Usi Directory Location Par Ek Javascript File Create Hogi Jiska Extension  “.js” Hoga.Ab Iss javascript File Ko Run Karne Ke Liye Aap Iss Command node filename.js ko Type Kijiye Or Enter Press Kar Dijiye.iske Baad Final Output Ko Console Screen Par Dekh Sakte Hai.

Also Read – TypeScript Vs JavaScript

Typescript: Compile-Time Error In Hindi

Typescript Hmesa Compile Time Par Error Deta Hai.Iske Lie Hame TS Me Code Likhna Padega Or Compile Karna Padega , Uske Baad Hum Yadi Koi Error Hai To Hum Usko Find Kar Sakte Hai.

Text Editor Ko Open Kare Or Iss Code Ko Waha Likhe-

function addNumbers(a, b) {  
    return a + b;  
}  
var sum = addNumbers("MasterPrograming", 25);  
console.log('Sum of the numbers is: ' + sum);  

Ab Iss File Ko “.ts” File Extension Ke Sath Save Kar Dijiye.Ab Iss TS File Ko Iss Command tsc filename.ts Ke Sath Compile Kar Dijiye,Agar yaha Par Koi Error hoga To Aapko Console Par Error Display Ho Jaayga Or Ye File Successfully Run Nahi Hogi.

Also Read This Post :

Friends mujhe ummed hai ki aap  TypeScript in Hindi  ko acchi tarah se samanj gye honge agar aap ko ye post acchi lage to mere is website ko jarur follow kre |

Leave a Reply

Your email address will not be published.