activa's blog

.NET, Web, Mobile and more stuff I can't stop talking about

Browsing Posts in Javascript

A simple way to create java-like classes in Javascript.

Handling dates in JSON responses is something many web developers struggle with. The JSON Specification doesn’t specify how dates should be represented in a JSON string, so every implementation invented its own way of representing dates. These are some of the formats in use today: {“date”: new Date(ms_since_epoch) } {“date”: Date(ms_since_epoch) } {“date”: “Date(ms_since_epoch) } [...]

Read till the end, because nothing is what it seems What is equality? Equality means different things in different programming languages. In most modern languages (C# for example), you can define your own terms of what equality means. In others you can’t. Take javascript for example. There are actually two kinds of equality: normal equality [...]