1. var input = document.createElement('input');
  2. input.type = "text";
  3. document.getElementById('answer-5258595').appendChild(input);
  4. var a = ['1', 2222, {x:3}, [4,6,7], ['lol', 'hui']];
  5.  
  6. for (var i = 0, len = a.length; i < len; i++) {
  7. var fn = function(index) {
  8. input.value = a[index];
  9. };
  10. fn = fn.bind(window, i);
  11. setTimeout(fn, 100 + i * 5000);
  12. }


As you can see, objects convert into '[object Object]', and arrays convert into string which consists of their elements joined by ',' (without space).