summaryrefslogtreecommitdiff
path: root/Base/home/anon/js
diff options
context:
space:
mode:
author0xtechnobabble <0xtechnobabble@protonmail.com>2020-03-21 02:29:00 +0200
committerAndreas Kling <kling@serenityos.org>2020-03-21 10:08:58 +0100
commitbc002f807a122bcd91498f87b970671a2d38bbb8 (patch)
treef7ddcffa5176469821647dde1d2f33f2238a4330 /Base/home/anon/js
parentc64b5e73f5d78b887c9e9358bccc1524858dbc6f (diff)
downloadserenity-bc002f807a122bcd91498f87b970671a2d38bbb8.zip
LibJS: Parse object expressions
Diffstat (limited to 'Base/home/anon/js')
-rw-r--r--Base/home/anon/js/object-expression.js7
1 files changed, 7 insertions, 0 deletions
diff --git a/Base/home/anon/js/object-expression.js b/Base/home/anon/js/object-expression.js
new file mode 100644
index 0000000000..58449a2c0a
--- /dev/null
+++ b/Base/home/anon/js/object-expression.js
@@ -0,0 +1,7 @@
+const a = 1;
+const object = {a, b: 2};
+const emptyObject = {};
+
+console.log(object.a);
+console.log(object.b);
+console.log(emptyObject.foo);