<?xml version="1.0" encoding="utf-8" standalone="yes"?>
<oembed>
  <author_name>shigemk2</author_name>
  <author_url>https://blog.hatena.ne.jp/shigemk2/</author_url>
  <blog_title>by shigemk2</blog_title>
  <blog_url>https://www.shigemk2.com/</blog_url>
  <categories>
    <anon>JavaScript</anon>
  </categories>
  <description>指定範囲の整数からランダムに1つ選ぶ - JavaScript TIPSふぁくとりー0 から 99までの乱数を取得したいときは、1. Math.random()を利用して、0-1未満の少数を取得する 2. 1に100をかける。 3. Math.floor()を利用して、少数点を切り捨てる。こんな感じです。 なお、0-49とかにしたい場合は、100ではなく50をかけたらいいし、 30-49とかにしたい場合は、3まで計算したあとに30足せばよい。そう、こういう風に。 console.log(Math.floor( Math.random() * 100 )); // 0-99のうちのどれか con…</description>
  <height>190</height>
  <html>&lt;iframe src=&quot;https://hatenablog-parts.com/embed?url=https%3A%2F%2Fwww.shigemk2.com%2Fentry%2F20121227%2F1356536677&quot; title=&quot;乱数を取る on JavaScript - by shigemk2&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>2012-12-27 00:44:37</published>
  <title>乱数を取る on JavaScript</title>
  <type>rich</type>
  <url>https://www.shigemk2.com/entry/20121227/1356536677</url>
  <version>1.0</version>
  <width>100%</width>
</oembed>
