Esprima is a good library for parse, analyse for multi-purpose javascript code. But I am not understand loc
and range
in esprima. In the website, they said that:
loc
Nodes have line and column-based location info.range
Nodes have an index-based location range (array)
I used example code to understand what it is.
var x = 42;
console.log(1);
And the result is :
"range": [
0,
27
],
Could you help me to understand range
meaning.
Thanks and regards,