Try it
Javascript
Jquery
Angular
Learn Angular
Learn Javascript
Learn Bootstrap
Learn jQuery
StringOperator-2
+=
string operator concatenate two strings
<!DOCTYPE html> <html> <head> <title>Welcome to LearnKode - A code learning platform</title> </head> <body> <p>The assignment operator += can concatenate strings.</p> <p id="sample"></p> <script> txt1 = "What a"; txt1 += " good day"; document.getElementById("sample").innerHTML = txt1; </script> </body> </html>
Output
×
Save This try
Title
Description
<p><code>+=</code> string operator concatenate two strings</p>