JSFiddle - React, Tailwind, and code Playground

by James Allardice

HTML

<div a_example = "x" b_example = "y" class = "z"></div>

JavaScript

var elem = document.getElementsByClassName("z")[0],
    a = elem.getAttribute("a_example");

console.log(a);