Skip to content

Instantly share code, notes, and snippets.

@kirilkirkov
kirilkirkov / gist:fc6e20f9cee38031753d3828386f23f8
Created August 28, 2022 07:25
JavaScript - Destructuring To Get The First And Last Element Of An Array In ES6
The easiest lay to get first and last element from an array in javascript with one line code.
<script>
const meals = ['apple', 'orange', 'bananna'];
const {length, 0: first, [length - 1]: last} = meals;
console.log(first, last)
</script>
@kiriwalawren
kiriwalawren / README.md
Last active August 22, 2024 19:50
WSL Configuration

Installing WSL (windows subsystem for linux)

Running the azure-team terraform make file to create your infrastructure may not work on a Windows machine. If you cannot get it to run, install a linux distribution where you will exectute the tf files. Setting up a distribution with all of the right dependencies does involve a bit of setup to get it configured properly. The following is a list of steps you'll need to complete:

Install WSL