SyntaxFix
Write A Post
Hire A Developer
Questions
you can simply use this:
var tmp = ['a', 'b']; index = 3 ; if( tmp[index]){ console.log(tmp[index] + '\n'); }else{ console.log(' does not exist'); }