Build a Calculator App in HTML, CSS & JavaScript 2022

Поділитися
Вставка
  • Опубліковано 29 лис 2024

КОМЕНТАРІ • 36

  • @HayWhy_Pappy
    @HayWhy_Pappy Рік тому +13

    This is by far the best channel with great mini projects for getting better at coding. Tyler Potts is the best.

  • @jom499
    @jom499 3 місяці тому

    Excellent tutorial, In addition to basic JS stuff, shows how to manipulate inputs, using various string methods. Thank you.

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

    Great tutorial sir! 💚

  • @welson9922
    @welson9922 Рік тому +4

    In case nobody noticed, if the first number is 0 then the calculation will be completely wrong, for example 021 + 2 will return 19 when it should be 23. Make sure to correct the typo in the "PerpareInput" function that he wrote then just replace the entire PrepareInput function with this
    function PrepareInput(input) {
    // Replace percentages with their decimal equivalent
    let preparedInput = input.replace(/%/g, "/100");
    // Split the input into individual tokens
    let tokens = preparedInput.match(/(\d+\.\d+|\d+|\S)/g) || [];
    // Process each token to remove leading zeros in numbers
    for (let i = 0; i < tokens.length; i++) {
    if (!isNaN(tokens[i]) && tokens[i][0] === '0' && tokens[i].length > 1 && tokens[i][1] !== '.') {
    tokens[i] = tokens[i].replace(/^0+/, '');
    }
    }
    return tokens.join('');
    }

    • @berniceyap3897
      @berniceyap3897 8 місяців тому

      sry mate i cant understand ur code, can u explain it?

  • @neozoid7009
    @neozoid7009 Рік тому +4

    22:25 ~ js part
    03:32 ~ Html Divs
    06:07 ~ Css Start

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

    Awesome video and great sense of humour too

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

    Very useful, video,, . , ❤. I enjoyed the logics, this is one of the best beginners project

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

    I've learned so much from this video and the todo list video! I had a question on how to store those tasks from your todo vid. Hopefully you got the email.

  • @webprogrammingtutorials-alo69
    @webprogrammingtutorials-alo69 Рік тому +1

    Very useful. Thanks

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

    Thanks for sharing it really helps :-)

  • @welson9922
    @welson9922 Рік тому +1

    remember to include this in your ValidateInput function to prevent users from entering multiple % sign.
    if (value == "%" && last_input == "%") {
    return false;
    }

    • @xzvxzvr
      @xzvxzvr 4 місяці тому

      after which part do you put this at

  • @YousefShaker0
    @YousefShaker0 3 місяці тому

    What is your app to programming

  • @susanafernandez4164
    @susanafernandez4164 Рік тому +3

    it didn't work for me .. i mean the timer is not working ... neither in my local laptop nor in the server .. wonder why ... because i just downloaded the whole folder from github and tested it.

  • @sagaibrahim6178
    @sagaibrahim6178 Рік тому +2

    one thing i noticed is when a decimal is too large, the output goes a little off screen

  • @ЕвгенийМалый-ш9ф

    Thank you very much for your video. How can I save data to localstorage?

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

      I have a few videos on localstorage on my channel! Hopefully they can help.

  • @RAYOFSUNTHEFIRST.
    @RAYOFSUNTHEFIRST. Рік тому +1

    when I opened the index htmp it didn't show me the numbers etc.. and when I recheck my code I did exactly the same things, can u help me know where I must've went wrong?

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

    for the css part, when i clicked ctrl+s to save it and i went to my html file thingy, i didnt see anything save

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

    Time stamps would have been so much helpful >>>

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

    20:06

  • @berniceyap3897
    @berniceyap3897 8 місяців тому

    i've come across this problem where user can input multiple decimal. i've tried to optimize the validateinput to
    if( value == "." && last_input == "." || value == "." && input.lastIndexOf(operators)

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

    I turned 3 minutes into 40 minutes 😂 and this vid is not for slow type people to make😅

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

    13:58

  • @LS-dh6dh
    @LS-dh6dh 7 місяців тому

    How do I delete my account

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

    what's ur vscode theme?

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

    press option + ?get ➗