Your files never leave your device
Advertisement

Strings & String Methods

Strings represent text in JavaScript. You can enclose them in single quotes, double quotes, or backticks.

Creating and Combining Strings

You can combine (concatenate) strings using the + operator. The length property tells you how many characters are in the string.

Try It Yourself

        

String Methods

Strings come with built-in functions (methods) to manipulate them, like changing case or extracting parts.

Try It Yourself

        

Practice

Challenge 1: Create a variable containing the string "javascript" and use a method to make it uppercase.

Challenge 2: Find the length of the string "Supercalifragilisticexpialidocious".

Related Guides

Sponsored Utility
While You're Here
Sponsored Recommendations
Advertisement