n=5;
m=10
try{
if(n<m)
{
throw {
mensaje:'n es menor que m',
codigo:600
}
}
}
catch(e){
console.log(e.mensaje,'\n codigo',e.codigo)
}
Created
March 27, 2020 21:55
-
-
Save pgrtiragg/ed2e30518b1575ae614cf9c52033bc26 to your computer and use it in GitHub Desktop.
excepciones in nodejs
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment