質問するログイン新規登録

質問編集履歴

1

追加

2016/05/16 10:15

投稿

re97
re97

スコア208

title CHANGED
File without changes
body CHANGED
@@ -1,6 +1,8 @@
1
1
  **document.location実行するとLocationオブジェクトを取得すると思うのですが、その際、new Stringすると、なぜ下記のような結果になるのでしょうか?**
2
2
  ・Locationオブジェクトのhrefプロパティを分割してオブジェクトへ格納するという決まりがあるのでしょうか?
3
3
  ```javascript
4
+ new String(document.location);
5
+ //結果
4
6
  String {0: "h", 1: "t", 2: "t", 3: "p", 4: ":", 5: "/", 6: "/", (中略), length: ××, [[PrimitiveValue]]: "https://teratail.com/"}
5
7
  ```
6
8
  ---