CodesJava

Easy learning with example program codes

typescript parameterized function tutorial


A TypeScript function is a group of statements which is used for performing a specific task. It provides the facility of code re-usability.

Typescript parameterized function syntax:

function function_name( param1:datatype, ( param2:datatype) {   
}

Typescript Parameterized Function Example:

function paramTest(rollNo:number,name:string) { 
   console.log(rollNo);
   console.log(name);
} 
paramTest(645,"Jai");

Try it:

JS Bin on jsbin.com
 

Please follow and like us:


Copyright © 2019 CodesJava DMCA.com Protection Status SiteMap Reference: Java Wiki