JSFiddle - React, Tailwind, and code Playground

by Alex Alex

HTML

<input type="button" value="Print">

JavaScript

try {
    window.print()
}catch(e) {alert(e.message)}