#javascript
Read more stories on Hashnode
Articles with this tag
Javascript | string | check | how to · To check for a truthy value: if (strValue) { // strValue was non-empty string, true, 42, Infinity, [],...
Javascript | copy | clipboard | how to · Async Clipboard API - navigator.clipboard.writeText Text-focused portion available in Chrome 66 (Since March...
Javascript | Object | clone | deep clone | structuredClone | how to · Native deep cloning There's now a JS standard called "structured cloning", that...
Javascript | Object | delete | how to · Given an object: let myObject = { "property": "value", "another-property": "another-value" }; To remove a...
Javascript | Arrays | insert | splice | how to · You want the splice function on the native array object. arr.splice(index, 0, item) will insert item...
Javascript | string | substring | indexOf | includes | how to · ECMAScript 6 introduced String.prototype.includes: const string = "Hello World!"; const...