<!DOCTYPE html>
<html lang="en">
<head>
<meta charset="UTF-8">
<title>JavaScript for in array assign (to left expr)</title>
</head>
<body>
<script type="text/javascript">
// Press F12 - View result on Console Panel
var arr = ['a','b','c'];
var i = 0, arr_key = [];
for (arr_key[i++] in arr);
console.log(arr_key); // returns ["0", "1", "2"]
</script>
</body>
</html>