« first day (3144 days earlier)      last day (1789 days later) » 

12:00 AM
Good to know!
 
cant do this in one line
exports.sendMail:RequestHandler = (req:Request,res:Response) => {
not sure tho
 
12:29 AM
Not sure either. I'm definitely not an expert. :( I write mostly Vanilla JS.
 
 
1 hour later…
1:44 AM
!!> 'www.something.com'.replace('www.')
lol
 
@DavidKamer "undefinedsomething.com"
 
#useful
just for the record:
!!> 'www.something.com'.replace('www.', '')
 
@DavidKamer "something.com"
 
fingers crossed for a default param of ''
 
 
4 hours later…
5:35 AM
2 PDF open one by one, after closing second pdf, new html page click not working.Showing api canceled in network.But works fine after refresh/reload
 
@NageshDalave Welcome to the JavaScript chat! Please review the room rules. If you have a question, just post it, and if anyone's free and interested they'll help. If you want to report an abusive user or a problem in this room, visit our meta.
 
6:17 AM
can someone help me? ive been trying for days not to get a working manaregen upgrade to work
I do not understand how setinterval works
var UP_INTERVAL = 200; // 5 fps
setInterval(cookieClick, UP_INTERVAL); works but it starts going off at the start of my program. i only want the increase once you use a skill point on a upgrade
 
 
1 hour later…
7:43 AM
why am i getting error saying the "MutationObserver is not a constructor" in chrome when trying to declare it as a new object? it works fine in edge, and its supported in all browsers also according to mozilla
nevermind, i declared it as an callback function before i knew how it worked. Just needed to refresh the window and it worked
 
 
9 hours later…
5:04 PM
I just saw a construct like !function() {/*....*/} somewhere. Is the ! to immediately execute the function? I only knew (function(){})() up until now.
 
5:34 PM
@geisterfurz007 The ! is to differentiate it from a function declaration
function foo() {} function declaration. !function foo() {} function expression
The result (always false) gets discarded because it's not assigned to anything.
The normal way you generally see people using is surrounding with braces (function foo() {}) to mark it as an expression
Function declarations cannot be immediately invoked, so these tricks are needed if you want an IIFE.
 
6:21 PM
Oh!
Wait, so the ! does not run the function?
 
 
4 hours later…
10:21 PM
How do I convert the following data to an array of Objects?
{"id":7886229,"dn":"JBis","hash":"!i.stack.imgur.com/8kBbg.png?s=128&g=1";}
{"id":1128805,"dn":"jbisa","hash":"05d61e48bb8383dd08a6f369a6286b9f"}
{"id":4826991,"dn":"Jbisgood9999999","hash":"!lh3.googleusercontent.com/-zK7AwNMh0g4/AAAAAAAAAAI/AAAAAAAAACs/…;}
{"id":4559760,"dn":"JBiss","hash":"4a83dea33d0674a4e5389095509cc84c"}
{"id":8854949,"dn":"Manoj Bisarahalli","hash":"69965e456e56fbf3e33eb32de7ddcff3"}
{"id":2422621,"dn":"Manoj Bisht","hash":"!i.stack.imgur.com/M5Qtn.jpg";}
 
10:36 PM
Solved, just .split('\n')
 
 
1 hour later…
11:57 PM
@MadaraUchiha I think it's one of those things you have to do if you're writing javascript without semicolons.
 
Rules say not to repost a question right away because I didn't get an answer....but what about after a day? : )

https://stackoverflow.com/questions/56308447/find-longest-prefix-that-is-also-a-suffix-in-string-javascript/56308517?noredirect=1#comment99240453_56308517
 

« first day (3144 days earlier)      last day (1789 days later) »