Skip to content

Instantly share code, notes, and snippets.

@KFlash
Created May 7, 2020 01:55
Show Gist options
  • Save KFlash/6dfb43ac56e506def4c2c51b150680f8 to your computer and use it in GitHub Desktop.
Save KFlash/6dfb43ac56e506def4c2c51b150680f8 to your computer and use it in GitHub Desktop.
letvarconst
let a = b;
==========
{
"type": "Script",
"directives": [],
"items": [
{
"type": "LexicalDeclaration",
"kind": "let",
"declarators": [
{
"type": "LexicalBinding",
"binding": {
"type": "BindingIdentifier",
"name": "a"
},
"initializer": {
"type": "IdentifierReference",
"name": "b"
}
}
]
}
]
}
var a = b;
=========
{
"type": "Script",
"directives": [],
"items": [
{
"type": "VariableStatement",
"declarators": [
{
"type": "VariableDeclaration",
"binding": {
"type": "BindingIdentifier",
"name": "a"
},
"initializer": {
"type": "IdentifierReference",
"name": "b"
}
}
]
}
]
}
const [] = {};
==============
{
"type": "Script",
"directives": [],
"items": [
{
"type": "LexicalDeclaration",
"kind": "const",
"declarators": [
{
"type": "LexicalBinding",
"binding": {
"type": "ArrayBindingPattern",
"elements": []
},
"initializer": {
"type": "ObjectLiteral",
"properties": []
}
}
]
}
]
}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment