Different ways to Concatenate Strings in free Marker

We can achieve this by using + operator OR without operator

Without + operator

<#assign s = "Hello ${user}!">
${s} 

Using + operator

<#assign s = "Hello " + user + "!">

Note : Assume that user is “Big Joe”.

In both cases the output will be

Hello Big Joe!

Leave a comment

Your email address will not be published. Required fields are marked *