Using || instead of if statement when setting Array.from