2024-05-06 20:40:05 +00:00
|
|
|
---
|
2024-10-30 17:34:11 +00:00
|
|
|
date: 2020-09-22
|
2024-05-06 20:40:05 +00:00
|
|
|
id: 02b70a4e-8f42-4de2-a536-dd42a42f7b47
|
|
|
|
title: JavaScript Strings
|
|
|
|
---
|
|
|
|
|
|
|
|
- [String Prototype
|
|
|
|
Methods](20201112095341-javascript_string_prototype_methods)
|
|
|
|
- [String Literals](20201112100548-javascript_string_literals)
|
|
|
|
- [String Escapes](20201112101218-javascript_string_escapes)
|
|
|
|
- [Unicode](20201112101637-unicode)
|
|
|
|
- [String Iteration](20201112101851-javascript_string_iteration)
|
|
|
|
- [String To Array
|
|
|
|
Conversion](20201112102537-javascript_string_to_array_conversion)
|
|
|
|
|
|
|
|
# Syntax
|
|
|
|
|
|
|
|
## Regular characters
|
|
|
|
|
|
|
|
``` javascript
|
|
|
|
console.log(`Down on the sea`)
|
|
|
|
console.log("Lie on the ocean")
|
|
|
|
console.log('Float on the ocean')
|
|
|
|
```
|
|
|
|
|
|
|
|
## Escaped characters
|
|
|
|
|
|
|
|
``` javascript
|
|
|
|
console.log("This is the first line\nAnd this is the second")
|
|
|
|
console.log("A newline character is written like \"\\n\".")
|
|
|
|
```
|