Oops! It appears that you have disabled your Javascript. In order for you to see this page as it is meant to appear, we ask that you please re-enable your Javascript!

JavaScript JS program to concatenate two strings with flowchart and form value entered by a user.

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.

  1. Flowchart of JavaScript JS program to concatenate two strings.
  2. JavaScript JS program to concatenate two strings.
  3. JavaScript JS program to concatenate two strings with form value entered by a user.

Flowchart of JavaScript JS program to concatenate two strings.

Program to Concatenate two strings in C++ (CPP, C Plus Plus) and C Languges

Figure: Program to Concatenate two strings in C++ (CPP, C Plus Plus) and C Languages.

JavaScript JS program to concatenate two strings.

<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.

<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 
.

Fazal Rehman Shamil Click Here to Know More
Instructor, Researcher, Blogger, SEO Expert, Poet and Publisher of International Journal Of Software, Technology & Science ISSN : 2616 - 5325
Dear Professors and Resarchers!You are welome to Cite these tutorials in your research or slides etc. Please don't forget to mention the reference of website. Copy Paste of text is strcitly forbidden. Images can be reuse because images are protected with watermark.

4 Replies to “JavaScript JS program to concatenate two strings with flowchart and form value entered by a user.”

  1. The first program is a bit confusing but the second program clears my concepts of concatenation.
    now I have learned how to concatenate two strings

  2. firstly I got an error in my javascript concatenation program. but after understanding from your website. i concatenate 3 strings… string1=”i” ,string2=”love”, string3=”UK” and join them together

  3. I was confused how can I concatenate string.. with the help of your program I concatenate 5 strings by just taking from the input fields and show in the single input field

  4. I write this whole program and input two strings. First string was “i live” and second string was “in Pakistan”. It stored these two values in variables and concatenate it and stored in third variable. This program showed me output I live in Pakistan.

Leave a Reply

Your email address will not be published. Required fields are marked *