JSFiddle - React, Tailwind, and code Playground

by Pharaon

JavaScript

var input = [
	'one',
	'two'
];

for(var i in input){
	if(typeof input[i+1] === "undefined"){
		console.log("i is last");
	}
}