class chainGame { /** * * @param {Array} hands two players hands. e.g. [1,2] * @param {Array} symbols symbols of the game */ constructor(hands, symbols) { this.hands = hands this.symbols = symbols } […]Read More
if (true) { const a="yes" } else { const a="no" } console.log(a); //throw an error that a is not definedRead More
//three ways of writing a method function for an object const temp = { name:"dallas", method1:function(){ console.log(this.name); //dallas }, method2() { console.log(this.name); //dallas }, method3:()=>{ console.log(this.name); //undefined } […]Read More
function myWait (){ return (() => { return new Promise(function (resolve) { function Callback() { resolve("All right sparkly"); }; […]Read More
I run my own mail server but I want to use smtp.sendgrid.net to send mails so I can see whether my mails are delivered and opened. Windows 10 Mail is a great app, except that it doesn’t work. Microsoft is stupid. It will create a program with critical bugs but will never correct it. Here […]Read More