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
37 lines (22 loc) · 857 Bytes

File metadata and controls

37 lines (22 loc) · 857 Bytes
Copy raw file
Download raw file
Outline
Edit and raw actions

String

A String is a sequence of characters.

#intro

A string type is more complex than a number or a boolean. Strings have a length and you can change the characters inside the string. You can also break strings apart and make new strings, or put strings together and make longer strings.

Create a string variable

let greeting = "Hello";

To create a variable that holds a string:

  1. Click Variables (in the Block drawer).

  2. Type a name for your new string variable by clicking the down arrow, then click New Variable. Then type the variable name "salutation"

  3. Drag a string block on the right side of the operator.

  4. Click "Hello" and then type a string like hello.

Your code should look something like this:

let greeting = "Hello";

#examples

See also #seealso

Number

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