Skip to content

Commit 6b96fe1

Browse files
committed
small formatting
1 parent 1860eb0 commit 6b96fe1

File tree

1 file changed

+5
-5
lines changed

1 file changed

+5
-5
lines changed
Lines changed: 5 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -1,11 +1,11 @@
11
// Declare a function swap that takes num_1 and num_2 as parameters.
2-
function swap(num_1,num_2){
2+
function swap(num_1, num_2) {
33
// At first print the numbers before swaping
4-
console.log("Before swapping:\n num_1 = "+num_1+"\n num_2 = "+num_2)
4+
console.log("Before swapping:\n num_1 = " + num_1 + "\n num_2 = " + num_2);
55
// Declare a variable temp and assigns the value of num_1 and assigns num_2 in num_1 and temp in num_2
66
let temp = num_1;
7-
num_1 = num_2;
8-
num_2 = temp
7+
num_1 = num_2;
8+
num_2 = temp;
99
// Check the result by printing the output
10-
console.log("After swapping:\n num_1 = "+num_1+"\n num_2 = "+num_2)
10+
console.log("After swapping:\n num_1 = " + num_1 + "\n num_2 = " + num_2);
1111
}

0 commit comments

Comments
 (0)