13 JavaScript One-Liners That’ll Make You Look Like a Pro: medium.com/dailyjs/13-jav…
@JavaScriptDaily Question: Given a real number with a decimal value, what is the quickest way to extract JUST the first digit after the decimal point? e.g., 0.396 -> 3 The number 3 is then used to specify an array element.
@JavaScriptDaily To test if an integer is odd or even, you could bit-mask it with 1, and use double exclamation marks to ensure the result is boolean: !!(number & 1); // returns true or false
@JavaScriptDaily 4 and 8. Seriously? Functions to return a bollean value that is already there? I understand that it can be obfuscated and thus you'll gain some bundle size profit but you have to use it a lot, to gain smth.
@JavaScriptDaily you know that `Number.prototype.toFixed()` is a thing, right?
@JavaScriptDaily Reverse string with emoji, be like pro