Cara Membuat Pesan Cuti di JavaScript

window.onbeforeunload = function(){
  return 'Are you sure you want to leave?';
};
Ugliest Unicorn