A card validation suite can end up with eleven copies of the same test. Same steps, different card number. When the error message is reworded, that is eleven blocks to edit, and one will be missed.
Selenium itself has nothing to help here, because it is a browser control library and not a test runner. Parameterisation comes from whatever runner you chose, which is worth knowing before an interview.
In JavaScript with Mocha, a loop is all you need: