HAKATEMIA
07JavaScript

Working with Strings

Easy30MIN

Data Type Recap - What Is a String Again?

A string is a sequence of characters used to represent text. Strings are enclosed in single quotes ('...') or double quotes ("..."). They can include letters, numbers, symbols, and even spaces.

JAVASCRIPT
1let greeting = "Hello, world!";
2console.log(greeting);  // prints: Hello, world!

There is a lot more that can be done with strings than just printing them out. Let's cover some of the more common use cases here.

1 / 7
Hakatemia Pro

Learn to hack — start here

Hundreds of interactive courses, virtual labs and CTF challenges in your browser. Start a free trial — no card required.