5@mu3l 3dn37

Digital Dumping Ground

Javascript switch with conditionals

I needed a way to keep my code clean but have lots of else-if type statements. I eventually got this working with a switch. switch (true) { //folders case obj.mimeType === ‘application/vnd.google-apps.folder’: doThis(); break; //video files case obj.mimeType.indexOf(‘video’) === 0: orDoThis(); break; }  

Google mail leak

There has been a leak of 5 million Gmail passwords. It seems now that the list is around 3 years old – but I had a lot of friends ask if their details were compromised. So I didn’t have to keep checking the file – I wrote a quick app so that you can check yourself.