mirror of https://github.com/01-edu/public.git
353 B
353 B
Give me the code
Instructions
Create a jsFileOnly
function that takes an array of filenames (strings) and
only keeps those that are ending with .js
Example:
const result = jsFileOnly([
'essay.docx',
'index.html',
'info.txt',
'lib.js',
'README.md',
'script.js',
])
console.log(result) // ['lib.js', 'script.js']