Skip to content

HTTPS clone URL

Subversion checkout URL

You can clone with HTTPS or Subversion.

Download ZIP
Browse files

Create 2013-02-13-unicode-vars.md

Signed-off-by: DTrejo <david.daniel.trejo@gmail.com>
  • Loading branch information...
commit 7581648ed473f0b0d38cee5b979793598484e93b 1 parent a9b233c
Wassim Chegham manekinekko authored DTrejo committed
Showing with 21 additions and 2 deletions.
  1. +2 −2 package.json
  2. +19 −0 posts/2013-02-13-unicode-vars.md
4 package.json
View
@@ -1,7 +1,7 @@
{
"name": "wtf",
"description": "The wtfs of javascript at wtfjs.com",
- "version": "0.2.0-24",
+ "version": "0.2.0-27",
"homepage": "wtfjs.com",
"repository": {
"type": "git",
@@ -29,4 +29,4 @@
"wtfjs.com",
"www.wtfjs.com"
]
-}
+}
19 posts/2013-02-13-unicode-vars.md
View
@@ -0,0 +1,19 @@
+ECMAScript allows you to use unicode variable names, just use the usual \uXXXX codes:
+
+```
+var \u1000 = {
+ \u1001: 'foo',
+ \u1011: 'bar'
+};
+
+console.log( \u1000.\u1001 ); // prints 'foo'
+console.log( \u1000.\u1011 ); // prints 'bar'
+
+```
+
+WTF right?
+
+
+By [@manekinekko][1]
+
+[1]:https://twitter.com/manekinekko
Please sign in to comment.
Something went wrong with that request. Please try again.