Yearly Archives: 2021

Home|2021

JavaScript Interview Prep Practice Problems Part 2

Part 1 function getTotal() { //convert object to an array var args = Array.prototype.slice.call(arguments); if (args.length === 2) { return args[0] + args[1]; } else if (args.length === 1) { return function(num2) { return args[0] + num2; }; } } console.log(getTotal(10, 20)); console.log(getTotal(5, 40)); console.log(getTotal(3)(30)); console.log(getTotal(8)(12)); Output: 30 45 33 20 Process finished

By |2021-03-06T03:42:00-04:00March 6th, 2021|JavaScript|0 Comments

JavaScript Interview Prep Practice Problems Part 1

Part 2 An IIFE (Immediately Invoked Function Expression) is a JavaScript function that runs as soon as it is defined. (function doubleNumber(num) { return num * 2; })(10); (function () { function getTotal(a, b) { return a + b; } var $ = 'currency'; if (true) console.log('hello world'); })(); Create 5

By |2021-03-06T03:41:46-04:00March 3rd, 2021|JavaScript|0 Comments

浮生遺夢

浮生遗梦 细呷温酒 书卷半画浮生一笔 纸未乾拂袖河山 纵笔江川赋此间一抹丹砂 清狂 兰亭袅袅入凡尘行书以鉴当琼月锋毫冽冽提宫阙白绢为约伊人决 苍鸟扶之青云兮青塚暮而依别离羁鹰坠羽寻芜兮封笔沉沙而渺娉 伏案倾旧卷恍若遗梦 琴瑟婉尘中千叹 何人语堪惟作一介 寒白衫 清冽酒坛散一梦惊世长安仙燕谷轻轻拙荆唤传以九幽何回荡

By |2021-01-10T13:20:07-04:00January 9th, 2021|Ancientry, Rita|4 Comments
Go to Top