I've created a calculator. | Sololearn: Learn to code for FREE!
Nouvelle formation ! Tous les codeurs devraient apprendre l'IA générative !
Essayez une leçon gratuite
16th Jun 2017, 12:50 PM
M. Oly Mahmud
M. Oly Mahmud - avatar
26 Réponses
+ 17
Congratz 🎂
16th Jun 2017, 12:54 PM
NimWing Yuan
NimWing Yuan - avatar
16th Jun 2017, 1:02 PM
Ranjan Bagri
Ranjan Bagri - avatar
+ 8
... and functionality, what is the </invisible> tag and why it is putted inside the JS code? It causes a console error..
18th Jun 2017, 4:06 PM
Maz
Maz - avatar
+ 7
@rishita: your calculator posted on last 5 hours but @M. Oly Mahmud posted on last 10 hours You should NOT COPY and PASTE yourcode🙁🙁
17th Jun 2017, 1:50 PM
Nithiwat
Nithiwat - avatar
+ 6
good work ,creatives🤓🤓🤓
17th Jun 2017, 1:02 PM
Nithiwat
Nithiwat - avatar
+ 6
You can surely do better, especially in code presentation/readability ;)
18th Jun 2017, 3:18 PM
visph
visph - avatar
+ 6
@Πέτρος ΠΔ wrote: << fixed the errors >> Not at all ^^ You've retrieved the <invisible> tag pointed by Maz, but whatelse? Some advices: - Insert line breaks and indent your code for better readability (even for you, that makes appear obvious errors :P) - Use many <script> tags only if necessary for logic/readability - Use lowercase for all tag names (except for the <!DOCTYPE> one -- not a "real" Html tag) - Use spaces in your JS code (and <script> tag doesnt require attributes in Html5 (there's only JS available) - Benefit of code playground tabs features and put your JS code in the dedicated one (also for CSS in its own dedicated tag -- they are silently linked to the head section) - Don't use 'align' attribute and most of all html attributes and tags related to styling, rather use Css - Prefer declare explicitly your JS variables, rather than let them been implicitly declared (use keyword 'var' once before each variable name in each variable scope (actually you're implicitly use only global vars, even they are use inside your functions... it doesn't really matter in this case, but could frequently be source of problems ^^) Fixed and indented code (minimal spaced/lines breaked JS; not 'style' tag: avoided as only one rule, so inlined with 'style' attribute but avoid it use -- to reserv to JS access): https://code.sololearn.com/WQFMap79IfF7/?ref=app
20th Jun 2017, 5:40 AM
visph
visph - avatar
+ 5
I love it! It's a lot better than mine...
16th Jun 2017, 12:56 PM
Caleb Jore
Caleb Jore - avatar
+ 4
Quite good idea of implementation :) However, 'eval()' function is considerated unsafe as could be roundabout by user... So, you can make it a few safer by disabling your text fiel answer <input> (<input disabled ...>), or use another non-editable container element as generic <div>, and rather use of 'value' attribute, use 'innerHTML' one, or simply 'textContent' one in case of raw text update without requiring Html parsing ^^ https://developer.mozilla.org/en-US/docs/Web/API/Node/textContent
16th Jun 2017, 11:00 PM
visph
visph - avatar
+ 4
@rishita: As you've posted here by error and reposted in the right thread, you can now delete your post from here ^^
17th Jun 2017, 1:44 PM
visph
visph - avatar
+ 3
Nice code. You can also have a look into this one https://code.sololearn.com/W110GUL9VrfS/?ref=app
16th Jun 2017, 12:59 PM
Siddharth Saraf
+ 3
@Ňıþhįwæţ ß.: He say in his thread that he had written it himself, without << consult any previous presentation before making my work >> ^^
17th Jun 2017, 1:54 PM
visph
visph - avatar
+ 3
i made one too https://code.sololearn.com/W5NguCieJgrF/?ref=app dont judge from the date its uploaded for over two months
18th Jun 2017, 2:57 PM
Petros Papageorgiou
Petros Papageorgiou - avatar
+ 2
This calculator seems familiar 🤔
16th Jun 2017, 12:57 PM
Calviղ
Calviղ - avatar
+ 2
I don't have been, I'm not and and probably will never be a Facebook member ;P
17th Jun 2017, 5:43 AM
visph
visph - avatar
+ 2
cool, i need learn to make it
17th Jun 2017, 12:37 PM
SOKTO isme
SOKTO isme - avatar
+ 2
17th Jun 2017, 12:59 PM
visph
visph - avatar
+ 2
i fixed the errors
19th Jun 2017, 7:28 AM
Petros Papageorgiou
Petros Papageorgiou - avatar
+ 2
god damn thanks
20th Jun 2017, 8:57 PM
Petros Papageorgiou
Petros Papageorgiou - avatar
+ 1
I've created an operating system xD
16th Jun 2017, 3:07 PM
ti.
ti. - avatar