console.log('Math.max(1, 2, 3)', Math.max(1, 2, 3))

console.log('Math.max([1, 2, 3])', Math.max([1, 2, 3]))

console.log('Math.max(...[1, 2, 3])', Math.max(...[1, 2, 3]))


//
// Sample function definition
//
function test(param1, ...args) {
  console.log('  -> param1', param1)
  console.log('  -> args', args)
}

console.log('test(1):')
test(1)

console.log('test(1, "a", "b", "c"):')
test(1, 'a', 'b', 'c')

Run Pen

External CSS

This Pen doesn't use any external CSS resources.

External JavaScript

  1. https://codepen.io/livecodestream/pen/KKdEQYG.js