Hdiutil - Apfs or HFS?

Hello,
Could you send me your feedback if my code works on OS 10.15 and OS 11 as well?
Apfs should replace the hfs system but HFS+ file system seems to work fine…
At least on latest Mojave

set testDmg to POSIX path of (path to desktop folder as text) & "Test.dmg"
set volNm to "Test"
do shell script "hdiutil create -size 5m " & testDmg & " -volname \"" & volNm & "\" -fs HFS+ "

I tested Joy’s script and it created “Test.dmg” in the Desktop folder. I’m running Catalina 10.15.7. I mounted the DMG file and info showed the file system as Mac OS Extended. The file system of my boot drive is APFS.

@peavine
I’m glad to hear that it works for you

@Fredrik71
You miss the point, I asked for feedback if my code works on different operating systems. I’ve Mojave myself and my code works there.

I’d be curious if my code works on OS 11 as well.