JSFiddle - React, Tailwind, and code Playground

JavaScript

var array = [0, 1, 2];

alert(array.reverse().join(','));