-
Looking to make your form checkboxes match your overall design more closely? Give FancyForm a look. http://lipidity.com/fancy-form/
#jstip -
How to use async/await without try/catch block: const to = p => p.then(r => [null, r]).catch(e => [e]) Usage: async function func () { const [err, result] = await to(promiseFunction()) if (err) { return null } // do something here with result =) }
#JSTipPrikaži ovu nit -
If you redeclare a JavaScript variable, it will not lose its original value as long you doesn't assign a new value
#jsTip -
#jstip Get a list of all CSS classes used in a page (useful when eliminating unused CSS code) by pasting this in the console: [...new Set($$("[class]").flatMap(e => [...e.classList]))]Prikaži ovu nit -
vue-router/meteorjs quick tip: don't use Meteor.user() in router guards. the user object isn't available as long as the universal publication isn't ready.
#vue#meteorjs#100DaysOfCode#jstip#indiehackerspic.twitter.com/loXS7Fn8Oj
-
JavaScript tip: Use === instead of ==. == only checks if the value is the same while === checks if has the same type and value Eg 10==‘10’ //true 10===‘10’ //false
#jstip#100DaysOfCode -
So many ways to round numbers in JavaScript. Reply with any methods I may have forgotten!
#javascript#jstip
pic.twitter.com/5Z2gi4KWOe
-
Math.max.apply(Math, [array])
#javascript#jstip -
#jstip Find the max element in an array: Math.max.apply(Math, array); Similarly for min. -
#jstip With ES6 WeakMaps you never need to add properties on elements or other objects you don’t own, and are supported even in IE11! Instead of http://element.foo = "bar", just do fooMap.set(element, "bar"); Important: WeakMap, not Map. Otherwise, you'll interfere with gc -
Hot tip of the day:
const ≠ immutable assignment 

const = immutable binding 

Use Object.freeze( ) to make values immutable
#jstip#javascripttip#es6#tip#js#javascriptpic.twitter.com/wsGoWLtz0n
-
Valuable JS tip by
@tiffcodes When in doubt, console.log() it out#jstip#cohort20 -
-
JS Developer Tip. Here's how to declare multiple variable names on a single line. Hat tip
@jsfordesigners#jstip pic.twitter.com/Wlo58CNbQW
-
#JSTip: Do you know setTimeout is not part of ECMAScript? Rather it's part of the HTML standard. See https://html.spec.whatwg.org/multipage/webappapis.html#dom-settimeout … -
#JStip: If you often execute snippets of JS in the console to test something, run them in about:blank, so that the page doesn't interfere. -
don't use async/await in map or foreach function, instead use it in for(element of list) statement.
#jstipPrikaži ovu nit -
Simple chrome dev tools tips which take to function declaration .
#100DaysOfCode#JS100#JS100#javascript#javascript30#javascripttips#jstip Read about more dev tools tricks https://medium.com/better-programming/debug-like-a-lion-in-chrome-dev-tool-babe1019df3d …?pic.twitter.com/Yud2dZ4Er3
-
Array.prototype.push might not return what you would expect.
#javascript#jstip pic.twitter.com/K6eR51p1w5
-
#JSTip To preserve accessors etc copy properties with Object.defineProperty(to, property, Object.getOwnPropertyDescriptor(from, property));
Čini se da učitavanje traje već neko vrijeme.
Twitter je možda preopterećen ili ima kratkotrajnih poteškoća u radu. Pokušajte ponovno ili potražite dodatne informacije u odjeljku Status Twittera.