Skip to content

Tag: javascript

Get max / min from array of strings (javascript)

Any ideas to calculate min / max from array of strings? So far i have considered to use .sort() function depending max / min, and get first element of result. But maybe you know better preforming solution? EDIT: Array size is below 1k elements. By Min /max i meant alphabetic sort: first and last element. Answ…

How to fetch .json data from URL?

I have problem with fetching data from URL. When I write data inside of a file, app works great, but when I try to call same data from URL, I get error. I made a test with small app where everything was inside of a App.js file, and it worked. But new app is kinda devided in multiple files, and

Why am I getting this deprecated warning?! MongoDB

I’m working with MongoDB in NodeJS, and when the last c.getUser statement is executed (that’s to say, when I make a SECOND connectio) Mongodb outputs this warning: But I’m not using any deprecated options. Any ideas? EDIT After a little discussion with molank in the comments, it looks like o…