JSFiddle - React, Tailwind, and code Playground

by Emily Humphrey

JavaScript

// Amused this actually works.

var type = ["air", "land", "sea", "walk"];

for(var i in type){
	var speed = type[i] === "air" ? 4 : type[i] === "land" ? 1 : type[i] === "sea" ? .8 : .1;
  console.log(speed);
}