Re: JavaScript Problems

2020-11-13 Thread AudioGames . net Forum — Developers room : kaigoku via Audiogames-reflector
Re: _javascript_ Problems _javascript_ is so tricky! I think you'll find yourself banging your head against the wall a few times because of things like hoisting, scope, execution context, etc. Also, "use strict" might help with unpredictability a bit. I too come from low level background

Re: JavaScript Problems

2020-11-13 Thread AudioGames . net Forum — Developers room : Dragonlee via Audiogames-reflector
Re: _javascript_ Problems I second using eslint. It is very easy to install just using npm and integrates really nicely with VS code. URL: https://forum.audiogames.net/post/589448/#p589448 -- Audiogames-reflector mailing list Audiogames-reflector@sabahattin-gucukoglu.com

Re: JavaScript Problems

2020-11-13 Thread AudioGames . net Forum — Developers room : camlorn via Audiogames-reflector
Re: _javascript_ Problems To be honest, I'd have just started with React to begin with.  Also, eslint can check your code for a lot of mistakes and is just an npm install eslint and about 5 minutes of setup away.Problem is that what you're trying to do here is actually hard, because in

Re: JavaScript Problems

2020-11-13 Thread AudioGames . net Forum — Developers room : Dark Eagle via Audiogames-reflector
Re: _javascript_ Problems Okay, the event click didn't worked, and I didn't found anything on MDN either. (Strange since I have been able to solve most of the problems by looking there...)Also, I knew when I set out to learn a language with dynamic typing, I would have some trouble.as for

Re: JavaScript Problems

2020-11-13 Thread AudioGames . net Forum — Developers room : Dragonlee via Audiogames-reflector
Re: _javascript_ Problems also these lines almost certainly don't do what you expect:    if (todo !== undefined) {        todo.completed != todo.completed    }I think what you want to do is set todo.completed to its opposite. instead here you are using the != operator which compares two

Re: JavaScript Problems

2020-11-12 Thread AudioGames . net Forum — Developers room : pauliyobo via Audiogames-reflector
Re: _javascript_ Problems I think the event you're looking for, is click. URL: https://forum.audiogames.net/post/589236/#p589236 -- Audiogames-reflector mailing list Audiogames-reflector@sabahattin-gucukoglu.com

Re: JavaScript Problems

2020-11-12 Thread AudioGames . net Forum — Developers room : camlorn via Audiogames-reflector
Re: _javascript_ Problems Most events in HTML happen after a state change.  In your case, I think you just need to record the state change in the event handler and not do anything else with it.  If you really want to be able to stop the checkbox from changing I believe that can be done

Re: JavaScript Problems

2020-11-12 Thread AudioGames . net Forum — Developers room : Dark Eagle via Audiogames-reflector
Re: _javascript_ Problems What can I do to fix this? URL: https://forum.audiogames.net/post/589182/#p589182 -- Audiogames-reflector mailing list Audiogames-reflector@sabahattin-gucukoglu.com https://sabahattin-gucukoglu.com/cgi-bin/mailman/listinfo/audiogames-reflector

Re: JavaScript Problems

2020-11-12 Thread AudioGames . net Forum — Developers room : Dark Eagle via Audiogames-reflector
Re: _javascript_ Problems Okay, so I wanted to have a dynamic checkbox for each items on a particular page. I didn't have any problems achieveing that.however, I am having trouble with changing the state. The checkbox would either remain checked, or unchecked, and clicking on it will not

Re: JavaScript Problems

2020-11-12 Thread AudioGames . net Forum — Developers room : camlorn via Audiogames-reflector
Re: _javascript_ Problems I'm 99% sure that it's because the keyboard already toggles it when you check it, then your event listener is toggling it back. URL: https://forum.audiogames.net/post/589175/#p589175 -- Audiogames-reflector mailing list

Re: JavaScript Problems

2020-11-12 Thread AudioGames . net Forum — Developers room : Dark Eagle via Audiogames-reflector
Re: _javascript_ Problems Okay, so I wanted to have a dynamic checkbox for each items on a particular page. I didn't have any problems achieveing that.however, I am having trouble with changing the state. The checkbox would either remain checked, or unchecked, and clicking on it will not

Re: JavaScript Problems

2020-08-05 Thread AudioGames . net Forum — Developers room : Dragonlee via Audiogames-reflector
Re: _javascript_ Problems You might have an easier time writing code and catching dumb little bugs like this if you use something like vs code. It is great for js and html out of the box. Also typescript once you transition to it once you start using node.js.press alt + f8 to jump to next

Re: JavaScript Problems

