Monday, 8 August 2022

Exception Handling in JS Part-1

 index.html

<!DOCTYPE html>
<html lang="en">
<body>
<script>
try{
eval('hello world')
}
catch(e){
console.log(e);
}
finally{
console.log("finally block executes no matter what");
}
</script>
</body>
</html>





No comments:

Post a Comment

Regular Expressions In JS

 index.html file <! DOCTYPE html > < html lang = "en" > < body > < script > let re ; re = /hello/ i ;  ...