-
Notifications
You must be signed in to change notification settings - Fork 0
/
jsexer2-ans.html
1 lines (1 loc) · 31 KB
/
jsexer2-ans.html
1
<!-- build time:Sat Jun 29 2019 22:18:03 GMT+0800 (GMT+08:00) --><!DOCTYPE html><html class="theme-next pisces use-motion" lang="zh-Hans"><head><meta name="generator" content="Hexo 3.8.0"><meta charset="UTF-8"><meta http-equiv="X-UA-Compatible" content="IE=edge"><meta name="viewport" content="width=device-width,initial-scale=1,maximum-scale=1"><meta name="theme-color" content="#222"><script src="/lib/pace/pace.min.js?v=1.0.2"></script><link href="/lib/pace/pace-theme-mac-osx.min.css?v=1.0.2" rel="stylesheet"><meta http-equiv="Cache-Control" content="no-transform"><meta http-equiv="Cache-Control" content="no-siteapp"><meta name="google-site-verification" content="9WuQ1WJ1aHso1UidwWUbTJDopjLU1khin8oZmteflHA"><meta name="baidu-site-verification" content="d7gUtvPjpf"><meta name="360-site-verification" content="be44f90663e3289db63a4079896aab82"><link href="/lib/fancybox/source/jquery.fancybox.css?v=2.1.5" rel="stylesheet" type="text/css"><link href="/lib/font-awesome/css/font-awesome.min.css?v=4.6.2" rel="stylesheet" type="text/css"><link href="/css/main.css?v=5.1.4" rel="stylesheet" type="text/css"><link rel="apple-touch-icon" sizes="180x180" href="/images/apple-touch-icon-next.png?v=5.1.4"><link rel="icon" type="image/png" sizes="32x32" href="/images/favicon-32x32-next.png?v=5.1.4"><link rel="icon" type="image/png" sizes="16x16" href="/images/favicon-16x16-next.png?v=5.1.4"><link rel="mask-icon" href="/images/logo.svg?v=5.1.4" color="#222"><meta name="keywords" content="javascript,web前端,前端面试题,js练习题答案,Array,"><meta name="description" content="本篇文章是js基础练习题第二天的答案及解析部分,纯题目部分请移步js基础练习题 第2天"><meta name="keywords" content="javascript,web前端,前端面试题,js练习题答案,Array"><meta property="og:type" content="article"><meta property="og:title" content="js练习题第2天 答案及解析"><meta property="og:url" content="https://www.jealyn.top/jsexer2-ans.html"><meta property="og:site_name" content="Jealyn的个人网站"><meta property="og:description" content="本篇文章是js基础练习题第二天的答案及解析部分,纯题目部分请移步js基础练习题 第2天"><meta property="og:locale" content="zh-Hans"><meta property="og:updated_time" content="2019-04-03T10:22:12.000Z"><meta name="twitter:card" content="summary"><meta name="twitter:title" content="js练习题第2天 答案及解析"><meta name="twitter:description" content="本篇文章是js基础练习题第二天的答案及解析部分,纯题目部分请移步js基础练习题 第2天"><script type="text/javascript" id="hexo.configurations">var NexT=window.NexT||{},CONFIG={root:"/",scheme:"Pisces",version:"5.1.4",sidebar:{position:"left",display:"post",offset:12,b2t:!1,scrollpercent:!1,onmobile:!1},fancybox:!0,tabs:!0,motion:{enable:!0,async:!1,transition:{post_block:"fadeIn",post_header:"slideDownIn",post_body:"slideDownIn",coll_header:"slideLeftIn",sidebar:"slideUpIn"}},duoshuo:{userId:"0",author:"博主"},algolia:{applicationID:"",apiKey:"",indexName:"",hits:{per_page:10},labels:{input_placeholder:"Search for Posts",hits_empty:"We didn't find any results for the search: ${query}",hits_stats:"${hits} results found in ${time} ms"}}}</script><link rel="canonical" href="https://www.jealyn.top/jsexer2-ans.html"><title>js练习题第2天 答案及解析 | Jealyn的个人网站</title></head><body itemscope itemtype="http://schema.org/WebPage" lang="zh-Hans"><div class="container sidebar-position-left page-post-detail"><div class="headband"></div><a href="https://github.com/jealyn" class="github-corner" aria-label="View source on GitHub"><svg width="80" height="80" viewbox="0 0 250 250" style="fill:#151513;color:#fff;position:absolute;top:0;border:0;right:0;z-index:999" aria-hidden="true"><path d="M0,0 L115,115 L130,115 L142,142 L250,250 L250,0 Z"/><path d="M128.3,109.0 C113.8,99.7 119.0,89.6 119.0,89.6 C122.0,82.7 120.5,78.6 120.5,78.6 C119.2,72.0 123.4,76.3 123.4,76.3 C127.3,80.9 125.5,87.3 125.5,87.3 C122.9,97.6 130.6,101.9 134.4,103.2" fill="currentColor" style="transform-origin:130px 106px" class="octo-arm"/><path d="M115.0,115.0 C114.9,115.1 118.7,116.5 119.8,115.4 L133.7,101.6 C136.9,99.2 139.9,98.4 142.2,98.6 C133.8,88.0 127.5,74.4 143.8,58.0 C148.5,53.4 154.0,51.2 159.7,51.0 C160.3,49.4 163.2,43.6 171.4,40.1 C171.4,40.1 176.1,42.5 178.8,56.2 C183.1,58.6 187.2,61.8 190.9,65.4 C194.5,69.0 197.7,73.2 200.1,77.6 C213.8,80.2 216.3,84.9 216.3,84.9 C212.7,93.1 206.9,96.0 205.4,96.6 C205.1,102.4 203.0,107.8 198.3,112.5 C181.9,128.9 168.3,122.5 157.7,114.1 C157.9,116.9 156.7,120.9 152.7,124.9 L141.0,136.5 C139.8,137.7 141.6,141.9 141.8,141.8 Z" fill="currentColor" class="octo-body"/></svg></a><style>.github-corner:hover .octo-arm{animation:octocat-wave 560ms ease-in-out}@keyframes octocat-wave{0%,100%{transform:rotate(0)}20%,60%{transform:rotate(-25deg)}40%,80%{transform:rotate(10deg)}}@media (max-width:500px){.github-corner:hover .octo-arm{animation:none}.github-corner .octo-arm{animation:octocat-wave 560ms ease-in-out}}</style><header id="header" class="header" itemscope itemtype="http://schema.org/WPHeader"><div class="header-inner"><div class="site-brand-wrapper"><div class="site-meta"><div class="custom-logo-site-title"><a href="/" class="brand" rel="start"><span class="logo-line-before"><i></i></span> <span class="site-title">Jealyn的个人网站</span> <span class="logo-line-after"><i></i></span></a></div><h1 class="site-subtitle" itemprop="description">我的前端后花园</h1></div><div class="site-nav-toggle"><button><span class="btn-bar"></span> <span class="btn-bar"></span> <span class="btn-bar"></span></button></div></div><nav class="site-nav"><ul id="menu" class="menu"><li class="menu-item menu-item-home"><a href="/" rel="section"><i class="menu-item-icon fa fa-fw fa-home"></i><br>首页</a></li><li class="menu-item menu-item-about"><a href="/about/" rel="section"><i class="menu-item-icon fa fa-fw fa-user"></i><br>关于</a></li><li class="menu-item menu-item-题目征集"><a href="/collect-exercise/" rel="section"><i class="menu-item-icon fa fa-fw fa-heartbeat"></i><br>题目征集</a></li><li class="menu-item menu-item-tags"><a href="/tags/" rel="section"><i class="menu-item-icon fa fa-fw fa-tags"></i><br>标签</a></li><li class="menu-item menu-item-categories"><a href="/categories/" rel="section"><i class="menu-item-icon fa fa-fw fa-th"></i><br>分类</a></li><li class="menu-item menu-item-archives"><a href="/archives/" rel="section"><i class="menu-item-icon fa fa-fw fa-archive"></i><br>归档</a></li><li class="menu-item menu-item-search"><a href="javascript:;" class="popup-trigger"><i class="menu-item-icon fa fa-search fa-fw"></i><br>搜索</a></li></ul><div class="site-search"><div class="popup search-popup local-search-popup"><div class="local-search-header clearfix"><span class="search-icon"><i class="fa fa-search"></i> </span><span class="popup-btn-close"><i class="fa fa-times-circle"></i></span><div class="local-search-input-wrapper"><input autocomplete="off" placeholder="搜索..." spellcheck="false" type="text" id="local-search-input"></div></div><div id="local-search-result"></div></div></div></nav></div></header><main id="main" class="main"><div class="main-inner"><div class="content-wrap"><div id="content" class="content"><div id="posts" class="posts-expand"><article class="post post-type-normal" itemscope itemtype="http://schema.org/Article"><div class="post-block"><link itemprop="mainEntityOfPage" href="https://www.jealyn.top/jsexer2-ans.html"><span hidden itemprop="author" itemscope itemtype="http://schema.org/Person"><meta itemprop="name" content="jealyn.wang"><meta itemprop="description" content="前端小白一枚"><meta itemprop="image" content="/images/avatar.png"></span><span hidden itemprop="publisher" itemscope itemtype="http://schema.org/Organization"><meta itemprop="name" content="Jealyn的个人网站"></span><header class="post-header"><h2 class="post-title" itemprop="name headline">js练习题第2天 答案及解析</h2><div class="post-meta"><span class="post-time"><span class="post-meta-item-icon"><i class="fa fa-calendar-o"></i> </span><span class="post-meta-item-text"></span> <time title="创建于" itemprop="dateCreated datePublished" datetime="2019-03-04T14:23:49+08:00">2019-03-04 </time></span><span class="post-category"><span class="post-meta-divider">|</span> <span class="post-meta-item-icon"><i class="fa fa-folder-o"></i> </span><span class="post-meta-item-text"></span> <span itemprop="about" itemscope itemtype="http://schema.org/Thing"><a href="/categories/JS基础练习题/" itemprop="url" rel="index"><span itemprop="name">JS基础练习题</span> </a></span>, <span itemprop="about" itemscope itemtype="http://schema.org/Thing"><a href="/categories/JS基础练习题/答案及解析/" itemprop="url" rel="index"><span itemprop="name">答案及解析</span> </a></span></span><span class="post-meta-divider">|</span> <span class="page-pv"><i class="fa fa-eye"></i> 阅读数 <span class="busuanzi-value" id="busuanzi_value_page_pv"></span>次</span><div class="post-wordcount"><span class="post-meta-item-icon"><i class="fa fa-file-word-o"></i> </span><span class="post-meta-item-text">字数统计:</span> <span title="字数统计">677 字 </span><span class="post-meta-divider">|</span> <span class="post-meta-item-icon"><i class="fa fa-clock-o"></i> </span><span class="post-meta-item-text">阅读时长 ≈</span> <span title="阅读时长">2 分钟</span></div></div></header><div class="post-body" itemprop="articleBody"><blockquote><p>本篇文章是js基础练习题第二天的答案及解析部分,纯题目部分请移步<a href="/jsexer2.html" title="js基础练习题 第2天">js基础练习题 第2天</a></p></blockquote><a id="more"></a><h2 id="正文"><a href="#正文" class="headerlink" title="正文"></a>正文</h2><p>1.<br></p><figure class="highlight javascript"><table><tr><td class="gutter"><pre><span class="line">1</span><br></pre></td><td class="code"><pre><span class="line"><span class="keyword">var</span> exerOne = <span class="string">'test;</span></span><br></pre></td></tr></table></figure>则<code>exerOne</code> = __________。<div class="note info"><h3>答案:报错(<code>SyntaxError</code>)</h3></div><div class="note warning"><p>字符串test缺少了闭合的引号。</p></div><br>2.<figure class="highlight javascript"><table><tr><td class="gutter"><pre><span class="line">1</span><br></pre></td><td class="code"><pre><span class="line"><span class="keyword">var</span> exerTwo = <span class="number">52</span> / <span class="number">0</span>;</span><br></pre></td></tr></table></figure>则 <code>exerTwo</code> = __________,<code>typeof(exerTwo)</code> = __________。<div class="note info"><h3>答案:<code>Infinity</code>、<code>"number"</code></h3></div><div class="note warning"><p>在js中,大于0的数除0,结果为<code>Infinity</code>;0除0,结果为<code>NaN</code>;小于0的数除0,结果为<code>-Infinity</code>。</p></div><br>3.<figure class="highlight javascript"><table><tr><td class="gutter"><pre><span class="line">1</span><br></pre></td><td class="code"><pre><span class="line"><span class="keyword">var</span> exerThree = <span class="number">0</span> / <span class="number">0</span>;</span><br></pre></td></tr></table></figure>则<code>exerThree</code> = __________,<code>typeof(exerThree)</code> = __________。<div class="note info"><h3>答案:<code>NaN</code>、<code>"number"</code></h3></div><br>4.<br><figure class="highlight javascript"><table><tr><td class="gutter"><pre><span class="line">1</span><br></pre></td><td class="code"><pre><span class="line"><span class="keyword">var</span> exerFour = <span class="string">"-3.3E+2-5"</span>;</span><br></pre></td></tr></table></figure>则<code>Number(exerFour)</code> = __________,<code>parseFloat(exerFour)</code> = __________。<div class="note info"><h3>答案:<code>NaN</code>、<code>-330</code></h3></div><div class="note warning"><p>该串字符为科学计数法与减法的混合,化为一般表示方法为<code>-3.3 * 10^2 - 5</code>。遇到第二个减号时就不再执行,<code>Number()</code>直接返回<code>NaN</code>,而<code>parseFloat()</code>则返回的是前部分的执行结果即<code>-3.3 * 10^2</code>。</p></div><br>5.<figure class="highlight javascript"><table><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> exerFive_1 = <span class="number">5</span> / <span class="number">2</span>; </span><br><span class="line"><span class="keyword">var</span> exerFive_2 = <span class="string">" is float?"</span>;</span><br></pre></td></tr></table></figure>则<code>exerFive_1 + exerFive_2</code> = __________。<div class="note info"><h3>答案:”2.5 is float?”</h3></div><br>6.<code>0.1 + 0.2 == 0.3</code> 的返回值为__________,若结果为假,请设计一种方法,使结果准确。<div class="note info"><p></p><h3>答案:如下代码段所示:</h3><p></p><figure class="highlight javascript"><table><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></pre></td><td class="code"><pre><span class="line"><span class="comment">// 方法一:固定小数位数</span></span><br><span class="line">(<span class="number">0.1</span> + <span class="number">0.2</span>).toFixed(<span class="number">1</span>)</span><br><span class="line"></span><br><span class="line"><span class="comment">// 方法二:化整再除</span></span><br><span class="line">(<span class="number">0.1</span> * <span class="number">10</span> + <span class="number">0.2</span> * <span class="number">10</span>) / <span class="number">10</span> </span><br></pre></td></tr></table></figure></div><br>7.<br><figure class="highlight javascript"><table><tr><td class="gutter"><pre><span class="line">1</span><br></pre></td><td class="code"><pre><span class="line"><span class="keyword">var</span> exerSeven = <span class="string">"this is\" test string"</span>;</span><br></pre></td></tr></table></figure>则<code>exerSeven.slice(5, 8)</code>的返回值是__________。<br><div class="note info"><h3>答案:”is””</h3></div><div class="note warning"><p><code>\"</code>将被转义为<code>"</code>,<code>String.slice(b, e)</code>方法将截取从b索引开始,到e索引(不包括e)结束的子串。</p></div><br>8.下面哪些操作不会改变原始数组,而是返回一个新的数组__________。<br>A、<code>forEach()</code> B、<code>reverse()</code> C、<code>sort()</code> D、<code>slice()</code><br>E、<code>concat()</code> F、<code>splice()</code> G、<code>join()</code> H、<code>shift()</code><br>I、<code>reduce()</code> J、<code>copyWithin()</code> K、<code>pop()</code> L、<code>map()</code><div class="note info"><h3>答案:A、D、E、L</h3></div><div class="note warning"><p>数组方法总结:</p><table><thead><tr><th>方法</th><th>描述</th><th>是否改变原始数组</th></tr></thead><tbody><tr><td>join()</td><td>返回以指定分隔符分隔而成的字符串</td><td>否</td></tr><tr><td>push()、unshift()</td><td>返回修改后数组的长度</td><td>是</td></tr><tr><td>pop()、shift()</td><td>返回弹出的元素</td><td>是</td></tr><tr><td>sort()</td><td>返回经过排序后的数组</td><td>是</td></tr><tr><td>reverse()</td><td>返回经过反序后的数组</td><td>是</td></tr><tr><td>concat()</td><td>返回合并后的数组</td><td>否</td></tr><tr><td>slice()</td><td>返回截取的数组</td><td>否</td></tr><tr><td>splice()</td><td>返回删除的元素组成的一个数组</td><td>是</td></tr><tr><td>indexOf()、lastIndexOf()</td><td>返回指定项的索引值</td><td>否</td></tr><tr><td>map()</td><td>返回每次函数调用结果组成的数组</td><td>否</td></tr><tr><td>filter()</td><td>返回符合过滤条件的结果组成的数组</td><td>否</td></tr><tr><td>reduce()</td><td>返回迭代函数处理后的值</td><td>否</td></tr><tr><td>copyWithin()</td><td>将数组中指定位置的成员复制到本数组其他位置</td><td>是</td></tr></tbody></table></div><p></p><h2 id="说明"><a href="#说明" class="headerlink" title="说明"></a>说明</h2><ol><li>题目中出现的JS指的是采用ECMAScript 2015及之后标准的JavaScript</li></ol><ol start="2"><li><p>答案中,若有错误和需完善的地方,可在下方留言反馈哈~~</p></li><li><p>查看纯习题版,请点击<a href="/jsexer2.html" title="js基础练习题 第2天">js基础练习题 第2天</a></p></li></ol></div><div><div><div style="text-align:center;color:#ccc;font-size:14px;letter-spacing:.2rem">--本文结束 <i class="fa fa-heart"></i> 感谢阅读--</div></div></div><div><div style="padding:10px 0;margin:20px auto;width:90%;text-align:center"><div>创作十分不易,原创更应鼓励</div><button id="rewardButton" disable="enable" onclick='var e=document.getElementById("QR");"none"===e.style.display?e.style.display="block":e.style.display="none"'><span>打赏</span></button><div id="QR" style="display:none"><div id="wechat" style="display:inline-block"><img id="wechat_qr" src="/images/wechatpay.png" alt="jealyn.wang 微信支付"><p>微信支付</p></div><div id="alipay" style="display:inline-block"><img id="alipay_qr" src="/images/alipay.png" alt="jealyn.wang 支付宝"><p>支付宝</p></div></div></div></div><div><ul class="post-copyright"><li class="post-copyright-author"><strong>本文作者:</strong> jealyn.wang</li><li class="post-copyright-link"><strong>本文链接:</strong> <a href="https://www.jealyn.top/jsexer2-ans.html" title="js练习题第2天 答案及解析">https://www.jealyn.top/jsexer2-ans.html</a></li><li class="post-copyright-license"><strong>版权声明: </strong>本博客所有文章除特别声明外,均采用 <a href="https://creativecommons.org/licenses/by-nc-sa/3.0/" rel="external nofollow" target="_blank">CC BY-NC-SA 3.0</a> 许可协议。转载请注明出处!</li></ul></div><footer class="post-footer"><div class="post-tags"><a href="/tags/javascript/" rel="tag"><i class="fa fa-tag"></i> javascript</a> <a href="/tags/web前端/" rel="tag"><i class="fa fa-tag"></i> web前端</a> <a href="/tags/前端面试题/" rel="tag"><i class="fa fa-tag"></i> 前端面试题</a> <a href="/tags/js练习题答案/" rel="tag"><i class="fa fa-tag"></i> js练习题答案</a> <a href="/tags/Array/" rel="tag"><i class="fa fa-tag"></i> Array</a></div><div class="post-nav"><div class="post-nav-next post-nav-item"><a href="/jsexer1-ans.html" rel="next" title="js练习题第1天 答案及解析"><i class="fa fa-chevron-left"></i> js练习题第1天 答案及解析</a></div><span class="post-nav-divider"></span><div class="post-nav-prev post-nav-item"><a href="/jsexer2.html" rel="prev" title="js基础练习题 第2天">js基础练习题 第2天 <i class="fa fa-chevron-right"></i></a></div></div></footer></div></article><div class="post-spread"></div></div></div><div class="comments" id="comments"><div id="lv-container" data-id="city" data-uid="MTAyMC80Mjk1MS8xOTQ5Nw=="></div></div></div><div class="sidebar-toggle"><div class="sidebar-toggle-line-wrap"><span class="sidebar-toggle-line sidebar-toggle-line-first"></span> <span class="sidebar-toggle-line sidebar-toggle-line-middle"></span> <span class="sidebar-toggle-line sidebar-toggle-line-last"></span></div></div><aside id="sidebar" class="sidebar"><div class="sidebar-inner"><ul class="sidebar-nav motion-element"><li class="sidebar-nav-toc sidebar-nav-active" data-target="post-toc-wrap">文章目录</li><li class="sidebar-nav-overview" data-target="site-overview-wrap">站点概览</li></ul><section class="site-overview-wrap sidebar-panel"><div class="site-overview"><div class="site-author motion-element" itemprop="author" itemscope itemtype="http://schema.org/Person"><img class="site-author-image" itemprop="image" src="/images/avatar.png" alt="jealyn.wang"><p class="site-author-name" itemprop="name">jealyn.wang</p><p class="site-description motion-element" itemprop="description">前端小白一枚</p></div><nav class="site-state motion-element"><div class="site-state-item site-state-posts"><a href="/archives/"><span class="site-state-item-count">85</span> <span class="site-state-item-name">日志</span></a></div><div class="site-state-item site-state-categories"><a href="/categories/index.html"><span class="site-state-item-count">6</span> <span class="site-state-item-name">分类</span></a></div><div class="site-state-item site-state-tags"><a href="/tags/index.html"><span class="site-state-item-count">58</span> <span class="site-state-item-name">标签</span></a></div></nav><div class="links-of-author motion-element"><span class="links-of-author-item"><a href="https://github.com/jealyn" target="_blank" title="GitHub"><i class="fa fa-fw fa-github"></i>GitHub</a> </span><span class="links-of-author-item"><a href="mailto:[email protected]" target="_blank" title="Email"><i class="fa fa-fw fa-envelope"></i>Email</a> </span><span class="links-of-author-item"><a href="https://www.zhihu.com/people/wang-jin-lin-49-35/activities" target="_blank" title="知乎"><i class="fa fa-fw fa-comments"></i>知乎</a> </span><span class="links-of-author-item"><a href="https://me.csdn.net/qq_30216191" target="_blank" title="CSDN"><i class="fa fa-fw fa-edit"></i>CSDN</a></span></div><div class="links-of-blogroll motion-element links-of-blogroll-inline"><div class="links-of-blogroll-title"><i class="fa fa-fw fa-link"></i> 友情链接</div><ul class="links-of-blogroll-list"><li class="links-of-blogroll-item"><a href="https://hexo.io/zh-cn/docs/index.html" title="Hexo文档" target="_blank">Hexo文档</a></li><li class="links-of-blogroll-item"><a href="http://www.ruanyifeng.com/home.html" title="阮一峰的个人网站" target="_blank">阮一峰的个人网站</a></li><li class="links-of-blogroll-item"><a href="https://www.jianshu.com/u/10ae59f49b13" title="这波能反杀" target="_blank">这波能反杀</a></li><li class="links-of-blogroll-item"><a href="https://www.yangqq.com/" title="杨青个人博客" target="_blank">杨青个人博客</a></li><li class="links-of-blogroll-item"><a href="https://blog.csdn.net/qq_30216191" title="Jealyn的个人博客" target="_blank">Jealyn的个人博客</a></li></ul></div></div></section><section class="post-toc-wrap motion-element sidebar-panel sidebar-panel-active"><div class="post-toc"><div class="post-toc-content"><ol class="nav"><li class="nav-item nav-level-2"><a class="nav-link" href="#正文"><span class="nav-number">1.</span> <span class="nav-text">正文</span></a><ol class="nav-child"><li class="nav-item nav-level-3"><a class="nav-link" href="#undefined"><span class="nav-number">1.1.</span> <span class="nav-text">答案:报错(SyntaxError)</span></a></li><li class="nav-item nav-level-3"><a class="nav-link" href="#undefined"><span class="nav-number">1.2.</span> <span class="nav-text">答案:Infinity、"number"</span></a></li><li class="nav-item nav-level-3"><a class="nav-link" href="#undefined"><span class="nav-number">1.3.</span> <span class="nav-text">答案:NaN、"number"</span></a></li><li class="nav-item nav-level-3"><a class="nav-link" href="#undefined"><span class="nav-number">1.4.</span> <span class="nav-text">答案:NaN、-330</span></a></li><li class="nav-item nav-level-3"><a class="nav-link" href="#undefined"><span class="nav-number">1.5.</span> <span class="nav-text">答案:”2.5 is float?”</span></a></li><li class="nav-item nav-level-3"><a class="nav-link" href="#undefined"><span class="nav-number">1.6.</span> <span class="nav-text">答案:如下代码段所示:</span></a></li><li class="nav-item nav-level-3"><a class="nav-link" href="#undefined"><span class="nav-number">1.7.</span> <span class="nav-text">答案:”is””</span></a></li><li class="nav-item nav-level-3"><a class="nav-link" href="#undefined"><span class="nav-number">1.8.</span> <span class="nav-text">答案:A、D、E、L</span></a></li></ol></li><li class="nav-item nav-level-2"><a class="nav-link" href="#说明"><span class="nav-number">2.</span> <span class="nav-text">说明</span></a></li></ol></div></div></section></div></aside></div></main><footer id="footer" class="footer"><div class="footer-inner"><div class="copyright">© <span itemprop="copyrightYear">2019</span> <span class="with-love"><i class="fa fa-user"></i> </span><span class="author" itemprop="copyrightHolder">jealyn.wang</span></div><div class="busuanzi-count"><script async src="https://busuanzi.ibruce.info/busuanzi/2.3/busuanzi.pure.mini.js"></script><span class="site-uv">访客数 <i class="fa fa-user"></i> <span class="busuanzi-value" id="busuanzi_value_site_uv"></span> 人 </span><span class="site-pv">浏览数 <i class="fa fa-eye"></i> <span class="busuanzi-value" id="busuanzi_value_site_pv"></span> 次</span></div></div></footer><div class="back-to-top"><i class="fa fa-arrow-up"></i></div></div><script type="text/javascript">"[object Function]"!==Object.prototype.toString.call(window.Promise)&&(window.Promise=null)</script><script type="text/javascript" src="/lib/jquery/index.js?v=2.1.3"></script><script type="text/javascript" src="/lib/fastclick/lib/fastclick.min.js?v=1.0.6"></script><script type="text/javascript" src="/lib/jquery_lazyload/jquery.lazyload.js?v=1.9.7"></script><script type="text/javascript" src="/lib/velocity/velocity.min.js?v=1.2.1"></script><script type="text/javascript" src="/lib/velocity/velocity.ui.min.js?v=1.2.1"></script><script type="text/javascript" src="/lib/fancybox/source/jquery.fancybox.pack.js?v=2.1.5"></script><script type="text/javascript" src="/js/src/utils.js?v=5.1.4"></script><script type="text/javascript" src="/js/src/motion.js?v=5.1.4"></script><script type="text/javascript" src="/js/src/affix.js?v=5.1.4"></script><script type="text/javascript" src="/js/src/schemes/pisces.js?v=5.1.4"></script><script type="text/javascript" src="/js/src/scrollspy.js?v=5.1.4"></script><script type="text/javascript" src="/js/src/post-details.js?v=5.1.4"></script><script type="text/javascript" src="/js/src/bootstrap.js?v=5.1.4"></script><script type="text/javascript">!function(e,t){var n,c=e.getElementsByTagName(t)[0];"function"!=typeof LivereTower&&(n=e.createElement(t),n.src="https://cdn-city.livere.com/js/embed.dist.js",n.async=!0,c.parentNode.insertBefore(n,c))}(document,"script")</script><script type="text/javascript">function proceedsearch(){$("body").append('<div class="search-popup-overlay local-search-pop-overlay"></div>').css("overflow","hidden"),$(".search-popup-overlay").click(onPopupClose),$(".popup").toggle();var t=$("#local-search-input");t.attr("autocapitalize","none"),t.attr("autocorrect","off"),t.focus()}var isfetched=!1,isXml=!0,search_path="search.xml";0===search_path.length?search_path="search.xml":/json$/i.test(search_path)&&(isXml=!1);var path="/"+search_path,onPopupClose=function(t){$(".popup").hide(),$("#local-search-input").val(""),$(".search-result-list").remove(),$("#no-result").remove(),$(".local-search-pop-overlay").remove(),$("body").css("overflow","")},searchFunc=function(t,e,o){"use strict";$("body").append('<div class="search-popup-overlay local-search-pop-overlay"><div id="search-loading-icon"><i class="fa fa-spinner fa-pulse fa-5x fa-fw"></i></div></div>').css("overflow","hidden"),$("#search-loading-icon").css("margin","20% auto 0 auto").css("text-align","center"),$.ajax({url:t,dataType:isXml?"xml":"json",async:!0,success:function(t){isfetched=!0,$(".popup").detach().appendTo(".header-inner");var n=isXml?$("entry",t).map(function(){return{title:$("title",this).text(),content:$("content",this).text(),url:$("url",this).text()}}).get():t,r=document.getElementById(e),s=document.getElementById(o),a=function(){var t=r.value.trim().toLowerCase(),e=t.split(/[\s\-]+/);e.length>1&&e.push(t);var o=[];if(t.length>0&&n.forEach(function(n){function r(e,o,n,r){for(var s=r[r.length-1],a=s.position,i=s.word,l=[],h=0;a+i.length<=n&&0!=r.length;){i===t&&h++,l.push({position:a,length:i.length});var p=a+i.length;for(r.pop();0!=r.length&&(s=r[r.length-1],a=s.position,i=s.word,p>a);)r.pop()}return c+=h,{hits:l,start:o,end:n,searchTextCount:h}}function s(t,e){var o="",n=e.start;return e.hits.forEach(function(e){o+=t.substring(n,e.position);var r=e.position+e.length;o+='<b class="search-keyword">'+t.substring(e.position,r)+"</b>",n=r}),o+=t.substring(n,e.end)}var a=!1,i=0,c=0,l=n.title.trim(),h=l.toLowerCase(),p=n.content.trim().replace(/<[^>]+>/g,""),u=p.toLowerCase(),f=decodeURIComponent(n.url),d=[],g=[];if(""!=l&&(e.forEach(function(t){function e(t,e,o){var n=t.length;if(0===n)return[];var r=0,s=[],a=[];for(o||(e=e.toLowerCase(),t=t.toLowerCase());(s=e.indexOf(t,r))>-1;)a.push({position:s,word:t}),r=s+n;return a}d=d.concat(e(t,h,!1)),g=g.concat(e(t,u,!1))}),(d.length>0||g.length>0)&&(a=!0,i=d.length+g.length)),a){[d,g].forEach(function(t){t.sort(function(t,e){return e.position!==t.position?e.position-t.position:t.word.length-e.word.length})});var v=[];0!=d.length&&v.push(r(l,0,l.length,d));for(var $=[];0!=g.length;){var C=g[g.length-1],m=C.position,x=C.word,w=m-20,y=m+80;0>w&&(w=0),y<m+x.length&&(y=m+x.length),y>p.length&&(y=p.length),$.push(r(p,w,y,g))}$.sort(function(t,e){return t.searchTextCount!==e.searchTextCount?e.searchTextCount-t.searchTextCount:t.hits.length!==e.hits.length?e.hits.length-t.hits.length:t.start-e.start});var T=parseInt("1");T>=0&&($=$.slice(0,T));var b="";b+=0!=v.length?"<li><a href='"+f+"' class='search-result-title'>"+s(l,v[0])+"</a>":"<li><a href='"+f+"' class='search-result-title'>"+l+"</a>",$.forEach(function(t){b+="<a href='"+f+'\'><p class="search-result">'+s(p,t)+"...</p></a>"}),b+="</li>",o.push({item:b,searchTextCount:c,hitCount:i,id:o.length})}}),1===e.length&&""===e[0])s.innerHTML='<div id="no-result"><i class="fa fa-search fa-5x" /></div>';else if(0===o.length)s.innerHTML='<div id="no-result"><i class="fa fa-frown-o fa-5x" /></div>';else{o.sort(function(t,e){return t.searchTextCount!==e.searchTextCount?e.searchTextCount-t.searchTextCount:t.hitCount!==e.hitCount?e.hitCount-t.hitCount:e.id-t.id});var a='<ul class="search-result-list">';o.forEach(function(t){a+=t.item}),a+="</ul>",s.innerHTML=a}};r.addEventListener("input",a),$(".local-search-pop-overlay").remove(),$("body").css("overflow",""),proceedsearch()}})};$(".popup-trigger").click(function(t){t.stopPropagation(),isfetched===!1?searchFunc(path,"local-search-input","local-search-result"):proceedsearch()}),$(".popup-btn-close").click(onPopupClose),$(".popup").click(function(t){t.stopPropagation()}),$(document).on("keyup",function(t){var e=27===t.which&&$(".search-popup").is(":visible");e&&onPopupClose()})</script><script>!function(){var t=document.createElement("script"),s=window.location.protocol.split(":")[0];"https"===s?t.src="https://zz.bdstatic.com/linksubmit/push.js":t.src="http://push.zhanzhang.baidu.com/push.js";var e=document.getElementsByTagName("script")[0];e.parentNode.insertBefore(t,e)}()</script><script type="text/javascript" src="https://jealyn-1258764186.cos.ap-chengdu.myqcloud.com/love.js"></script><script type="text/javascript" src="https://jealyn-1258764186.cos.ap-chengdu.myqcloud.com/clipboard.min.js"></script><script type="text/javascript" src="https://jealyn-1258764186.cos.ap-chengdu.myqcloud.com/clipboard-use.js"></script></body></html><!-- rebuild by neat -->