Friday eve February 20, 2025 I’m currently working on a JavaScript function to duplicate values from an array and return…