Skip to content

Instantly share code, notes, and snippets.

@Morzanne
Created March 11, 2019 12:10
Show Gist options
  • Save Morzanne/1aef235a34105d183cc53b0a1e16cc11 to your computer and use it in GitHub Desktop.
Save Morzanne/1aef235a34105d183cc53b0a1e16cc11 to your computer and use it in GitHub Desktop.
TypeScript
function hello(name) {
console.log("Hello " + name);
}
var firstName = "bob";
hello(firstName);
hello(firstName + " marley");
function concat(a, b) {
return a + b;
}
var wcs = concat("Wild", concat(" Code", " School"));
console.log(wcs);
function hello(name :string){
console.log("Hello "+ name);
}
var firstName = "bob";
hello(firstName);
hello(firstName + " marley");
function concat(a : string, b: string){
return a +b;
}
var wcs = concat("Wild", concat(" Code", " School"));
console.log(wcs);
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment