CJCoding With Joseph
15free / daySign inCreate account
Back to Code Walkthrough

map then join

JavaScript code walkthrough · Question 5
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