π° JavaScript Quick Tips
Today weβll look at #javascript simple tips and tricks.
Hereβs a breakdown:
1. Filter unique values
2. Convert to boolean
3. Convert to string
4. Convert to int
5. Convert float to int
6. Remove last digits
7. Truncate an array
8. Last item in an array
If these tips were useful save the post for later! Follow for
more tips and tricks like these
Today weβll look at #javascript simple tips and tricks.
Hereβs a breakdown:
1. Filter unique values
2. Convert to boolean
3. Convert to string
4. Convert to int
5. Convert float to int
6. Remove last digits
7. Truncate an array
8. Last item in an array
If these tips were useful save the post for later! Follow for
more tips and tricks like these
This media is not supported in your browser
VIEW IN TELEGRAM
π° CSS Tip
Do you have an image that is not exactly the same size as what you want to render it as?
Just turn on the object-fit propery to cover for the image element!
This property ensures that irrespective of the dimension of the image element, the contents fully covers the element without any distortion.
π Without this, the content would be stretched to fit the element
Do you have an image that is not exactly the same size as what you want to render it as?
Just turn on the object-fit propery to cover for the image element!
This property ensures that irrespective of the dimension of the image element, the contents fully covers the element without any distortion.
π Without this, the content would be stretched to fit the element