try catch handle exception code example Example: try catch error try { console.log('hello'); } catch (e){ }