JSFiddle - React, Tailwind, and code Playground

by shtrih

HTML

<ul class="all"></ul>
<hr />
<ul class="chain"></ul>

JavaScript

var entities = [
	{
		left: 'Exalted Orb',
		right: 'Orb of Fusing',
		coeff: 8,
		coeffInv: 10,
	},
	{
		left: 'Exalted Orb',
		right: 'Chaos Orb',
		coeff: 4,
		coeffInv: 6
	},
	{
		left: 'Chaos Orb',
		right: 'Orb of Fusing',
		coeff: 2,
		coeffInv: 4
	},
];

function all(entities) {
	var $all = $('.all');
	
	for (var i = 0; i < entities.length; i++) {
		$all.append(
			$('<li/>', {
				text: `1×${entities[i].left} ➡ ${entities[i].coeff}×${entities[i].right} ||| 1×${entities[i].left} ➡ ${entities[i].coeffInv}×${entities[i].right}`
			})
		);
		/* $all.append(
			$('<li/>', {
				text: `1×${entities[i].right} ➡ ${(1 / entities[i].coeffInv).toFixed(2)}×${entities[i].left}`
			})
		); */
	}
}

function chain(entities, start, result = [], maxLength = 0) {
	for (var i = 0; i < entities.length; i++) {
		for (var j = 0; j < entities.length; j++) {
			if (i === j) {
				continue;
			}
			
			
		}
	}
}

all(entities);