format

fun format(cx: Context, scope: Scriptable, args: Array<Any?>): String

Turns the arguments into one line, the way a browser console does: the first argument may carry %s, %d, %i, %f, %o, %O, %c and %%, and anything left over is appended separated by spaces.