wes d2a2ba9e15 first commit 4 years ago
..
README.md d2a2ba9e15 first commit 4 years ago
code.cpp d2a2ba9e15 first commit 4 years ago
unitTest.cpp d2a2ba9e15 first commit 4 years ago

README.md

Get the File Extension

by Helen Yu tags: strings, higher_order_functions, arrays

Summary

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

Instructions

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