Happy New Year 2023

Happy New Year 2023

Post Date : 2022-12-31T21:10:13+07:00

Modified Date : 2022-12-31T21:10:13+07:00

Category: lifestyle

Tags: well-being

#!/usr/bin/env node

const words = ["Happy", "New", "Year", "2023"];
const message = {};
words.map((w, index) => {
  Reflect.set(message, index, w);
});

let happyNewYearMessage2023 = "";
Reflect.ownKeys(message)
  .sort()
  .forEach((index) => {
    happyNewYearMessage2023 = `${happyNewYearMessage2023} ${Reflect.get(
      message,
      index
    )}`;
  });

console.log(happyNewYearMessage2023);