From 572612a282e7e6f30abce3ab765c58defc5c3bce Mon Sep 17 00:00:00 2001 From: Ethan Dalool Date: Tue, 29 Sep 2020 01:16:35 -0700 Subject: [PATCH] Replace variable swap with a one-liner. --- frontends/ycdl_flask/templates/channel.html | 4 +--- 1 file changed, 1 insertion(+), 3 deletions(-) diff --git a/frontends/ycdl_flask/templates/channel.html b/frontends/ycdl_flask/templates/channel.html index 0be2ac5..0c0af11 100644 --- a/frontends/ycdl_flask/templates/channel.html +++ b/frontends/ycdl_flask/templates/channel.html @@ -417,9 +417,7 @@ function onclick_select(event) let end_index = video_cards.indexOf(event.target); if (end_index < start_index) { - let temp = start_index; - start_index = end_index; - end_index = temp; + [start_index, end_index] = [end_index, start_index]; } for (let index = start_index; index <= end_index; index += 1)