+ 1

How to create variables between two strings?

The result I am getting is 4n and what I want is 4 n. I the concatenating sign between the two variables in variable e but it still not working so I wondering what is wrong. var firstletter=""; var f="John"; var d=""; d=f.length firstletter=f[3]; var e=d+ "" +firstletter; console.log(e)

16th Jul 2020, 11:43 AM
Anyanwu Johnbosco Chima
Anyanwu Johnbosco Chima - avatar
2 Respuestas
+ 2
Anyanwu Johnbosco Chima Give space inside quote marks.
16th Jul 2020, 11:54 AM
A͢J
A͢J - avatar
+ 1
var e=d+" "+firstletter; Put space inside quote marks.
16th Jul 2020, 11:54 AM
Vadivelan