JSFiddle - React, Tailwind, and code Playground

by Michael Prosser

HTML

<button id="button">
CLICK ME
</button>

JavaScript

document.getElementById('button').onclick = function(){

	var msg = new SpeechSynthesisUtterance('Hello World');
  msg.lang = 'en-GB';
	window.speechSynthesis.speak(msg);

}