JavaScript: How to convert a boolean to a number?
HTML-код
- Опубликовано: 5 июл 2022
- #javascript #javascriptboolean #javascriptbooleanconvert
How do you convert boolean to number?
How do you convert boolean to number in JavaScript?
👉 My JavaScript Clean Code Shorts Tutorials Playlist
• Playlist 👈
👉 My JavaScript For Beginners Playlist
• Playlist 👈
👉 My JavaScript Shorts Tutorials Playlist
• JavaScript Shorts 👈
👉 My HTML For Beginners Shorts Tutorials Playlist
• Playlist 👈
👉 My JavaScript Arrays Shorts Tutorials Playlist
• Playlist 👈
👉 JavaScript Spread Operator Shorts Tutorials Playlist
• Playlist 👈
👉 My JavaScript Test Tutorials Playlist
• Playlist 👈
👉 My HTML Shorts Tutorials Playlist
• HTML shorts 👈
👉 My jQuery Shorts Tutorials Playlist
• Jquery Shorts 👈
👉 My Bootstrap Shorts Tutorials Playlist
• Playlist 👈
👉 My CSS Shorts Tutorials Playlist
• Playlist 👈
👉 My Visual Studio Code Shorts Tutorials Playlist
• Visual Studio Code Shorts 👈
👉 Table (HTML, CSS, Bootstrap, JavaScript, jQuery) Shorts Tutorials Playlist
• Playlist 👈
one minute coder web site:
www.oneminutecoder.com Наука
I do not understand anything🤨🙁😮
Putting the plus sign makes the code treat a variable as a number
@@stevetheone7291 😁 thanks
What this operator is called??
Unary plus (+)
@@oneminutecoder thank you.
But why? Give explanation, i'm lazy
I think at some time true got traided as 1 and false as 0 and this is the left over or something, so the old code didn't break.