Skip to content

Train Driver: Prevent deleting object property #2674

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

Merged
merged 1 commit into from
Jun 13, 2025

Conversation

SleeplessByte
Copy link
Member

This prevents:

export function separateTimeOfArrival(information) {
  let arrivalTime = information.timeOfArrival;
  delete information.timeOfArrival;
  return [arrivalTime, information] 
}

This is important because we want the teaching goal of

const { timeOfArrival, ...rest } = information

@SleeplessByte SleeplessByte requested a review from Cool-Katt June 13, 2025 01:04
@SleeplessByte SleeplessByte added x:action/improve Improve existing functionality/content x:module/concept-exercise Work on Concept Exercises x:type/content Work on content (e.g. exercises, concepts) labels Jun 13, 2025
Copy link
Contributor

This PR touches files which potentially affect the outcome of the tests of an exercise. This will cause all students' solutions to affected exercises to be re-tested.

If this PR does not affect the result of the test (or, for example, adds an edge case that is not worth rerunning all tests for), please add the following to the merge-commit message which will stops student's tests from re-running. Please copy-paste to avoid typos.

[no important files changed]

For more information, refer to the documentation. If you are unsure whether to add the message or not, please ping @exercism/maintainers-admin in a comment. Thank you!

@Cool-Katt Cool-Katt merged commit 70e9901 into main Jun 13, 2025
10 checks passed
@Cool-Katt Cool-Katt deleted the chore/train-driver-disable-delete branch June 13, 2025 07:06
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
x:action/improve Improve existing functionality/content x:module/concept-exercise Work on Concept Exercises x:type/content Work on content (e.g. exercises, concepts)
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants