HTML Compiler Online
Javascript Online Compiler
index.html
Change Theme
Compress code
Format code
Download Code
Clear Code
Copy Code!
RunĀ
ctrl+s or click
Output
<!Doctype html> <html lang="en"> <head> <meta charset="utf-8"> <title>Article - Concatenate string in JavaScript 3</title> </head> <body> <h2>Plus operator in JavaScript to concatenate strings.</h2> <p>Press <kbd>F12</kbd> to open the console and see the output of the program.</p> <script> const str1 = "Learn "; const str2 = "to "; const str3 = "code"; const final = str1 + str2 + str3; console.log(final); console.log(5 + 5 + 12 + " = 5 + 5 + 12"); // first number added then concatenate </script> </body> </html>
RunĀ
x
x