Menu ---
  • Home
  • Projects
  • About

afshin.

Tag: objects

Using `object` as the keys of another `object` in JavaScript

In ProgrammingTags javascript, objectsMay 12, 2015Leave a comment afshin

Sometimes you need to use objects for the keys of a dictionary (let’s say, another object). Assume this code: var keys = ; var dic = {}; //add a new key to the dictionary dic] = 'boo'; dic] = 'foo'; Above code yields this result: console.log(dic); //Object {: "foo"} …

Continue Reading

Site Footer

Categories

  • Database (4)
  • Hack (1)
  • Math (1)
  • Programming (15)
  • Publishing (1)

Recent Posts

  • Character density using Haskell
  • How to fix "Library not loaded: libmysqlclient.18.dylib" in Mac OS X
  • Optimized solution to calculate first powers of 2
  • MongoDB Aggregation

Archives

Copyright (c) 2013, 2014, 2015, 2016 Afshin Mehrabani.