« first day (4440 days earlier)      last day (514 days later) » 

12:40 AM
little question on the side
if(i < 0) {
    i = 10
}
why does this still console log a value of -1 once its less than 0, rather than setting it to 1?
do i need to parse to a different number format first?
 
 
6 hours later…
6:13 AM
and how are we supposed to know what the context looks like, exactly?
 
6:51 AM
||> i = -1;
if(i < 0) {
    i = 10
}
console.log(i);
 
@VLAZ undefined Logged: [ '10' ] Took: 0ms
@VLAZ Please don't post unformatted code - use the up arrow to edit your post, then hit Ctrl + K to format the code in that post. See the faq. You have 25 seconds to edit and format your message properly before it will be removed. Please separate code blocks from your actual question. Put your question in 1 message and then your code in a 2nd and format it.
@VLAZ undefined Logged: [ '10' ] Took: 0ms
 
|| mcve
 
We have troubles to understand and/or reproduce your problem(s). Please create a Minimal, Reproducible example which allows us to understand it better.
 
@popsmoke ^
 
 
9 hours later…
4:15 PM
0
Q: Role Based Menu Item and routing in Angular14?

its meI have an Angular(angular 14) App. below is my Header with Register, Login, Add New Employee, List of employees, update employee profile, employee profile, working hours, logout menu. If the user logs into my site and user have an Admin role, the user should see below menu items in the header. ...

please advise on this
 
 
2 hours later…
6:25 PM
If we have parent child correlation
how to pass callback from child to parent ?
 
 
1 hour later…
7:50 PM
what is the purpose?
the parent does something when the child indicates it should?
the child does something with the parent indicates it should?
 
 
3 hours later…
11:14 PM
@KevinB That's what I do and enforce too... but I came across apparently another community divide where some devs use let for all the things..
Some more "popular" members of the JS community are all about it, it's so weird to me
 
i don't follow use const by default myself
it's generally just not an important restriction in my code... given it's typescript, it's fairly strongly protected against the kinds of mistakes that prevents anyway
and... i mean... if your method of implementation is use const till it fails, then use let, then it defeats the purpose anyway!
you'll just switch to let when you make the mistake and let the mistake be a mistake
;)
 

« first day (4440 days earlier)      last day (514 days later) »