Browse files

add a tip

Signed-off-by: Ben Truyman <bentruyman@gmail.com>
  • Loading branch information...
1 parent c68c691 commit f0cd3128e86ab2527ecd829621840bafc4fb7233 @keeganwatkins keeganwatkins committed with Nov 11, 2011
Showing with 14 additions and 0 deletions.
  1. +14 −0 tips.js
View
14 tips.js
@@ -601,4 +601,18 @@ tips.push({
]
});
+tips.push({
+ author : 'keeganwatkins',
+ message : 'Using <em>Arrays</em> as <em>Objects</em>, and <em>vice versa</em>',
+ example : [
+ 'var confusedObject = {',
+ ' "0": "foo",',
+ ' "1": "bar"',
+ '};',
+ 'var confusedArray = [];',
+ 'confusedArray["foo"] = 0;',
+ 'confusedArray["bar"] = 1;'
+ ]
+})
+
module.exports = tips;

0 comments on commit f0cd312

Please sign in to comment.