Smålån | Bluetooth Kuulokkeet | Kredittkort | Strømpris | Billig Boligalarm 2017 | Beste Forsikring | Beste Mobilabonnement | Boliglån Rente
JavaScript programming

Concatenation Operator JavaScript

JavaScript programming in the Concatenation Operator (Concatenation Operator) is used, multiple strings, strings and any other variables, as well as to add. Concatenation Operator (Concatenation Operator) of two types namely (+) sign and (+ =) sign. For example document.write ( “Hello” + “World”); Or var x = 50; document.write ( “The book has” + x + “pages.”); And var e = “Technology”; e + = “tutorials”; .

Practice Project:

<html>
<head>
<title> www.trickbd.com.bd</title>
<style>
body{background: #FFC;
font-size:20px;}
h2{color:#FF0066;}
</style>

</head>
<body>
<script type = “text/java script”>
document.write(“Hello ” + “World”);
document.write(“<br />”);
var x=50;
document.write(“The book has ” +x+” pages.”);
document.write(“<br />”);
var e=”Technology “;
e +=”tutorials”;
document.write(e);
</script>
</body>

</html>

Notepad: to open a file type from the menu at the top of layer code by clicking on the Save as File name: index.html, Save as type: All files, save and open the index.html file with the Mozilla Firefox look like the image shown below.

  • At the top of the program document.write ( “Hello” + “World”); Through two separate string “Hello” and “World” as well as the Concatenation Operator (Concatenation Operator) (+) sign has been associated with. Hello World will be displayed in the browser.
  • Program var x = 50; As the value of the variable x is an integer number 50 has been set. document.write ( “The book has” + x + “pages.”); Here’s “The book has” and “pages.” To add a string between two variables x Concatenation Operator (+) sign is used. Browser The book has 50 pages. Will be displayed.
  • Program var e = “Technology”; e. = “tutorials”; In the case of var e = “Technology”; As the value of the variable e Value string “Technology” has been set. e + = “tutorials”; E expressing its previous value “tutorials” Sting also be added. document.write (e); When you view the e variable Technology tutorials will be displayed in the browser.

 

Comments

comments

About the author

Toriqul Islam Tusher

বলার মত কিছু নাই!

Leave a Comment