GV

GeezerVison

The World Wide Web, restored to 800 pixels of glory.

Home|About|Gaming cabinet|Archives|How it works|Starter sites

On this site

  • Sign in
  • ActionsCI/CD and automation
  • CodespacesCloud development environments
  • All Features
  • Documentation
  • Training
  • Certifications
  • Build with Copilot
  • Customize Copilot
  • Integrations
  • Trending repos
  • GitHub Sponsors
  • Developer articles
  • Enterprises

This view

  • Original page
  • New address

GeezerVison is showing github.com — javascript/strings/concat.md at master · rajrs/javascript

Expand file tree

/

concat.md

Copy path
More file actions
More file actions

Latest commit

 

History

History
History
23 lines (18 loc) · 653 Bytes
/

concat.md

Copy path

File metadata and controls

23 lines (18 loc) · 653 Bytes
Raw
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 %}

You are visitor 01402792 — GeezerVison does not store the pages you look up.
Best viewed with Netscape Navigator 4.7 or Internet Explorer 6 at 800×600. No cookies required.