I was wondering if there was a way to break javascript execution, something like this
<script>
if(already_done)
{
return; //prevent execution (this yields an error)
}
doSomeStuff();
</script>
I know that this is possible like this:
<script>
if(already_done)
{
// do nothing
}
else
{
doSomeStuff();
}
</script>
But it's not the solution I'm looking for.
Hopefully this makes sense.