-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathatom.xml
More file actions
81 lines (42 loc) · 7.82 KB
/
Copy pathatom.xml
File metadata and controls
81 lines (42 loc) · 7.82 KB
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
<?xml version="1.0" encoding="utf-8"?>
<feed xmlns="http://www.w3.org/2005/Atom">
<title>Ashes</title>
<subtitle>火死为灰</subtitle>
<link href="https://ashes1452.github.io/atom.xml" rel="self"/>
<link href="https://ashes1452.github.io/"/>
<updated>2025-11-28T14:55:45.479Z</updated>
<id>https://ashes1452.github.io/</id>
<author>
<name>Ashes</name>
</author>
<generator uri="https://hexo.io/">Hexo</generator>
<entry>
<title>Week5</title>
<link href="https://ashes1452.github.io/2025/11/28/week5/"/>
<id>https://ashes1452.github.io/2025/11/28/week5/</id>
<published>2025-11-28T07:18:44.000Z</published>
<updated>2025-11-28T14:55:45.479Z</updated>
<content type="html"><![CDATA[<h3 id="OOP"><a href="#OOP" class="headerlink" title="OOP"></a>OOP</h3><p><strong>——通过对象间的交互完成程序</strong></p><h5 id="对象Object:"><a href="#对象Object:" class="headerlink" title="对象Object:"></a>对象Object:</h5><ul><li><p>属性</p></li><li><p>方法</p><h5 id="类:"><a href="#类:" class="headerlink" title="类:"></a><em>类:</em></h5><ul><li>父类</li><li>子类(继承父类属性同时也具有父类没有的属性和方法)</li></ul></li></ul><hr><h3 id="函数式编程(FC)"><a href="#函数式编程(FC)" class="headerlink" title="函数式编程(FC)"></a>函数式编程(FC)</h3><p><strong>——用函数形式写程序</strong></p><h5 id="特点:"><a href="#特点:" class="headerlink" title="特点:"></a>特点:</h5><ul><li>不可变 <em>(创建后不修改)</em></li><li>纯函数</li><li>函数是一等公民 <em>(函数作为变量、参数和返回值)</em></li><li>高阶函数 <em>(可接受、返回函数)</em></li></ul><h5 id="js中的对象"><a href="#js中的对象" class="headerlink" title="js中的对象"></a>js中的对象</h5><ul><li><p>原型</p><ul><li><p>函数对象. <em>prototype</em> –> 原型对象</p><p>原型对象. <em>constructor</em> –> 函数对象</p></li><li><p>构造函数 => 实例对象 <em><strong>(__proto__属性)</strong></em></p><p>实例对象. <em>__proto __</em> == 构造函数. <em>prototype</em> ==原型对象</p></li></ul></li><li><p>原型链</p></li></ul><p><strong>——层层递进指向各级原型对象直至Object.prototype(null)</strong></p><figure class="highlight javascript"><table><tbody><tr><td class="gutter"><pre><span class="line">1</span><br><span class="line">2</span><br></pre></td><td class="code"><pre><span class="line"><span class="keyword">var</span> obj={}</span><br><span class="line"><span class="comment">//obj=>Object.prototype=>null</span></span><br></pre></td></tr></tbody></table></figure><p><em>延长原型链</em><br><em>——如何实现继承</em></p><ul><li><p>Object.create()</p></li><li><p>直接修改prototype属性</p></li></ul><figure class="highlight javascript"><table><tbody><tr><td class="gutter"><pre><span class="line">1</span><br><span class="line">2</span><br><span class="line">3</span><br><span class="line">4</span><br></pre></td><td class="code"><pre><span class="line"><span class="keyword">function</span> <span class="title function_">Q</span>(<span class="params"></span>){}</span><br><span class="line">Q.<span class="property"><span class="keyword">prototype</span></span>=p</span><br><span class="line"><span class="keyword">var</span> q=<span class="keyword">new</span> <span class="title function_">Q</span>()</span><br><span class="line"><span class="comment">//q=>p</span></span><br></pre></td></tr></tbody></table></figure><ul><li><p><del>Object.setPrototypeof(obj,prototype)设置__proto__属性</del></p></li><li><p>使用call和apply借用构造函数</p></li></ul><figure class="highlight javascript"><table><tbody><tr><td class="gutter"><pre><span class="line">1</span><br><span class="line">2</span><br><span class="line">3</span><br><span class="line">4</span><br><span class="line">5</span><br><span class="line">6</span><br><span class="line">7</span><br></pre></td><td class="code"><pre><span class="line"><span class="keyword">var</span> P = <span class="keyword">function</span>(<span class="params">v</span>) { </span><br><span class="line"> <span class="variable language_">this</span>.<span class="property">a</span> = v; </span><br><span class="line">};</span><br><span class="line"><span class="keyword">function</span> <span class="title function_">Q</span>(<span class="params">v</span>) { </span><br><span class="line"> P.<span class="title function_">call</span>(<span class="variable language_">this</span>, v); </span><br><span class="line">}</span><br><span class="line"><span class="keyword">var</span> q = <span class="keyword">new</span> <span class="title function_">Q</span>(<span class="number">2</span>);</span><br></pre></td></tr></tbody></table></figure><p><em>可通过instanceof判断一个构造函数的prototype是否在原型链中</em></p><hr><h3 id="图解HTTPS"><a href="#图解HTTPS" class="headerlink" title="图解HTTPS"></a>图解HTTPS</h3>]]></content>
<summary type="html"><h3 id="OOP"><a href="#OOP" class="headerlink" title="OOP"></a>OOP</h3><p><strong>——通过对象间的交互完成程序</strong></p>
<h5 id="对象Object:"><a href="#对</summary>
</entry>
<entry>
<title>梯子别挂了</title>
<link href="https://ashes1452.github.io/2025/11/28/Blog2/"/>
<id>https://ashes1452.github.io/2025/11/28/Blog2/</id>
<published>2025-11-28T05:18:44.000Z</published>
<updated>2025-11-28T15:02:34.040Z</updated>
<content type="html"><![CDATA[<h3 id="别报错了"><a href="#别报错了" class="headerlink" title="别报错了"></a>别报错了</h3><p>别报错了别报错了别报错了别报错了别报错了别报错了别报错了</p><p>别报错了别报错了别报错了别报错了别报错了别报错了别报错了</p><p>别报错了别报错了别报错了别报错了别报错了别报错了别报错了</p><p>别报错了别报错了别报错了别报错了别报错了别报错了别报错了</p><p>别报错了别报错了别报错了别报错了别报错了别报错了别报错了</p>]]></content>
<summary type="html"><h3 id="别报错了"><a href="#别报错了" class="headerlink" title="别报错了"></a>别报错了</h3><p>别报错了别报错了别报错了别报错了别报错了别报错了别报错了</p>
<p>别报错了别报错了别报错了别报错了别报错了别报错了别报</summary>
</entry>
<entry>
<title>你们要努力进窄门</title>
<link href="https://ashes1452.github.io/2025/11/28/MyFirstBlog/"/>
<id>https://ashes1452.github.io/2025/11/28/MyFirstBlog/</id>
<published>2025-11-28T05:18:44.000Z</published>
<updated>2025-11-28T07:16:44.054Z</updated>
<content type="html"><![CDATA[<h3 id="我至今没有写出诗"><a href="#我至今没有写出诗" class="headerlink" title="我至今没有写出诗"></a>我至今没有写出诗</h3><p>我们白白地给了你浩瀚的海洋,<br>白白地给了你惠特曼见了惊异的太阳:<br>你消磨了岁月,岁月也消磨了你,<br>你至今没有写出诗。</p>]]></content>
<summary type="html"><h3 id="我至今没有写出诗"><a href="#我至今没有写出诗" class="headerlink" title="我至今没有写出诗"></a>我至今没有写出诗</h3><p>我们白白地给了你浩瀚的海洋,<br>白白地给了你惠特曼见了惊异的太阳:<br>你消磨了岁月,</summary>
</entry>
</feed>