//How functions work with parameters //Order of paramters matters function repeat(str, numTimes){ let result = ""; for (let i = 0; i < numTimes; i++) results += str; } console.log(result) repeat("Good",5) //Good Good Good Good Good
Preview:
downloadDownload PNG
downloadDownload JPEG
downloadDownload SVG
Tip: You can change the style, width & colours of the snippet with the inspect tool before clicking Download!
Click to optimize width for Twitter