C# like functions in JavaScript.