This content originally appeared on DEV Community 👩💻👨💻 and was authored by Mustapha Aouas
1. CSS sibling selector
You can use the adjacent sibling combinator (+
) to target a sibling that comes directly after the first target. Or you can use the general sibling combinator (~
) to target any sibling that comes after the first target
2. The capture attribute
You can open a device camera directly from the HTML using the “capture” attribute 🔥
Set it to “user” if you want the selfie cam 🤳 or to “environment” if you want the rear cam 📸
3. Know how many fingers are touching the screen
Did you know that you can know how many fingers are touching the screen in javascript like this 👇
Hey there 👋 I tweet daily about the things I learned in my 6+ years journey in web development, so if you like these tips consider following me on Twitter @theAngularGuy. 🙂
4. Triple equality special cases
In javascript triple equality (===
) is usually enough for equality comparisons. But it has two special cases: NaN
and -0
+0
.
Hopefully Object.is()
does not 💡
5. Tuple in typescript
The difference between these two function is the type of the first one will be inferred as number[]
while the type of the second will be a tuple of [number, number]
(actually readonly [number, number]
)
Let's connect
That's it for this week. I hope you liked it. If you did, please share it with your friends & colleagues and follow me on Twitter @theAngularGuy where I tweet about web development and computer science 🚀
Cheers!
What to read next?

Responsive images for better performance: Start using srcset and picture
Mustapha Aouas ・ Nov 8 '21 ・ 5 min read
This content originally appeared on DEV Community 👩💻👨💻 and was authored by Mustapha Aouas

Mustapha Aouas | Sciencx (2022-09-16T16:15:03+00:00) 5 webdev tips you may want to know 🔥. Retrieved from https://www.scien.cx/2022/09/16/5-webdev-tips-you-may-want-to-know-%f0%9f%94%a5/
Please log in to upload a file.
There are no updates yet.
Click the Upload button above to add an update.