Generally, I feel that using switch statements is most of the time not necessary, and using an object is very much a good alternative and one that is commonly available.
That being said, I think number 9 is misleading. You stated that objects are shorthand for switch statements, and they aren't. They're an alternative you could do sometimes. But saying an object is "shorthand" for a switch statement is definitely not correct.
There are definitely situations where you would need a switch statement instead of an object (IE, the object cannot replace the switch statement). A shorthand of syntax should be able to replace the original in all situations.
I think just modifying the text to state that its not a shorthand but an alternative that's commonly available would be good.
For further actions, you may consider blocking this person and/or reporting abuse
We're a place where coders share, stay up-to-date and grow their careers.
These tips are really good.
Generally, I feel that using switch statements is most of the time not necessary, and using an object is very much a good alternative and one that is commonly available.
That being said, I think number 9 is misleading. You stated that objects are shorthand for switch statements, and they aren't. They're an alternative you could do sometimes. But saying an object is "shorthand" for a switch statement is definitely not correct.
There are definitely situations where you would need a switch statement instead of an object (IE, the object cannot replace the switch statement). A shorthand of syntax should be able to replace the original in all situations.
I think just modifying the text to state that its not a shorthand but an alternative that's commonly available would be good.