• Aug 30, 2024 •C S
1 like • 18 views
# Acronyms ## Computer Numerical Control (CNC) - Typicalldfdfsdffdafdasgfdgfgfdfdafdasfdafda
• Feb 21, 2025 •leafboo
0 likes • 2 views
console.log("hello world")
• Nov 19, 2022 •CodeCatch
0 likes • 0 views
const primes = num => { let arr = Array.from({ length: num - 1 }).map((x, i) => i + 2), sqroot = Math.floor(Math.sqrt(num)), numsTillSqroot = Array.from({ length: sqroot - 1 }).map((x, i) => i + 2); numsTillSqroot.forEach(x => (arr = arr.filter(y => y % x !== 0 || y === x))); return arr; }; primes(10); // [2, 3, 5, 7]
0 likes • 3 views
const linearSearch = (arr, item) => { for (const i in arr) { if (arr[i] === item) return +i; } return -1; }; linearSearch([2, 9, 9], 9); // 1 linearSearch([2, 9, 9], 7); // -1
• Feb 6, 2021 •LeifMessinger
class SequentialQueue{ //if you want it to go backwards, too bad next(){ return this.i++; } constructor(start = 0){ this.i = start; } } const que = new SequentialQueue(0); for(let i = 0; i < 10; i++){ console.log(que.next()); }
function Clock(props) { return ( <div> <h1>Hello, world!</h1> <h2>It is {props.date.toLocaleTimeString()}.</h2> </div> ); } function tick() { ReactDOM.render( <Clock date={new Date()} />, document.getElementById('root') ); } setInterval(tick, 1000);