0

I'm trying to get a lowercase value of each key in said object.

for (each in {'foo':'bar','bar':'foo'}) {
    console.log(typeof each, each.toLowercase());
}

The error I get is Object foo has no method 'toLowercase', yet typeof each returns 'string'

Tgwizman
  • 1,469
  • 2
  • 19
  • 34
  • 2
    https://developer.mozilla.org/en-US/docs/JavaScript/Reference/Global_Objects/String/toLowerCase – Ian Apr 25 '13 at 03:53

1 Answers1

9

It's toLowerCase() with a capital "C".

nnnnnn
  • 147,572
  • 30
  • 200
  • 241