
JS - Kde ve vyjímce zobrazit zprávu když nenastane chyba
Ahoj, Když nenastane chyba alert je success (to v pořádku), pokud nastane chyba, alert je error a pak i success. Co dělám blbě? Děkuji.
try {
/../
} catch (e) {
alert('error');
} finally {
alert( 'success' );
}