console.log("Hello World!");
const food = ['Siomay', 'Mie', 'Sushi', 'Roti', 'Martabak'];
const [firstTry, secondTry, thirdTry, fourthTry, fifthTry] = food;
console.log(firstTry);
console.log(secondTry);
console.log(thirdTry);
console.log(fourthTry);
console.log(fifthTry);
const beverage = ['Lemon Tea', 'Cocktail', 'Beer', 'Mineral Water']
const [, , , fourthDrink] = beverage
console.log(fourthDrink);
const pet = ['Bird', 'Dog', 'Cat', 'Hamster'];
let myPet = 'Iguana';
let herPet = 'Tiger';
[myPet, herPet] = pet;
console.log(myPet);
console.log(herPet);
let a = 1;
let b = 2;
console.log("Sebelum swap");
console.log("Nilai a: " + a);
console.log("Nilai b: " + b);
[a, b] = [b, a]
console.log("Setelah swap");
console.log("Nilai a: " + a);
console.log("Nilai b: " + b);
const favorites = ["Seafood"];
const [myFood, herFood = "Salad"] = favorites
console.log(myFood);
console.log(herFood);