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

Поділитися
Вставка
  • Опубліковано 16 січ 2025

КОМЕНТАРІ • 21

  • @BTFezzer
    @BTFezzer 3 роки тому +4

    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

  • @Hangoutapp
    @Hangoutapp Рік тому

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

  • @vaibhavmevada9668
    @vaibhavmevada9668 3 роки тому +2

    Thank you sir for making the video on javascript 👍

    • @DevDreamer
      @DevDreamer  3 роки тому

      Hey Vaibhav, thank you for watching! 🙂👍

  • @lolu6797
    @lolu6797 2 роки тому

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

  • @jjkk90live
    @jjkk90live 2 роки тому

    thank you sir

  • @dylanm7638
    @dylanm7638 3 роки тому

    quick recap, nice

  • @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

  • @elikpornu
    @elikpornu 10 місяців тому

    Incredible tutorials. What vs code theme is that?

  • @dzajakeks5539
    @dzajakeks5539 3 роки тому +1

    You make JS easier than easy

    • @DevDreamer
      @DevDreamer  3 роки тому +1

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

  • @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.

  • @webb-developer
    @webb-developer 11 місяців тому

  • @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

  • @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?

    • @0xyousaf
      @0xyousaf 3 роки тому

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