code.with.dan

  • Home
  • code.with.dan

code.with.dan Contact information, map and directions, contact form, opening hours, services, ratings, photos, videos and announcements from code.with.dan, Digital creator, .

Avoid creating a let variable and then assigning the value through an if clause.The ternary operator allows you to set a...
17/05/2022

Avoid creating a let variable and then assigning the value through an if clause.

The ternary operator allows you to set a value conditionally with very little code and with no boilerplate!

💬 Do you normally use it? Tell me in the comments!

All modern web browsers support Javascript but it is always important to account for those who don't!The noscript tag wi...
17/05/2022

All modern web browsers support Javascript but it is always important to account for those who don't!

The noscript tag will allow your app to display alternative content to indicate so to your users.

💬 Have you ever had a situation where this tag made the difference? Tell me on the comments!


Take advantage of the Optional Chaining Operator and avoid unnecessary checks. Using this operator you can be sure your ...
17/05/2022

Take advantage of the Optional Chaining Operator and avoid unnecessary checks. Using this operator you can be sure your code will not break by trying to access to an inexistent path 🙂

To me this operator was a great addition and it has helped me to avoid a lot of unnecessary code.

💬 What do you think about this operator? Do you like it? Would you include any other?

Sometimes you don't know whether a variable will contain a value or not. Using the OR operator is a great way to default...
17/05/2022

Sometimes you don't know whether a variable will contain a value or not. Using the OR operator is a great way to default a value and control your app behavior.

💬 Did you know you could use this logical operator in this way? Let me know on the comments!

⏩ The fastest way to clean your Arrays! It is always annoying having to deal with falsy values. Use this trick to get a ...
17/05/2022

⏩ The fastest way to clean your Arrays! It is always annoying having to deal with falsy values. Use this trick to get a new array with only the values you care about.

⚠️ Be careful! Values like 0 are considered "falsy" and you may want to keep it.

💬 Do you know other ways to achieve the same? Tell me on the comments!

⚠️ Performance is important! Resources like images are heavy and take time to load 🕙. If those images are not critical f...
17/05/2022

⚠️ Performance is important! Resources like images are heavy and take time to load 🕙. If those images are not critical for your website, you can use this trick to defer its loading and provide a better user experience 🙂

💬 Have you used it before? Tell me other tricks you use or how much improvement you web had with this tip!


Address


Website

Alerts

Be the first to know and let us send you an email when code.with.dan posts news and promotions. Your email address will not be used for any other purpose, and you can unsubscribe at any time.

Shortcuts

  • Address
  • Alerts
  • Claim ownership or report listing
  • Want your business to be the top-listed Media Company?

Share