Skip to content

Instantly share code, notes, and snippets.

@suhailgupta03
Created May 13, 2023 15:16
Show Gist options
  • Save suhailgupta03/a74227ce0fe2a9bec54fefd89e459392 to your computer and use it in GitHub Desktop.
Save suhailgupta03/a74227ce0fe2a9bec54fefd89e459392 to your computer and use it in GitHub Desktop.
var string1 = "mahima";
var string2 = "bhat";
// can concatenate (join) 2 or multiple strings
// using + operator
var fullName = string1 + " " + string2
// string1 gets added to an empty string (which is a space here)
// which then gets added to string2
// mahima + " " + bhat
console.log(fullName);
// string concatenation
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment