Skip to content

Instantly share code, notes, and snippets.

@JustinK
Last active August 29, 2015 14:08
Show Gist options
  • Save JustinK/2f05b4cd14010e2b41bb to your computer and use it in GitHub Desktop.
Save JustinK/2f05b4cd14010e2b41bb to your computer and use it in GitHub Desktop.
//Swift
var primate = "monkey"
var delicousTreat: String = "donut"
let plant = "pine tree"
func combineThings(thing1: String, thing2: String) -> String{
let newThing = thing1 + " " + thing2
return newThing
}
combineThings(primate, deliciousTreat)
//returns "monkey donut"
//C#
var primate = "monkey";
string delicousTreat = "donut";
const plant = "pine tree";
string combineThings(string thing1, string thing2)
{
var newThing = thing1 + " " + thing2;
return newThing;
}
combineThings(primate, delicousTreat);
//returns "monkey donut"
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment