wes d2a2ba9e15 first commit | 4 rokov pred | |
---|---|---|
.. | ||
README.md | 4 rokov pred | |
code.cpp | 4 rokov pred | |
unitTest.cpp | 4 rokov pred |
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