What does this shell script do? Need in depth explanation please

Hi

My friend wrote this particular script and won't tell me what it does, and when I run it I don't understand it.

What does the entire script do with specifics please.

Thanks
Bob

#!/bin/bash
current=0
while [ $SECONDS -le 10 ]; do
if [ $SECONDS -eq ${current} ]; then
echo ${current}
current=$((${current}+1))
fi
done

Is this a homework assignment? Homework and coursework questions can only be posted in the Homework & Coursework forum under special homework rules.

Please review the rules, which you agreed to when you registered, if you have not already done so.

If you did post homework in the main forums, please review the guidelines for posting homework and repost. If this is not a homework assignment, please explain where you found this code and what it is being used for.