JavaScript JS program to concatenate two strings with flowchart and form value entered by a user.
In this tutorial, we will learn about the followings.
- Flowchart of JavaScript JS program to concatenate two strings.
- JavaScript JS program to concatenate two strings.
- JavaScript JS program to concatenate two strings with form value entered by a user.
Flowchart of JavaScript JS program to concatenate two strings.

JavaScript JS program to concatenate two strings.
1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 | <html> <body> <br> <h1> CONCATENATE STRINGS</h1> <br><p>Click here to combine two strings into single string.</p> <p id="demo"></p> <button onclick="concatenate()">Check it</button> <script> function concatenate() { var string1 = "good "; var string2 = "Morning!"; var conc = string1.concat(string2); document.getElementById("demo").innerHTML = conc; } </script> </body> </html> |
JavaScript JS program to concatenate two strings with form value entered by a user.
1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 | <html> <head> <script> function conct(){ var s1; var s2; var Tstr; s1=document.getElementById("st1").value; s2=document.getElementById("str2").value; Tstr=s1+s2; document.getElementById("demo").value=Tstr; } </script> </head> <body> <input id="st1"> <input id="str2"> <button onclick ="conct()">Click here</button> <input id="demo"> </body> </html> |
Topic Covered:
JavaScript JS program to concatenate two strings with flowchart and form value entered by a user.
List of All Programs of Javascript : Click Here .