I have some javascript like this:
<script>
var num = 0;
if(num==0){
function lol(){
alert("lol");
}
} else {
function lol(){
alert("haha");
}
}
</script>
Then, later in the page I have:
<script>lol();</script>
How do I ensure that the first function isn’t always overwritten by the second in the else statement?
Thanks
How about: