StringOperator-1

 

Example of String Operator " " concatenates two strings

 
 
 
<!DOCTYPE html> <html> <head> <title>Welcome to LearnKode - A code learning platform</title> </head> <body> <p>The + operator concatenates (adds) strings.</p> <p id="sample"></p> <script> var txt1 = "Michael"; var txt2 = "Voughan"; document.getElementById("sample").innerHTML = txt1 + " " + txt2; </script> </body> </html>
Output