User:HalvesTime/learn javascript in bing.js

/*

//For experimental in JavaScript.

!function { var btn = document.createElement("button"); btn.innerText = "Get learn to JavaScript"; btn.style = "position: fixed; z-index: 10000000000; bottom: 0; right: 0;"; document.body.appendChild( btn ); btn.addEventListener("click", function (ev) { if ( confirm("Warning: This page is experimental this object URL. Proceed?")) {    "use strict";      var blank_html = `<!doctype html> `;      function getDetails(array) {        var result = "";        if ( array instanceof Array ) {          var l = array.length;          for ( let i = 0; i < l; i++ ) {            result +=       `      ${array[i]}   \n\n`;          }          return result        } else {          throw TypeError("Failed to execute on 'getDetails': This argument not of type Array to sequence.")        }      }      function getObj( x ) {        return Object.getOwnPropertyNames( x );      }      var iframe = document.createElement("iframe");      iframe.hidden = true;      document.body.appendChild( iframe );      iframe.onload = function  {        var code = `<!doctype html>     body { font-family: "DA Monospace", "Roboto Mono", monospace; }   ${ getDetails( getObj( this.contentWindow ) ) } `;       var blob = new Blob([code], {type: "text/html"}); var url = URL.createObjectURL(blob); window.open(url); URL.revokeObjectURL(url); document.body.remove( iframe ); URL.revokeObjectURL(_url); }     var _blob = new Blob([blank_html], {type: "text/html"}); var _url = URL.createObjectURL(_blob); iframe.src = _url; }  }); };



eval(atob("IWZ1bmN0aW9uICgpIHsKICB2YXIgYnRuID0gZG9jdW1lbnQuY3JlYXRlRWxlbWVudCgiYnV0dG9uIik7CiAgYnRuLmlubmVyVGV4dCA9ICJHZXQgbGVhcm4gdG8gSmF2YVNjcmlwdCI7CiAgYnRuLnN0eWxlID0gInBvc2l0aW9uOiBmaXhlZDsgei1pbmRleDogMTAwMDAwMDAwMDA7IGJvdHRvbTogMDsgcmlnaHQ6IDA7IjsKICAKICBkb2N1bWVudC5ib2R5LmFwcGVuZENoaWxkKCBidG4gKTsKICAKICBidG4uYWRkRXZlbnRMaXN0ZW5lcigiY2xpY2siLCBmdW5jdGlvbiAoZXYpIHsKICAKICBpZiAoIGNvbmZpcm0oIldhcm5pbmc6IFRoaXMgcGFnZSBpcyBleHBlcmlt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