From 06dddf10e0f08bcc63307370a758be0937c28f2f Mon Sep 17 00:00:00 2001 From: LSvekis Date: Thu, 1 Jul 2021 19:43:46 -0400 Subject: [PATCH] Create arguments --- Chapter 12/arguments | 9 +++++++++ 1 file changed, 9 insertions(+) create mode 100644 Chapter 12/arguments diff --git a/Chapter 12/arguments b/Chapter 12/arguments new file mode 100644 index 0000000..d913305 --- /dev/null +++ b/Chapter 12/arguments @@ -0,0 +1,9 @@ + function showNames() { + let lastOne = ''; + for (let i = 0; i < arguments.length; i++) { + lastOne = arguments[i]; + + } + return lastOne; + } + console.log(showNames("JavaScript","Laurence", "Mike", "Larry"));