JSFiddle - React, Tailwind, and code Playground

by manchagnu

JavaScript

function sayHi() {
    return "HI";
}


function throwHi() {
    throw new Error("HI");
}


// Give it to me sync
console.log(sayHi());


// Throw it to me sync
try {
    console.log(throwHi());
}
catch( ex ) {
    console.log("Exception caught", ex.message);
}