<?xml version="1.0" encoding="utf-8" standalone="yes"?>
<oembed>
  <author_name>panda_noir</author_name>
  <author_url>https://blog.hatena.ne.jp/panda_noir/</author_url>
  <blog_title>Panda Noir</blog_title>
  <blog_url>https://www.pandanoir.info/</blog_url>
  <categories>
    <anon>JavaScript</anon>
    <anon>Qiita</anon>
  </categories>
  <description>(この記事はQiitaで僕が書いたものを移行した記事です。記事中のコメントはQiitaの該当記事を参照ください) たとえばインデントをしたりゼロ詰めするときとかに使うのでメモ。 以下、strをn回繰り返した文字列をresという変数に格納するとする。 ループして生成 一番オーソドックスでなんのひねりもない、一番わかりやすい。けど謎の敗北感のあるコードです。 for (var i = 0; i &lt; n; i++) res += str; nを減らしていくという方針ならもう少し短くなります。 while (n-- &gt; 0) res += str; 若干(javascriptにはありませんが)-&gt;とい…</description>
  <height>190</height>
  <html>&lt;iframe src=&quot;https://hatenablog-parts.com/embed?url=https%3A%2F%2Fwww.pandanoir.info%2Fentry%2F2016%2F03%2F30%2F190000&quot; title=&quot;任意の文字列を任意の回数繰り返す - Panda Noir&quot; class=&quot;embed-card embed-blogcard&quot; scrolling=&quot;no&quot; frameborder=&quot;0&quot; style=&quot;display: block; width: 100%; height: 190px; max-width: 500px; margin: 10px 0px;&quot;&gt;&lt;/iframe&gt;</html>
  <image_url></image_url>
  <provider_name>Hatena Blog</provider_name>
  <provider_url>https://hatena.blog</provider_url>
  <published>2016-03-30 19:00:00</published>
  <title>任意の文字列を任意の回数繰り返す</title>
  <type>rich</type>
  <url>https://www.pandanoir.info/entry/2016/03/30/190000</url>
  <version>1.0</version>
  <width>100%</width>
</oembed>
