What do you want to save?
Add Code snippet
New code examples
-
Javascript 2021-09-20 16:39:02
javascript rest parameters vs spread operator
/** * JS Spread and Rest operators: * Two operators with the same syntax (...) but behave differently */ // Rest parameter: collects all remaining elements into an array. function foo (...args) { console.log(args) } foo(1,2,3,4,5,6) // Output: (6) [1,... Add solution
Best helpers
+10
+5
+5
+5
+5
+5
+5
+5
+5
+5
+5
+5
+5