mbpsprintf(string format, [arg1, arg2, ...])

Return a formatted string Similar to PHP's sprintf, you pass in a string to format using %s and pass additional params that will replace each %s in the order they are encountered

Example:

document.getElementById('result').innerHTML = mbpsprintf("I enjoy %s, %s, and %s", "apples", "fruit", "cookies")
document.getElementById('result').innerHTML = mbpsprintf("I enjoy %s, %s, and %s", "apples", "fruit", "cookies")

Notes

Feel free to implement this wherever you want, improve the code, or share it around. Please leave the function name as it is, and check out on the interwebs: @manbearpixel