+ 1

How to add two strings together in ts or css

I want to add in ts (solo + learn = Sololearn)

18th Aug 2025, 8:37 AM
Asitabh
4 Antwoorden
+ 3
let a: string = 'Solo'; let b: string = 'learn'; let c: string = a + b; console.log(c);
18th Aug 2025, 9:15 AM
Bob_Li
Bob_Li - avatar
+ 1
JavaScript/TypeScript: console.log("solo"+"learn") CSS is not a programming language, it is a style language. You can't do that with CSS.
18th Aug 2025, 8:54 AM
Mila
Mila - avatar
0
Var a: string="solo"; Var b: string="learn"; Var c= a+b; console.log(c);
18th Aug 2025, 10:50 AM
Asitabh
0
Asitabh in typescript and javascript, one should avoid using var and consider using const and let instead. var is an old convention that has a lot of undesired behavior that can lead to unexpected bugs. consider it a bad keyword you shouldn't be using anymore. unfortunately, you can still find code examples using var. maybe the authors just don't care, or they're old tutorials and documentations. try Googling: "why avoid using var in typescript and javascript" the AI gives a pretty good summary of the cons ...
18th Aug 2025, 11:35 AM
Bob_Li
Bob_Li - avatar