Skip to content
This repository
Browse code

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

Signed-off-by: DTrejo <david.daniel.trejo@gmail.com>
  • Loading branch information...
commit 7581648ed473f0b0d38cee5b979793598484e93b 1 parent a9b233c
manekinekko manekinekko authored DTrejo committed

Showing 2 changed files with 21 additions and 2 deletions. Show diff stats Hide diff stats

  1. +2 2 package.json
  2. +19 0 posts/2013-02-13-unicode-vars.md
4 package.json
... ... @@ -1,7 +1,7 @@
1 1 {
2 2 "name": "wtf",
3 3 "description": "The wtfs of javascript at wtfjs.com",
4   - "version": "0.2.0-24",
  4 + "version": "0.2.0-27",
5 5 "homepage": "wtfjs.com",
6 6 "repository": {
7 7 "type": "git",
@@ -29,4 +29,4 @@
29 29 "wtfjs.com",
30 30 "www.wtfjs.com"
31 31 ]
32   -}
  32 +}
19 posts/2013-02-13-unicode-vars.md
Source Rendered
... ... @@ -0,0 +1,19 @@
  1 +ECMAScript allows you to use unicode variable names, just use the usual \uXXXX codes:
  2 +
  3 +```
  4 +var \u1000 = {
  5 + \u1001: 'foo',
  6 + \u1011: 'bar'
  7 +};
  8 +
  9 +console.log( \u1000.\u1001 ); // prints 'foo'
  10 +console.log( \u1000.\u1011 ); // prints 'bar'
  11 +
  12 +```
  13 +
  14 +WTF right?
  15 +
  16 +
  17 +By [@manekinekko][1]
  18 +
  19 +[1]:https://twitter.com/manekinekko

0 comments on commit 7581648

Please sign in to comment.
Something went wrong with that request. Please try again.