Well, wait a second. I'd actually suggest that the top function is the work of a more experienced programmer than the bottom one. First, using "i" is pretty standard as an iterator; making it more verbose as "counter" doesn't really make that much of a difference, Second, helloText is a much better variable name for textToPrint for this function, because the content of the helloText is "Hello World <3". Now, if you were passing in the text as a parameter to the sayHello function, "textToPrint" is a better variable name (but at that point, you should probably rename the function to "sayText" or "printText". If I were to write out the function (using ES6) I'd probably write something like this: const sayText = (textToPrint, times = 1 ) => Array(times).fill(textToPrint).forEach( (text) => console .log(text)); const sayHelloTenTimes = () => sayText( "Hello World <3" , 10 ); Couple of things might make ES6 different from your Rust solution (I've never used Rust) - the "times = 1" declaration in the parameter means that if times is undefined, it will assume the times variable should be 1, but it can be overwritten if defined. That allows you to use sayText("foo") and have it be syntactically valid. Additionally, creating an Array requires more memory than simply iterating; but this function could be rewritten using a standard iterator instead as: const sayText = (textToPrint, times = 1 ) => { while (times > 0 ){ console .log(textToPrint) times--; } }