Posts with a category of "JavaScript"

Extension methods in JavaScript

Extension methods in .NET are one of my favourite parts of using C#. In this post, I'll show how you can achive the same thing in JavaScript by taking advantage of it's prototypal nature.

Be warned though, there are a couple of caveats that we need to be aware of though. Turns out it's quite easy to get unexpected bugs and break 3rd party libraries.

Key differences between C# and JavaScript

I find myself switching between C# and JavaScript quite a lot. Even though I've been doing that for years, there are still occassions where I get caught out by a language feature.

Here I go through a few of the key differences which have caught me out in the hope that writing about them stops it happening in the future.

If only things were that simple!

.NET LINQ Select method in JavaScript

I accidentally typed out a couple of .NET LINQ statements while writing JavaScript and drew a blank on the equivalent method names.

In the hope of not forgetting again, here I dig into the equivalent of the .NET LINQ Select method in JavaScript. They're not identical, but I think for most people the differences won't matter.

All categories