Toggle navigation
Toggle navigation
This project
Loading...
Sign in
graykode
/
commit-autosuggestions
Go to a project
Toggle navigation
Toggle navigation pinning
Projects
Groups
Snippets
Help
Project
Activity
Repository
Pipelines
Graphs
Issues
0
Merge Requests
0
Wiki
Snippets
Network
Create a new issue
Builds
Commits
Issue Boards
Authored by
graykode
2020-11-14 22:31:56 +0900
Browse Files
Options
Browse Files
Download
Email Patches
Plain Diff
Commit
3b832c5ce49e82f84dfc026d8c642566ef4b0ea7
3b832c5c
1 parent
42ed4c1a
(add) javascript file examples
Show whitespace changes
Inline
Side-by-side
Showing
2 changed files
with
27 additions
and
0 deletions
tests/javascript/added.diff
tests/javascript/fixed.diff
tests/javascript/added.diff
0 → 100644
View file @
3b832c5
diff --git a/function.js b/function.js
new file mode 100644
index 0000000..ba89d9a
--- /dev/null
+++ b/function.js
@@ -0,0 +1,6 @@
+function getIntoAnArgument() {
+ var args = arguments.slice();
+ args.forEach(function(arg) {
+ console.log(arg);
+ });
+}
\ No newline at end of file
tests/javascript/fixed.diff
0 → 100644
View file @
3b832c5
diff --git a/function.js b/function.js
index ba89d9a..d440734 100644
--- a/function.js
+++ b/function.js
@@ -1,6 +1,3 @@
-function getIntoAnArgument() {
- var args = arguments.slice();
- args.forEach(function(arg) {
- console.log(arg);
- });
+function getIntoAnArgument(...args) {
+ args.forEach(arg => console.log(arg));
}
\ No newline at end of file
Please
register
or
login
to post a comment