array elements double next to each other

The solution for “array elements double next to each other” can be found here. The following code will assist you in solving the problem.

let drinks: string[] = [‘Gin’, ‘Whiskey’, ‘Wine’, ‘Beer’];
let drinks2: string[] = drinks.map((i) => i + i);
console.log(drinks2);

Thank you for using DeclareCode; We hope you were able to resolve the issue.

More questions on [categories-list]

0
inline scripts encapsulated in