var a = "8";: Variable a is assigned the string "8".
var b = "6";: Variable b is assigned the string "6".
var c = a + b;: The + operator concatenates the two strings, resulting in "86".
console.log(c);: Outputs the value of c to the console.
Output:
The console displays "86" because it concatenates the two string values.
References:
MDN Web Docs - String
W3Schools - JavaScript String
Contribute your Thoughts:
Chosen Answer:
This is a voting comment (?). You can switch to a simple comment. It is better to Upvote an existing comment if you don't have anything to add.
Submit