1.You can take a look at AST explorer. An online tool to explore the ASTs generated by more than 10 parsers. It is a good tool to learn AST tree of a language.
AST explorer source at Github.com.
2.Also you can paste your js code into JavaScript AST visualizer and click “show ast” button, you will see the AST visully.
demo js code:
function foo(d) {
d += 3;
return d+999
}
function bar(d) {
return d*100
}