UNPKG
es6-default-params
Version:
latest (0.4.3)
0.4.3
0.4.2
0.4.1
0.4.0
0.3.0
0.2.0
0.1.0
0.0.2
0.0.1
Function default parameters compiled to ES5.
github.com/square/es6-default-params
es6-default-params
/
test
/
examples
/
null-vs-undefined.js
8 lines
(5 loc)
•
122 B
JavaScript
View Raw
1
2
3
4
5
6
7
8
/* jshint esnext:true */
function
foo
(
x=
5
, y=
6
) {
return
[x, y]; } assert.
deepEqual
(
foo
(
undefined
,
null
), [
5
,
null
]);