Simple way to alert error messages in Javascript

Thank you Jacob Peattie for suggesting. It is very simple to use confirm() to replace alert() although confirm() has two options for users to select: OK and Cancel.

When users click OK or Cancel button, I use function focus() to direct users where to correct that empty Content. Here are my working sample codes:

   if(content === '') {      
       confirm('Please write description of your post.'); 
       tinymce.activeEditor.focus(); // for Visual Mode of WP Classic Editor
       $('#content').focus();           // for HTML Mode of WP Classic Editor
    }

Many thanks

deneme bonusudeneme bonusu veren sitelerpulibet girişOnwin Güncel Giriştürkçe altyazılı pornocanlı bahis casino