mirror of
https://github.com/alrayyes/wiki.git
synced 2025-06-23 05:16:34 +00:00
Quartz sync: May 6, 2024, 10:40 PM
This commit is contained in:
parent
aee9145691
commit
4ef8371441
635 changed files with 22281 additions and 6 deletions
|
@ -0,0 +1,17 @@
|
|||
---
|
||||
id: 0efc7236-a6cb-402f-91f6-f05f038a4aa2
|
||||
title: JavaScript String To Array Conversion
|
||||
---
|
||||
|
||||
# Description
|
||||
|
||||
Strings can be [converted](20200613170756-javascript_type_conversion)
|
||||
into [arrays](20200826201029-arrays) with the
|
||||
[spread](20201014094144-spread) operator:
|
||||
|
||||
# Syntax
|
||||
|
||||
``` javascript
|
||||
const chars = [..."abc"];
|
||||
console.log(chars); // Array(3) [ "a", "b", "c" ]
|
||||
```
|
Loading…
Add table
Add a link
Reference in a new issue