Skip to content

Commit

Permalink
Swap Values
Browse files Browse the repository at this point in the history
  • Loading branch information
PheRum committed Jun 20, 2024
1 parent 1c1a4c8 commit dc35d7c
Show file tree
Hide file tree
Showing 4 changed files with 17 additions and 2 deletions.
7 changes: 7 additions & 0 deletions 8_kyu/Swap Values/README.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,7 @@
## Swap Values

https://www.codewars.com/kata/5388f0e00b24c5635e000fc6

I would like to be able to pass an array with two elements to my swapValues function to swap the values. However it appears that the values aren't changing.

Can you figure out what's wrong here?
5 changes: 5 additions & 0 deletions 8_kyu/Swap Values/index.test.ts
Original file line number Diff line number Diff line change
@@ -0,0 +1,5 @@
describe("Tests", () => {
it("example", () => {
expect(true).toBe(true);
});
});
3 changes: 3 additions & 0 deletions 8_kyu/Swap Values/index.ts
Original file line number Diff line number Diff line change
@@ -0,0 +1,3 @@
export function swapValues() {
return arguments[0].reverse();
}
4 changes: 2 additions & 2 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -2,8 +2,8 @@

### Katas solved

`Total`: 118 \
`8_kyu`: 93 \
`Total`: 119 \
`8_kyu`: 94 \
`7_kyu`: 16 \
`6_kyu`: 9 \
`5_kyu`: 0 \
Expand Down

0 comments on commit dc35d7c

Please sign in to comment.