Build a Calculator App in HTML, CSS & JavaScript 2022

preview_player
Показать описание
Learn how to build a calculator web app in html, css and javascript 2022!

// JOIN THE DISCORD SERVER!

// BECOME A MEMBER TO UNLOCK MORE CONTENT!

// MY GEAR FOR CODING AND YOUTUBE

All of these products I own and have tested!

// FOLLOW ME ON TWITTER

// INTERESTED IN GAME DEV?

// CHECK OUT MY GAME

// DO THESE SIMPLE STEPS
LIKE, SUBSCRIBE & SHARE
Рекомендации по теме
Комментарии
Автор

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

HayWhy_Pappy
Автор

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

neozoid
Автор

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.

Darkest_of_Winter
Автор

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 = || [];

// 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('');
}

welson
Автор

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

jom
Автор

Awesome video and great sense of humour too

kukunase
Автор

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.

susanafernandez
Автор

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

sagaibrahim
Автор

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?

RAYOFSUNTHEFIRST.
Автор

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

xspl_
Автор

remember to include this in your ValidateInput function to prevent users from entering multiple % sign.

if (value == "%" && last_input == "%") {
return false;
}

welson
Автор

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

ЕвгенийМалый-шф
Автор

Thanks for sharing it really helps :-)

kapuramanisoren
Автор

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

fatinfuyad
Автор

Time stamps would have been so much helpful >>>

neozoid
Автор

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 == "." && ){
return false;
}



but what happens is that my 2nd decimal wont get input
i can only input . once
any idea how to solve this and what's wrong with my code?

berniceyap
Автор

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

rockydog