How to space an output | Sololearn: Learn to code for FREE!
Novo curso! Todo programador deveria aprender IA generativa!
Experimente uma aula grƔtis
0

How to space an output

In JS, if I want a concatenated output to have a space, how shout I do it? My example: variable oneGoal {//code} console.log (ā€œWhat is yourā€ + oneGoal) Output: What is yourobjective Expected output: What is your objective How can I put a space between ā€œyourā€ and ā€œobjectiveā€?

9th May 2021, 2:20 AM
Daniel Lopez
1 Resposta
0
Just put a space after your in first string "What is your "+oneGoal
9th May 2021, 2:29 AM
YUGRAJ