#17 How to use the JS Math object | JavaScript Full Tutorial

Поделиться
HTML-код
  • Опубликовано: 2 окт 2024
  • 🙂 SUBSCRIBE - hit the bell 🔔 and choose all: goo.gl/nYLZvz
    In this lesson let's learn all about the built in Math object, the Math object contains math properties and methods that are used to do some really cool things such as generate random numbers an find the min and max values from a list.
    ------------------
    👍 HTML FULL TUTORIAL: shorturl.at/fiCMV
    👍 CSS FULL TUTORIAL: shorturl.at/clGSZ
    ------------------
    FACEBOOK: / devdreamercode
    TWITTER: / devdreamercode
    SUBSCRIBE and hit the BELL NOTIFICATION 🔔: goo.gl/nYLZvz
    ------------------
    Learn with Dev Dreamer! Step by step, easy to understand tutorials :-)

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

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

    🎉❤ I can't believe i just write my own code for the first time of my own and thank you so much❤😊 for the lesson

  • @BTFezzer
    @BTFezzer 3 года назад +3

    i struggled with the math object for a while but after watching this video i managed to smash the challenges thank you very much you are a brilliant teacher

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

    Thank you, I loved this video. Coupled with some docs on MDN, it's very very good.

  • @elikpornu
    @elikpornu 7 месяцев назад

    Incredible tutorials. What vs code theme is that?

  • @vaibhavmevada9668
    @vaibhavmevada9668 3 года назад +2

    Thank you sir for making the video on javascript 👍

    • @DevDreamer
      @DevDreamer  3 года назад

      Hey Vaibhav, thank you for watching! 🙂👍

  • @0x0-Issa
    @0x0-Issa 2 года назад

    thank you sir

  • @webb-developer
    @webb-developer 8 месяцев назад

  • @inhkhanhle884
    @inhkhanhle884 3 года назад +1

    Hope u will have a series convert HTML CSS to a Website from Dribble Design

    • @DevDreamer
      @DevDreamer  3 года назад

      Hey Đình Khánh Lê! Thank you so much for watching, there are a few Dribbble shots from scratch that are currently in the making, so please stay tuned 🙂👍

    • @inhkhanhle884
      @inhkhanhle884 3 года назад

      @@DevDreamer i mean , more viewer very like your series convert from Dribble , it beautiful . hope u make more video about this

  • @alejandromantilla3563
    @alejandromantilla3563 3 года назад +1

    Maybe I've misunderstood something, but I feel like Math.random().toFixed(1) * 10 creates numbers between 0 and 10. Not 1 and 10.
    Great video, btw! Loving the series so far.

    • @alejandromantilla3563
      @alejandromantilla3563 3 года назад

      Instead, I would write something like
      Math.random().toFixed(1) * 9 + 1

    • @DevDreamer
      @DevDreamer  3 года назад +1

      Hey Alejandro, thank you so much for watching, really glad you are enjoying the series!
      You are right 👍it would be 0-10. Your suggestion would return 1-10 but not as whole numbers. To get 1-10 as whole numbers we should be using Math.floor() like so: Math.floor(Math.random() * 10 + 1)
      Thanks again for watching, do you think the tasks at the end of the lessons are helpful? 🙂👍

    • @alejandromantilla3563
      @alejandromantilla3563 3 года назад

      @@DevDreamer You're absolutely right!
      In general, one would write something like this:
      Math.floor(Math.random() * (upperBound - lowerBound + 1) + lowerBound)
      Where upperBound and lowerBound are integers (10 and 1 respectively in your example).
      I've had some experience writing JS for personal projects (I'm more of a Python kinda guy) and so I usually skip those exercises, but I do believe they could be valuable to someone who has just started coding!
      Keep up the good work!! It amazes me how quickly you manage to release these videos.

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

    You explain easy 🎉, thank you, i need this kind of teacher.

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

    You make JS easier than easy

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

      Thanks Rema, really glad you’re finding them useful and easy to understand. Practice and repetition is the key 👍

  • @dylanm7638
    @dylanm7638 3 года назад

    quick recap, nice

  • @ca-lt1fc
    @ca-lt1fc 3 года назад

    last few tutorials used "let" and now it's "const"...i have a basic understanding of let vs const but do not clearly understand in what situations we use which??? Can you please clarify?

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

      let is for the variables(whose values can be changed) however, const is to declare constants(whose values can never change)