JavaScript intent
var someNumber = 1;
try {
someNumber.replace("-",""); //You can't replace a int
} catch(err) {
console.log(err);
}
Grepper
var someNumber = 1;
try {
someNumber.replace("-",""); //You can't replace a int
} catch(err) {
console.log(err);
}
<p id="error"></p>
<script>
try {
wrongalert("Welcome guest!");
}
catch(err) {
document.getElementById("error").innerHTML = err.message;
}
</script>