Problems understanding example code

I am really new to UNIX and programming in general and so apologies if this thread is a bit simple.

I have searched and found a piece of sample code for a training program I am currently undertaking, but seeing as I am relatively new, I dont completely understand how it works.

Here is the code:

file=$1
set -- $(ls -ld $file)

perms=$1
owner=$3

[[ "$perms" = ?r???????? ]] && owner_read=YES
[[ "$perms" = ??w??????? ]] && owner_write=YES
[[ "$perms" = ???x?????? ]] && owner_exec=YES

[[ "$perms" = ????r????? ]] && group_read=YES
[[ "$perms" = ?????w???? ]] && group_write=YES
[[ "$perms" = ??????x??? ]] && group_exec=YES

[[ "$perms" = ???????r?? ]] && world_read=YES
[[ "$perms" = ????????w? ]] && world_write=YES
[[ "$perms" = ?????????x ]] && world_exec=YES

echo "perms: $perms"
echo "OWNER $owner ${owner_read:-NO} ${owner_write:-NO} ${owner_exec:-NO}"
echo "GROUP ${group_read:-NO} ${group_write:-NO} ${group_exec:-NO}"
echo "WORLD ${world_read:-NO} ${world_write:-NO} ${world_exec:-NO}"
Basically I understand how the script works generally, but I am just wondering whether the [[ ]] is equal to a shorthand if statement?

Also is ${owner_read:-NO} checking if the result from the above statement is null and then if so printing "NO"?

Sorry if this is a bit simple.

Thanks for any help.

continue here: