Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Jake Ross Solutions for back end test #50

Open
wants to merge 1 commit into
base: master
Choose a base branch
from

Conversation

JakeJustLearning
Copy link

@JakeJustLearning JakeJustLearning commented Jul 7, 2023

This provides two solutions in JS and also aims to cover some edge cases not immediate shown in the prompt

For JS the language limits this to work accurately only if the incoming container is a plan JavaScript Object {} if it were an Array or set it would not be able to meet the criteria of mutating the original object in place without there being relics such as empty items in the beginning of the array. This is why I added validation to ensure that the incoming container was an object.

I also covered edge cases for when arrays and objects are nested within one another, Date Objects, null and undefined values. as well as when those are nested. Thank you this was fun!

@JakeJustLearning JakeJustLearning changed the title both solutions Jake Ross Solutions for back end test Jul 7, 2023
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

1 participant