Where to Declare Variables in C# and JavaScript
Both JavaScript and C# belong to the C family of languages. They share curly braces and semi-colons, and in fact there are many cases where the exact same code will execute (correctly, in most cases) as either language.