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/create.md at master · eazel7/javascript

Expand file tree

/

create.md

Copy path
More file actions
More file actions

Latest commit

 

History

History
History
38 lines (24 loc) · 655 Bytes
/

create.md

Copy path

File metadata and controls

38 lines (24 loc) · 655 Bytes
Raw
Copy raw file
Download raw file
Edit and raw actions

Creation

You can define strings in JavaScript by enclosing the text in single quotes or double quotes:

// Single quotes can be used
var str = 'Our lovely string';

// Double quotes as well
var otherStr = "Another nice string";

In Javascript, Strings can contain UTF-8 characters:

"中文 español English हिन्दी العربية português বাংলা русский 日本語 ਪੰਜਾਬੀ 한국어";

Note: Strings can not be subtracted, multiplied or divided.


Create a variable named str set to the value "abc".

var str = 'abc';
assert(str === 'abc');

You are visitor 01402775 — 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.