Skip to content

Navigation Menu

Sign in
Appearance settings

Search code, repositories, users, issues, pull requests...

Provide feedback

We read every piece of feedback, and take your input very seriously.

Saved searches

Use saved searches to filter your results more quickly

Appearance settings

Latest commit

 

History

History
History
23 lines (18 loc) · 653 Bytes

File metadata and controls

23 lines (18 loc) · 653 Bytes
Copy raw file
Download raw file
Edit and raw actions

Concatenation

Concatenation involves adding two or more strings together, creating a larger string containing the combined data of those original strings. This is done in JavaScript using the + operator.

var bigStr = "Hi " + "JS strings are nice " + "and " + "easy to add";

{% exercise %} Add up the different names so that the fullName variable contains John's complete name. {% initial %} var firstName = "John"; var lastName = "Smith";

var fullName = {% solution %} var firstName = "John"; var lastName = "Smith";

var fullName = firstName + " " + lastName; {% validation %} assert(fullName === 'John Smith'); {% endexercise %}

Morty Proxy This is a proxified and sanitized view of the page, visit original site.