Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Spread syntax works unexpectedly with String #802

Closed
Wunderwegner opened this issue Nov 26, 2018 · 1 comment
Closed

Spread syntax works unexpectedly with String #802

Wunderwegner opened this issue Nov 26, 2018 · 1 comment

Comments

@Wunderwegner
Copy link

Using a spread operator as shown below should explode a string into an array. However, it seems to be doing nothing (leaving the string as it is).

// Browser console
const sampleString = 'Lorem';
console.log([...sampleString]);

// console: ['L', 'o', 'r', 'e', 'm']

// StackBlitz
const sampleString = 'Lorem';
console.log([...sampleString]);

// console: 'Lorem'
@sulco
Copy link
Member

sulco commented Jan 25, 2021

Thanks @Wunderwegner for reporting the issue!

Yeah, that was pretty confusing..
Thankfully, it's no longer an issue :)

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants