What is the definition of 'Idiomatic' as in Idiomatic Javascript?

javascript, typescript

Solution

Idiomatic here means "How people who write JavaScript write JavaScript".

It means "Natural to the native speaker".

For example, returning an object is considered by some idiomatic JavaScript:

function foo(){
    return {x:3,y:5};
}
var point = foo();

While "out parameters" are considered less idiomatic:

function foo(out){
    out.point = {x:3,y:5}
}
var out = {};
foo(out);
point = out.point;

Another example of idiomatic JavaScript is the use of closures.

Problem

In Anders first talk on TypeScript, he uses the phrase 'idiomatic javascript" several times. What is the definition of idiomatic as it is used here? I have looked this up on Wikipedia, SO search etc, but still feel I don't fully understand what the word means in this context. Greg

Original source