JSFiddle - React, Tailwind, and code Playground
HTML
<button
data-confirm-text="Are you really sure you want to submit?"
data-math="true"
data-operators='[ "+", "-", "*" ]'
data-retries="3"
data-options='{ "debug": true }'>
Submit with Confirmation</button>
JavaScript
var button = $( "button" );
console.log( button.data( "confirmText" ) === "Are you really sure you want to submit?" );
console.log( button.data( "math" ) === true );
console.log( button.data( "operators" ).length === 3 );
console.log( button.data( "retries" ) === 3 );
console.log( button.data( "options" ).debug === true );