I’m now developing one JS UDF which seems following coding.
<script>
<!--
function alertmsg()
{
alert("Hello World");
}
for(p=1; p <= 2; p++)
{
alertmsg();
}
-->
</script>
Normally, Alert Msg will be came out two times because of loop count is 2. What I want is Alert Msg will be came out only one time even loop count is 3. Any idea will be appreciated in advance.
You only want to execute the piece of code once in the loop? Do something like this: