@@ -381,16 +381,16 @@ Array and object are used in the programs to contain multiple values
381381- Default function parameters allow named parameters to be initialized with default values if no value or undefined is passed
382382
383383``` js
384- function defaultValueFunc (num = 10 , num2 = 20 , string = " Hello " , bool = false , sum = num1 + num2 ){
384+ function defaultValueFunc (num = 10 , num2 = 20 , bool = false , sum = num + num2 , string = " Hello " ){
385385 console .log (num, string, bool, sum);
386386}
387387
388388// driver code
389- defaultValueFunc (); // 10, 20 , false, 30
390- defaultValueFunc (4 , 8 ); // 4, 8 , false, 12
391- defaultValueFunc (10 , 4 , true ); // 10, 4 , true, 14
392- defaultValueFunc (5 , 6 , false , 11 ); // 5, 6 , false, 11
393- defaultValueFunc (undefined , undefined , false ); // 10, 20 , false, 30
389+ defaultValueFunc (); // 10, 'Hello' , false, 30
390+ defaultValueFunc (4 , 8 ); // 4, 'Hello' , false, 12
391+ defaultValueFunc (10 , 4 , true ); // 10, 'Hello' , true, 14
392+ defaultValueFunc (5 , 6 , false , 11 ); // 5, 'Hello' , false, 11
393+ defaultValueFunc (undefined , undefined , false ); // 10, 'Hello' , false, 30
394394```
395395
396396###### Notes
@@ -673,7 +673,7 @@ const proxy = new Proxy(function () { console.log(arguments); }, {
673673
674674// driver code
675675proxy (1 , 2 , 3 ); // Proxy apply is invoked on target with context: undefined, arguments: 1,2,3
676- proxy .call ({}, 1 , 2 ); // Proxy apply is invoked on target with context: undefined , arguments: 1,2,3
676+ proxy .call ({}, 1 , 2 ); // Proxy apply is invoked on target with context: [object Object] , arguments: 1,2,3
677677proxy .apply ({}, [5 , 10 ]); // Proxy apply is invoked on target with context: [object Object], arguments: 5,10
678678```
679679
0 commit comments