Could you share what you tried, if anything?
Also, https://forum.exercism.org/t/really-confused-about-the-coordinate-transformation-exercise-on-the-closures-topic/10289/24
#Coordinate Transformation
45 messages ยท Page 1 of 1 (latest)
wait
export function translate2d(dx, dy) {
function move() {
return [dx + dx, dy + dy];
}
return move;
}
Increase your chance of getting help and look like a pro by sharing codeblocks not images. For example, you can type the following. Note, the ``` must be on their own line.
```
for number in range(10):
total += number;
```
Discord will render that as so:
for number in range(10):
total += number;
Click here to learn more about codeblocks: https://exercism.org/docs/community/being-a-good-community-member/writing-support-requests and http://bit.ly/howto-ask
I think move is supposed to accept arguments maybe?
That's a lot of waiting you're having us do ๐
The example shows,
const moveCoordinatesRight2Px = translate2d(2, 0);
const result = moveCoordinatesRight2Px(4, 8);
// result => [6, 8]
what do you mean?
You told me to "wait" twice
Node how the translate2d() takes two values and returns a function. That function also takes two values.
lol yeah.
The result is the addition of those two sets.
makes sense
const move = translate2d(2, 0);
const result = move(4, 8);
That's four unique values (variables?)
๐
You're very welcome
In the future, you may want to consider not telling people on the internet to wait ๐
If everything is resolved, we ask that the person who posted the request react to the top/original post with a :white_check_mark: (:white_check_mark:). This indicates to others that this issue has been resolved and locks the thread.
If all the tests pass and you want to further improve your solution, we encourage you to use the "Request a Code Review" feature on the website!
I shall keep that in mind.
Any other requests good sire?
Nope. That's all.
splendid.
Are you still there?
Stuck again on task 3
I'm not sure If I'm allowed to tag you.
Ideally I'm not the only one who can help ๐ And I have other stuff going on from time to time.
Could you share what you tried? What's the error? Please don't use images to share text.
I'm sorry.
ok.
I haven't tried anything
I can
I can't understand the question.
This specific exercise is pretty hard compared to others.
I believe that's been discussed on the above forum thread I linked ๐
This task asks you to do something similar to the prior tasks but instead of using addition or multiplication to change the coordinates, you need to call a function.
Replace x, y = x1 + x2 y1 + y2 with x, y = some_function(x2, y2) or similar. Twice.