Loading...
More JavaScript Posts
results ={"11345240":"Media Comment-80e47004-1719-493a-af69-a43b2652b41c","11345282":"zoom_3_22_21.mp4","11345303":"Recording-2.m4a","11345348":"February 12%2C 2021.mp4","11345826":"Lecture_Rousso_Chapter_06-2.pptx","11345933":"Themes_InClassAssigment.pptx","11346193":"Agenda – Week of March23.pptx","11346318":"MUJS 2370 SP2021 Updated Rhythm Changes Drills Bb - Score.pdf","11346319":"MUJS 2370 SP2021 Updated Rhythm Changes Drills C - Score.pdf","11346322":"MUJS 2370 SP2021 Updated Rhythm Changes Drills Eb - Score.pdf","11346323":"MUJS 2370 Updated Rhythm Changes Drills Bass - Score.pdf","11346381":"Anthropology with colored highlighter analysis - Mar 22 2021 - 10-36 AM.pdf","11346449":"Anthropology with colored highlighter analysis - Mar 22 2021 - 10-36 AM.pdf","11346450":"MUJS 2370 SP2021 Updated Rhythm Changes Drills Bb - Score.pdf","11346451":"MUJS 2370 SP2021 Updated Rhythm Changes Drills C - Score.pdf","11346453":"MUJS 2370 SP2021 Updated Rhythm Changes Drills Eb - Score.pdf","11346454":"MUJS 2370 Updated Rhythm Changes Drills Bass - Score.pdf","11346495":"Steinel chromatic ornamentation étude rhythm changes - Aug 23 2020 - 12-19 PM.pdf","11346532":"Media Comment-136242b4-7f2c-4d5d-8aa4-091f07e797cf","11346581":"2019 Trust Based Relationship Intervention Manual.pdf","11346584":"TBRI ppt.pptx","11346593":"Trauma informed care.ppt"}function NewTab(testing) {window.open(testing, "_blank");}for(test in results) {var testing = 'https://unt.instructure.com/files/' + test + '/download';NewTab(testing);//window.open = 'https://unt.instructure.com/files/' + test + '/download';}
function formatDate(date) {return date.toLocaleDateString();}function Comment(props) {return (<div className="Comment"><div className="UserInfo"><imgclassName="Avatar"src={props.author.avatarUrl}alt={props.author.name}/><div className="UserInfo-name">{props.author.name}</div></div><div className="Comment-text">{props.text}</div><div className="Comment-date">{formatDate(props.date)}</div></div>);}const comment = {date: new Date(),text: 'I hope you enjoy learning React!',author: {name: 'Hello Kitty',avatarUrl: 'https://placekitten.com/g/64/64',},};ReactDOM.render(<Commentdate={comment.date}text={comment.text}author={comment.author}/>,document.getElementById('root'));
// Get the text that the user has selectedconst getSelectedText = () => window.getSelection().toString();getSelectedText();
const shuffle = ([...arr]) => {let m = arr.length;while (m) {const i = Math.floor(Math.random() * m--);[arr[m], arr[i]] = [arr[i], arr[m]];}return arr;};const foo = [1, 2, 3];shuffle(foo); // [2, 3, 1], foo = [1, 2, 3]
let variableSet = JSON.parse('["parent","opener","top","length","frames","closed","location","self","window","document","name","customElements","history","locationbar","menubar","personalbar","scrollbars","statusbar","toolbar","status","frameElement","navigator","origin","external","screen","innerWidth","innerHeight","scrollX","pageXOffset","scrollY","pageYOffset","visualViewport","screenX","screenY","outerWidth","outerHeight","devicePixelRatio","clientInformation","screenLeft","screenTop","defaultStatus","defaultstatus","styleMedia","onsearch",&qu...find","webkitRequestAnimationFrame","webkitCancelAnimationFrame","fetch","btoa","atob","setTimeout","clearTimeout","setInterval","clearInterval","createImageBitmap","close","focus","blur","postMessage","onappinstalled","onbeforeinstallprompt","crypto","indexedDB","webkitStorageInfo","sessionStorage","localStorage","chrome","onpointerrawupdate","speechSynthesis","webkitRequestFileSystem","webkitResolveLocalFileSystemURL","openDatabase","variableSet","TEMPORARY","PERSISTENT","addEventListener","removeEventListener","dispatchEvent"]');let answer = [];for(let v in this) if(!variableSet.includes(v)) answer.push(v);console.log(answer);
const countSubstrings = (str, searchValue) => {let count = 0,i = 0;while (true) {const r = str.indexOf(searchValue, i);if (r !== -1) [count, i] = [count + 1, r + 1];else return count;}};countSubstrings('tiktok tok tok tik tok tik', 'tik'); // 3countSubstrings('tutut tut tut', 'tut'); // 4