2020-08-05 Thread AudioGames . net Forum — Developers room : Dark Eagle via Audiogames-reflector
Re: _javascript_ Problems I... I'll just go murder myself... URL: https://forum.audiogames.net/post/558622/#p558622 -- Audiogames-reflector mailing list Audiogames-reflector@sabahattin-gucukoglu.com https://sabahattin-gucukoglu.com/cgi-bin/mailman/listinfo/audiogames-reflector

Re: JavaScript Problems

2020-08-05 Thread AudioGames . net Forum — Developers room : amerikranian via Audiogames-reflector
Re: _javascript_ Problems No, it’s not wrong. Look up formatted strings, that should get you close to what C has. URL: https://forum.audiogames.net/post/558603/#p558603 -- Audiogames-reflector mailing list Audiogames-reflector@sabahattin-gucukoglu.com

Re: JavaScript Problems

2020-08-05 Thread AudioGames . net Forum — Developers room : Ty via Audiogames-reflector
Re: _javascript_ Problems You appear to have forgotten the function keyword. URL: https://forum.audiogames.net/post/558600/#p558600 -- Audiogames-reflector mailing list Audiogames-reflector@sabahattin-gucukoglu.com

Re: JavaScript Problems

2020-08-05 Thread AudioGames . net Forum — Developers room : Dark Eagle via Audiogames-reflector
Re: _javascript_ Problems @8:You would be right that I am kind of coming at the JS as a backward.As soon as I'm done with the language basics, I'll move on to node, since that's what I'm after anyway.Now, another problem:the code below gives me uncaught syntax error: illegal return

Re: JavaScript Problems

2020-08-04 Thread AudioGames . net Forum — Developers room : camlorn via Audiogames-reflector
Re: _javascript_ Problems @7There's nothing to get used to.  It seems like there is, but there isn't.  The only real difference is that you aren't writing the types.  If you're actually putting different types in the same variable that's bad practice and you shouldn't.If you really want

Re: JavaScript Problems

2020-08-04 Thread AudioGames . net Forum — Developers room : Dark Eagle via Audiogames-reflector
Re: _javascript_ Problems To be honest though, I come from c, and a lot of the times I feel this language is doing something which flies in the face of what I learned previously.For example, I'm used to variables with specific datatypes, not these dynamic ones, I suspect it'll take me a

Re: JavaScript Problems

2020-08-04 Thread AudioGames . net Forum — Developers room : Lucas1853 via Audiogames-reflector
Re: _javascript_ Problems @5: Yeah that will be an issue with numbers that are not single-digit. _javascript_ is too permissive IMO, and that can cause strange behaviors:"2" < "4" => true "3" > "1" => true "11" < "3" => true "16" > "3" => falseThe reason for this is that string comparisons

Re: JavaScript Problems

2020-08-04 Thread AudioGames . net Forum — Developers room : chrisnorman7 via Audiogames-reflector
Re: _javascript_ Problems Aren't we ignoring here that a and b are both strings, because that's what prompt produces? URL: https://forum.audiogames.net/post/558175/#p558175 -- Audiogames-reflector mailing list Audiogames-reflector@sabahattin-gucukoglu.com

Re: JavaScript Problems

2020-08-03 Thread AudioGames . net Forum — Developers room : camlorn via Audiogames-reflector
Re: _javascript_ Problems Protip: Math.min exists.  Also:function min(a, b) { return a < b ? a : b; }The ternary operator has its uses. URL: https://forum.audiogames.net/post/557990/#p557990 -- Audiogames-reflector mailing list Audiogames-reflector@sabahattin-gucukoglu.com

Re: JavaScript Problems

2020-08-03 Thread AudioGames . net Forum — Developers room : Dark Eagle via Audiogames-reflector
Re: _javascript_ Problems Okay, after embarrassing myself a lot, I finally caught the mistakes, and learned a valuable way for checking errors in the process.Thanks for the tip Camlorn, the code works now, I can move forward finally. URL: https://forum.audiogames.net/post/557970/#p557970

Re: JavaScript Problems

2020-08-03 Thread AudioGames . net Forum — Developers room : camlorn via Audiogames-reflector
Re: _javascript_ Problems Start by opening the console.  In firefox this is ctrl+shift+k.  If there are errors, they will go there. URL: https://forum.audiogames.net/post/557894/#p557894 -- Audiogames-reflector mailing list Audiogames-reflector@sabahattin-gucukoglu.com

JavaScript Problems

2020-08-03 Thread AudioGames . net Forum — Developers room : Dark Eagle via Audiogames-reflector
_javascript_ Problems So, I so far didn't have much trouble with JS, but functions are giving me some trouble.Mainly, I want to check two numbers, and return the lesser of the two numbers, (A basic task,) but I can't seem to get it to work.At first, I realized that I wasn't even using the