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

Empty an array snippet #187

Closed
Alexey1981 opened this issue May 11, 2020 · 1 comment
Closed

Empty an array snippet #187

Alexey1981 opened this issue May 11, 2020 · 1 comment

Comments

@Alexey1981
Copy link

Alexey1981 commented May 11, 2020

image

Really? If you want, I can create snippet for "empty any variable", see: "var = null", is it OK for you?

I can also create some snippets like "set variable to one", its easy: "a = 1;", are you need for snippets for create variables from one to ten? Its easy too:
a = 1;
a = 2;
a = 3;
a = 4;
a = 5;
a = 6;
a = 7;
a = 8;
a = 9;
a = 10;

Please, add my snippets to your stupid list.

@phuocng
Copy link
Owner

phuocng commented May 11, 2020

@Alexey1981 There are the things that seem to be easy for you, but they're not for other one.
Empty an array is a special case, and the people still look for them as you can see here
https://stackoverflow.com/questions/1232040/how-do-i-empty-an-array-in-javascript
https://www.jstips.co/en/javascript/two-ways-to-empty-an-array/

and many more.

I and the contributors try to share the knowledge, and enrich our knowledge together. There's nothing called stupid here.

@phuocng phuocng closed this as completed Jun 3, 2020
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