Javascript naming conventions for destructive and non-destructive methods

Are there any good naming conventions for destructive and non-destructive methods in Javascript? There is a ruby! after the method, but the JS syntax does not allow this.

+4
source share
1 answer

No, I never came across them.

For example, the method Array.splice() is destructive, where Array.slice() not. You do not know what happened if you did not consult the documentation.

+6
source

Source: https://habr.com/ru/post/1402636/


All Articles