wes d2a2ba9e15 first commit | 4 years ago | |
---|---|---|
.. | ||
README.md | 4 years ago | |
code.cpp | 4 years ago | |
unitTest.cpp | 4 years ago |
by Helen Yu tags: strings, higher_order_functions, arrays
Write a function that maps files to their extension names. Examples getExtension(["code.html", "code.css"]) ➞ ["html", "css"] getExtension(["project1.jpg", "project1.pdf", "project1.mp3"]) ➞ ["jpg", "pdf", "mp3"] getExtension(["ruby.rb", "cplusplus.cpp", "python.py", "javascript.js"]) ➞ ["rb", "cpp", "py", "js"] Notes N/A
Write a function that maps files to their extension names.
getExtension(["code.html", "code.css"])
➞ ["html", "css"]
getExtension(["project1.jpg", "project1.pdf", "project1.mp3"])
➞ ["jpg", "pdf", "mp3"]
getExtension(["ruby.rb", "cplusplus.cpp", "python.py", "javascript.js"])
➞ ["rb", "cpp", "py", "js"]
N/A