{"author_name":"Kureduki_Maari","title":"O(log(n)) \u306e String.prototype.repeat (JavaScript)","version":"1.0","html":"<iframe src=\"https://hatenablog-parts.com/embed?url=https%3A%2F%2Fc4se.hatenablog.com%2Fentry%2F2014%2F03%2F02%2F003653\" title=\"O(log(n)) \u306e String.prototype.repeat (JavaScript) - c4se\u8a18\uff1a\u3055\u3063\u3061\u3083\u3093\u3067\u3059\u3088\u2606\" class=\"embed-card embed-blogcard\" scrolling=\"no\" frameborder=\"0\" style=\"display: block; width: 100%; height: 190px; max-width: 500px; margin: 10px 0px;\"></iframe>","type":"rich","url":"https://c4se.hatenablog.com/entry/2014/03/02/003653","published":"2014-03-02 00:36:53","categories":["Programming","JavaScript"],"width":"100%","provider_url":"https://hatena.blog","image_url":null,"description":"C\u8a00\u8a9e\u6b74\u304c\u7121\u3044\u3082\u306e\u3067bit\u6f14\u7b97\u3092\u6b86\u3069\u4f7f\u3063\u305f\u4e8b\u304c\u7121\u304b\u3063\u305f\u304b\u3089\u3002\u51aa\u4e57\u306ealgorithm\u3060\u3002JavaScript\u306e\u6574\u6570\u5024\u306f\u6700\u5927\u306732bit (\u6841) \u3057\u304b\u7121\u3044\u3051\u3069\u306d\u3002 String.prototype.repeat = function (times) { var r; if (times <= 0) { return ''; } r = this.repeat(times >> 1); r += r; if (times & 1) { r += this; } return r; }; console.log('w'.repeat(0) === ''); console.log('w'.repea\u2026","provider_name":"Hatena Blog","author_url":"https://blog.hatena.ne.jp/Kureduki_Maari/","blog_url":"https://c4se.hatenablog.com/","height":"190","blog_title":"c4se\u8a18\uff1a\u3055\u3063\u3061\u3083\u3093\u3067\u3059\u3088\u2606"}