[Solved] How can I make calculater? can any one help me? | Sololearn: Learn to code for FREE!
Novo curso! Todo programador deveria aprender IA generativa!
Experimente uma aula grƔtis
- 1

[Solved] How can I make calculater? can any one help me?

Just I don't know how i use javascript I think it's better that creating function an add to html as onclick and put digits as argument

3rd Mar 2020, 9:28 AM
Mohammad
Mohammad - avatar
13 Respostas
+ 2
Don't hurry, read the readings, make sure you understand it. Here is step 2: 2.1 eval() https://code.sololearn.com/WTEZml9BfCVd/?ref=app Readings about 2.1: https://www.sololearn.com/post/97586/?ref=app
3rd Mar 2020, 9:47 AM
Gordon
Gordon - avatar
+ 3
https://code.sololearn.com/WYp5kozajlRl/?ref=app
3rd Mar 2020, 9:34 AM
Mohammad
Mohammad - avatar
+ 3
You should be able to find plenty of solutions on the web too.
4th Mar 2020, 9:14 PM
Sonic
Sonic - avatar
+ 2
This is step 1: https://code.sololearn.com/Wy1Sj8694qWv/?ref=app 1.1 add html div, add title 1.2 style css, add a border 1.3 global variable 1.4 onload 1.5 DOM 1.6 display stored expression (test) Readings for 1.3 Scope https://www.sololearn.com/post/91113/?ref=app for 1.4 onload https://www.sololearn.com/post/90825/?ref=app https://www.sololearn.com/post/233784/?ref=app https://code.sololearn.com/WKKkpq0efxai/?ref=app
3rd Mar 2020, 9:41 AM
Gordon
Gordon - avatar
+ 2
https://code.sololearn.com/WE9Q4CLXS61d/?ref=app This may help you
3rd Mar 2020, 9:58 AM
Samiun Nafis
Samiun Nafis - avatar
+ 1
Or I can use jQuery
3rd Mar 2020, 9:28 AM
Mohammad
Mohammad - avatar
+ 1
Yes, that is a way. Please show your code here so that we can help you https://www.sololearn.com/post/75089/?ref=app
3rd Mar 2020, 9:31 AM
Gordon
Gordon - avatar
+ 1
Ijust design
3rd Mar 2020, 9:35 AM
Mohammad
Mohammad - avatar
+ 1
Good, Let me teach you step by step
3rd Mar 2020, 9:36 AM
Gordon
Gordon - avatar
+ 1
Ok let me do it
3rd Mar 2020, 9:42 AM
Mohammad
Mohammad - avatar
+ 1
This is step 3 3.1 a function to update the display. 3.2 a function to append "1" to current expression. 3.3 onlick at HTML https://code.sololearn.com/W9Vl5uz9hNXA/?ref=app Readings about 3.3 https://code.sololearn.com/W0ehmlP2Y3I3/?ref=app https://www.sololearn.com/post/43430/?ref=app https://code.sololearn.com/Wyr76080kKxS/?ref=app From here, you can try to implement your idea of putting the number as argument to a function. I need to cook dinner now , will be back after a few hours to check your progress.
3rd Mar 2020, 9:54 AM
Gordon
Gordon - avatar
3rd Mar 2020, 12:20 PM
Mohammad
Mohammad - avatar
0
https://code.sololearn.com/WaRwohMLPNG8/?ref=app
4th Mar 2020, 1:07 PM
Martin Tembo
Martin Tembo - avatar