Quantcast
Channel: SCN: Message List
Viewing all articles
Browse latest Browse all 3132

Re: Custom Function

$
0
0

one method to implement this is by while-loop and if-then-else conditions.

 

pass the values start and end of string to the function , other variables used below can be declared locally in the function.

 

$current = $start;

$string = ''; #to return this value

 

while ( $current <= $target )

  begin

$string = $string || $current;

$current = $current + 1;

   end

 

return the value from $string

 

hope this helps !


Viewing all articles
Browse latest Browse all 3132

Trending Articles



<script src="https://jsc.adskeeper.com/r/s/rssing.com.1596347.js" async> </script>