If you find yourself writing little comments like this "// portrait" one, you should probably just create a `isPortrait` helper. Alternatively, return a string like `'portrait'` or `'landscape'`. The string approach is slightly more self documenting, much nicer when used as parameters (I hate seeing function calls that look like `f(x, true, true, false)`). Then instead of `else { //landscape`, you can write `} else if (layout === 'landscape') {` and it's super clear.