JSFiddle - React, Tailwind, and code Playground
HTML
<body>
<button onclick="showAlert()">Click me</button>
</body>
JavaScript
var book = [
{
"word" : "cuiller",
"page" : 23
},
{
"word" : "arbre ",
"page" : 245
}
];
thebook = JSON.parse(JSON.stringify(book));
window.showAlert = function() {
alert(thebook[0].word);
}