blog.malwarebytes.org blog.malwarebytes.org

Maine governor signs ISP privacy bill

Less than one week after Maine Governor Janet Mills received one of the nation’s most privacy-protective state bills on her desk, she signed it into law. The move makes Maine the latest US state to implement its own online privacy protections. The law, which will go into effect July 1, 2020, blocks Internet service providers (ISPs) from selling, sharing, or granting third parties access to their customers’ data unless explicitly...

dev.to dev.to

A neat little trick with JavaScript's indexOf()

Here's a little trick I picked up while browsing through some plugins I had to edit or extend again var arr = [ 1, 2, 3, 'foo' ]; // old way if (arr.indexOf('foo') > -1) { console.log('"foo" is in "arr"!'); } // new way if (~arr.indexOf('foo')) { console.log('"foo" is in "arr"!'); } I wondered - how does that work? It's because of this little operator I never used or seen yet: The Bitwise NOT-Operator ~ It...