Create a CSS Loader

<div class="loader"></div> 
<style> 
.loader {
  border: 16px solid #f3f3f3; /* Light grey */
  border-top: 16px solid #3498db; /* Blue */
  border-radius: 50%;
  width: 120px;
  height: 120px;
  animation: spin 2s linear infinite;
}
.loader2 {
  border-top: 16px solid blue;
  border-bottom: 16px solid blue;
} 
@keyframes spin {
  0% { transform: rotate(0deg); }
  100% { transform: rotate(360deg); }
} 
</style>

Go to here.

Understand The JavaScript Ternary Operator like the ABCs by William Imoh (thanks)

If you made it this far then it’s either you know of ternary operators and want to know more, you have no idea of ternary operators, or you’re just somewhere in-between. Keep on.

From my time writing JavaScript, and of course looking through the JavaScript of others especially beginner developers, I have noticed the age-long trend of using if/else statements and really long chains of them too! As an advocate of DRY code -Don’t Repeat Yourself, I ensure my code stays DRY, and maybe cold-hearted, lol.

In this post, we’ll be explaining ternary operators in the simplest way and how they make coding and life in general, easier.

Table of Contents

Go to the link…