We need some bloated JavaScript libraries.
<!DOCTYPE html> <meta charset="utf-8"> <style> * { border-spacing:0; margin:0; padding:0; } body { width:1000000px; overflow:scroll; } </style> <script> document.write('<script src="https://code.jquery.com/jquery.js"></' + 'script>'); </script> <script> function square(n) { const $table = $('<table>').attr('border', 0).appendTo($('body')); for (let row = 0; row < n; ++row) { const $tr = $('<tr>').appendTo($table); for (let col = 0; col < n; ++col) { $('<td>').attr({width: 100, height: 100}).appendTo($tr); } } let values = []; for (const prop in $table) { if (_.includes(['width', 'height'], prop)) { values.push($table[prop].call($table)); } } return Math.round(Math.exp(_.sumBy(values, (value) => Math.log(value))) / 10000); } $(function() { $.getScript('https://unpkg.com/lodash@4.17.20/lodash.js', () => { console.log(square(4)); console.log(square(16)); console.log(square(51)); }); }) </script>
Are you sure you want to hide this comment? It will become hidden in your post, but will still be visible via the comment's permalink.
Hide child comments as well
Confirm
For further actions, you may consider blocking this person and/or reporting abuse
We're a place where coders share, stay up-to-date and grow their careers.
We need some bloated JavaScript libraries.