From 596f100902fabeea58bc5f637b1f4ab24bc7ef0b Mon Sep 17 00:00:00 2001 From: Karan <50290386+Sonawane-Karan26@users.noreply.github.com> Date: Thu, 25 Nov 2021 19:22:20 +0530 Subject: [PATCH] Exercise 12.3 --- Chapter 12/Exercise 12.3 | 8 ++++++++ 1 file changed, 8 insertions(+) create mode 100644 Chapter 12/Exercise 12.3 diff --git a/Chapter 12/Exercise 12.3 b/Chapter 12/Exercise 12.3 new file mode 100644 index 0000000..fee2846 --- /dev/null +++ b/Chapter 12/Exercise 12.3 @@ -0,0 +1,8 @@ +function showNames() { + let lastOne = ""; + for (let i = 0; i < arguments.length; i++) { + lastOne = arguments[i]; + } + return lastOne; +} +console.log(showNames("JavaScript", "Laurence", "Mike", "Larry"));