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
  • НаукаНаука

Комментарии • 8

  • @tocaagamer
    @tocaagamer 2 года назад +2

    I do not understand anything🤨🙁😮

    • @stevetheone7291
      @stevetheone7291 2 года назад +1

      Putting the plus sign makes the code treat a variable as a number

    • @tocaagamer
      @tocaagamer 2 года назад +1

      @@stevetheone7291 😁 thanks

  • @ahsaanali4512
    @ahsaanali4512 2 года назад

    What this operator is called??

  • @fimbulw1nter
    @fimbulw1nter 2 года назад +1

    But why? Give explanation, i'm lazy

    • @melonenlord2723
      @melonenlord2723 Год назад

      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.