
Caleb Porzio @calebporzio
? Object destructuring is so powerful. So many good uses, but a "config" object parameter is a great one! https://t.co/dSOCgnF2NN
Caleb Porzio @calebporzio
? Object destructuring is so powerful. So many good uses, but a "config" object parameter is a great one! https://t.co/dSOCgnF2NN
Caleb Porzio @calebporzio
?? Quick tip: Clean up your "or" statements with JavaScripts Array.includes() (Yet another improvement moving from an imperative style to declarative) https://t.co/u8CZHsjyrS
Samantha Ming @samantha_ming
How to Deep Clone an Array ? There are 2 types of array cloning: shallow & deep. Shallow copies only cover the 1st level of the array and the rest are referenced. For deep clones, go with the JSON way OR better yet use Lodash ? #100DaysOfCode #CodeNewbie #301DaysOfCode https://t.co/dflJ4XCXOj
R. Alex Anderson ? @ralex1993
??? #JavaScript tip: Reduce an array of constants into an object to save yourself a couple lines of code. I'm using linear interpolation here to create an array of x,y,z values from a location, destination, and the movement time. https://t.co/0wlocaJLWu
Patrick Brouwers @patrickbrouwers
? TIP When using PurgeCSS with classes that get dynamically created via e.g. a JS-library, you can whitelist them right in your CSS file #laravel https://t.co/tU3ngY71X0
Daily Web Dev @dailywebdev
A handy little debugging trick you can use in javascript is throwing exceptions to provide descriptive error messages in the console. throw new Error('hello world') ? You can take this one step further by throwing a variable directly (works with all datatypes) #javascript #js https://t.co/BLm2L6A4Qp
Umar Hansa @umaar
? You can use `await https://t.co/Sf5vzB4BmY.estimate()` to get the quota and usage of persistent data for the current site https://t.co/G2I9IpXdu6
R. Alex Anderson ? @ralex1993
??? Tip: awaiting is an execution-blocking operation, as in the rest of the function won't execute until the awaited promise is resolved. Run promises concurrently by awaiting references to the already executed promises! (You can also do this with Promise.all()) https://t.co/Vp1C6pOXkJ
? Vicky Koblinski @_koblinski
Here's a #javascript tip that I use every single day! Instead of: console.log('car', car); console.log('book', book); console.log('value', value); You can do: console.log({car, books, value}); ? https://t.co/EusxwK9iW7
Katie Hempenius @katiehempenius
How to view your connection speed from DevTools: > window.navigator.connection - This is the "NetworkInformation API" - It returns bandwidth, latency, & connection type approximations? https://t.co/nlCTIWiaTH
JavaScript Teacher @js_tut
Type in Chrome console: const obj = { } Then type: copy( obj ); Result: const obj = { } will be copied to clipboard. Paste it into your text editor. Works with any currently defined object. Makes debugging a lot easier – used it 1000+ times @ work.
Wes Bos @wesbos
? When using JavaScript default function params, you can access other params from right inside the definition! https://t.co/aSA5m6E3hy
Samantha Ming @samantha_ming
Prettify your JSON output ? Tired of the one-liner JSON output, well no more! Utilize JSON.stringify built-in pretty printing. Set the 3rd parameter with your desired spacing level ? Bam, instant GLAM ✨ #100DaysOfCode #CodeNewbie #301DaysOfCode https://t.co/6VQgAHdTVT
Jacob Bennett @JacobBennett
Quick and easy way to check strings against a regex in Javascript Define the pattern then test the desired string. Works like a charm! ❤ https://t.co/qML6YNUCcq
Gaurav Sehrawat; @Root3d
OMG. I just learned how to write comments in a json file via @wesbos #javascript #npm #nodejs #100DaysOfCode #301DaysOfCode https://t.co/ekOlP0o2fT
Antonio Ribeiro @iantonioribeiro
When everything you try to fix npm fails: > npm-fresh https://t.co/JaTcIu8gaD
Sophie Alpert @sophiebits
life hack: console log function that auto-indents based on the depth of your call stack https://t.co/6pYyOIKdb9
Wes Bos @wesbos
? If you are trying to debug something in the middle of chaining array methods, just map over it, console.log, and return it. Since console.log returns nothing, it will just pass the entire array through. You can even make a handle little debug function ? https://t.co/HCtLh4QYm6
Pine @thepinecode
Generate a random alpha-numeric string with the given length. ? #JavaScript https://t.co/sUB3KxWEVf
Alexander Lichter @TheAlexLichter
An easy way to get the first truthy value of an array in #javascript is passing Boolean to the find function. https://t.co/56J4LTNNJm