CJCoding With Joseph
← Back to Question List
JavaScript Code Walkthrough #5

map then join

mediumArrays

📄 Code

Read carefully — what does this print?
1const nums = [1, 2, 3];
2const doubled = nums.map((x) => x * 2);
3console.log(doubled.join(","));

🎯 Your Answer