You have two string variables called Name and City. You want to construct a new sentence that includes the values from the following variables:
My name is
Which expression will provide the required output?
You have two string variables called Name and City. You want to construct a new sentence that includes the values from the following variables:
My name is
Which expression will provide the required output?
To construct a new sentence that includes the values from the variables Name and City, you should use the String.Format method with placeholders where {0} corresponds to the first variable and {1} to the second. The correct expression that follows this format is String.Format('My name is {0} and I live in {1}', Name, City). This correctly references the values of the variables Name and City.
Tested in Studio !
Given is correct