<?xml version="1.0" encoding="utf-8" standalone="yes"?>
<oembed>
  <author_name>potisan</author_name>
  <author_url>https://blog.hatena.ne.jp/potisan/</author_url>
  <blog_title>potisanのプログラミングメモ</blog_title>
  <blog_url>https://potisan-programming-memo.hatenablog.jp/</blog_url>
  <categories>
    <anon>JavaScript</anon>
    <anon>まとめ未登録（管理用）</anon>
  </categories>
  <description>インスタンスのconstructorプロパティでクラスのオブジェクトを取得できます。このオブジェクトを操作すればクラスのオブジェクトプロパティを操作できます。 class Class1 { static X = 123; } const a = new Class1(); console.log(a.constructor.X) //-&gt; 123 a.constructor.X = 456; console.log(a.constructor.X) //-&gt; 456 蛇足 現在のECMAScriptにはクラスか否かを判別する簡単な方法はないようです。 static {...}の中ではthisで…</description>
  <height>190</height>
  <html>&lt;iframe src=&quot;https://hatenablog-parts.com/embed?url=https%3A%2F%2Fpotisan-programming-memo.hatenablog.jp%2Fentry%2F2022%2F06%2F05%2F174732&quot; title=&quot;JavaScript クラスのインスタンスからクラスのオブジェクトを取得する - potisanのプログラミングメモ&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>2022-06-05 17:47:32</published>
  <title>JavaScript クラスのインスタンスからクラスのオブジェクトを取得する</title>
  <type>rich</type>
  <url>https://potisan-programming-memo.hatenablog.jp/entry/2022/06/05/174732</url>
  <version>1.0</version>
  <width>100%</width>
</oembed>
