Posts Tagged: language features

Strict Mode in JavaScript

JavaScript strict mode tells the interpreter to be more particular about what is allowed. In general terms, strict mode makes your code a little safer by turning some bad coding practices into exceptions. For existing code, this is good and bad. It’s good, because it helps you find some potential bugs, like accidental globals. It’s… Read more »

Private Variables in JavaScript

Because JavaScript uses prototype-based inheritance, there is no keyword to define a member as “private” or “protected”. Either the object has a member, or it doesn’t, and you can access that member from anywhere you can access the object. Do not despair! There is a way to implement private variables… using another feature of the… Read more »

Useful JavaScript Features You Aren’t Using

JavaScript is one of the most widely used and misunderstood programming languages in existence. Nearly every personal computer and mobile device in the world can interpret it, and nearly every developer (and non-developer) that has made a website has written it, some without knowing it! If you call yourself a JavaScript developer, then here are… Read more »