𝐐𝐮𝐢𝐜𝐤 𝐉𝐚𝐯𝐚𝐒𝐜𝐫𝐢𝐩𝐭 𝐂𝐡𝐚𝐥𝐥𝐞𝐧𝐠𝐞 – 𝐂𝐚𝐧 𝐘𝐨𝐮 𝐆𝐮𝐞𝐬𝐬 𝐭𝐡𝐞 𝐎𝐮𝐭𝐩𝐮𝐭? Sometimes it’s not about complex algorithms… It’s about understanding how small string methods work together. 👀 Here’s the snippet 👇 const result = ["genetech", "solutions"] .map(word => word.charAt(0).toUpperCase() + word.slice(1)) .join(" "); console.log(result); What will be the output? 🤔 A) genetech solutions B) GENETECH SOLUTIONS C) Genetech Solutions D) ["Genetech", "Solutions"] This one tests your understanding of: - map() - charAt() - toUpperCase() - slice() - join() Small fundamentals. Big difference. 💡 Drop your answer in the comments 👇 Let’s see who reads code carefully 😄 #JavaScript #WebDevelopment #FrontendDeveloper #CodingChallenge #LearnToCode #Programming #Developers #TechCommunity #JS #CodeDaily
C
C
B
C
word.charAt(0) → the first character "g" .toUpperCase() → uppercase it "G" word.slice(1) → everything after the first character ("enetech") then concatenates them Overall : "G" + "enetech" ,"S"+olutions and overall join(" ") gives into Output: Genetech Solutions.
c) Genetech Solutions