Hacker Newsnew | past | comments | ask | show | jobs | submitlogin

Try to use additional single quotes:

  var x = [];
  x['3'] = 3;
  x['"3"'] = "three";	    
  alert(x);


Consider applying for YC's Fall 2026 batch! Applications are open till July 27.

Guidelines | FAQ | Lists | API | Security | Legal | Apply to YC | Contact

Search: