|
Web+ Tutorial
|
Lesson 1.4 - String Concatenation Operator
- Description
- The
& operator is used to concatenate two strings. If either operand is a number, it is converted to a string.
- Syntax
#operand1 & operand2#
- Example
#"John" & "Smith"# #"Mr. " & LastName# #variable & number# #value & 8#
- Sample
<webSet #FirstName# = "Karen"> <webSet #LastName# = "Wyatt"> <webSet #FullName# = #FirstName & " " & LastName#> <webSet #Greeting# = #"Hello, my name is " & FullName & "."#> <webPrint>#Greeting#</webPrint>
- Result:
- Exercise
-
You can try out some Web+ code of your own here.
|
|