Is there a way to create a function that uses multiple argument, and run the same function independently for each one of them?

27 views Asked by At

I'm pretty new in programming, but I'm trying to learn through practice. I'm coding a function which accepts a variable number of arguments, with the ... function. Here's an example of what I've done:

decyph_test = function(...) { decript = letters[...] return(decript) }

If I enter only one argument (in this case, the required argument is a number, 'cause its used to locate that position in the letter constant) there's no big problem. But, what I want to do is to enter multiple numbers, so each one of them is located to its respective letter, and then is compiled into a vector, which would be the return of the function. Is there any specific way in which I can make any individual argument run the same process of locating its letter counterpart?

0

There are 0 answers