I’ve edited your post for readability. When you enter a code block into a forum post, please precede it with a separate line of three backticks and follow it with a separate line of three backticks to make easier to read.
Note: Backticks are not single quotes.
See this post to find the backtick on your keyboard. The “preformatted text” tool in the editor (</>) will also add backticks around text.
Are you supposed to return collection or value? (if you post a link to the challenge it would be helpful)
In the 2nd if statement you are setting value to something but you don’t do anything else with value so what is the purpose?
In the last if statement you compare value to " " but should you be comparing it to “” instead? (that is, will value have spaces or will it have nothing?)
Edit: if I recall correctly, you are missing a few of the requirements stated in the challenge. If you go through the instructions slowly, one by one, and make sure you have handled each case, your code will improve…