<script> var name=2; var test='test3'; var test3=[2,3,4]; var j= 1; var chas = name*eval(test+'[j]'); document.write(chas); </script>