← Back to challenges

Verbos Regulares

JavaScriptHardarraysformattinglogic

Instructions

The conjugations for all Spanish regular verbs can be built by using the three forms for verbs ending in -ar, -er and -ir.

Create a function that takes a verb as string, and returns a string with the six person/number combinations (like in the examples). Watch out for verbs ending in -ir (check the notes). Try programming the construction rather than forming structures with arrays.

Examples

espVerb("pasar") ➞ "Yo paso, tú pasas, él pasa, nosotros pasamos, vosotros pasáis, ellos pasan."

espVerb("unir") ➞ "Yo uno, tú unes, él une, nosotros unimos, vosotros unís, ellos unen."

espVerb("correr") ➞ "Yo corro, tú corres, él corre, nosotros corremos, vosotros corréis, ellos corren."

The smallest category of regular Spanish verbs is those that end in -ir. To conjugate them, remove the infinitive ending and then add one of the following verb endings:

...SingularPlural
1st personyo -onosotros -imos
2nd persontú -esvosotros -ís
3rd personél -eellos -en

Notes

  • This is for European Spanish, so the second person plural is vosotros pasais, not ustedes pasan
  • We're only using regular Spanish verbs. So no yo conozco, tú conoces, etc.
  • Pay attention to the accent marks! Feel free to copy them from the test page if you want.
javascript
Loading editor…
to run
Walks through the solution with reasoning and edge cases.