JS Challenge: 3

·

1 min read

String:

String is one of the primitive datatype of JavaScript. String is nothing but a group of characters represented within quotes.

const firstName = "Arun"
const lastName = "Arivanandam"

String Concatenation:

Joining one string with another string is known as string concatenation. It's achieved by '+' symbol.

const firstName = "Arun"
const lastName = "Arivanandam"
const fullName = firstName + lastName

If you want a space between first and last name, then you have to add space within quotes.

Note: Space is also considered as character.

const firstName = "Arun"
const lastName = "Arivanandam"
const fullName = firstName + " " + lastName

Challenge:

  1. Enter your first name and last name in the respective variables
  2. Log your Full name with space in between.