Giter VIP home page Giter VIP logo

Comments (7)

FontEndArt avatar FontEndArt commented on May 13, 2024 2

ES是ECMAScript
JavaScript就是由ES和BOM、DOM组成的
TS是TypeScript,是微软公司推出的
它可以说是JavaScript的一个超集,有着更加严格的开发规范、类型约定。类似的超集还有CoffeeScript

使用TS语言开发可以有以下几个优点:

  1. 更加明确的数据、变量、参数的类型
  2. 约束了许多JavaScript的开发者开发混乱的情况
  3. 可以使用interface来定义抽象接口
  4. 节省了一部分对接的时间

但是在开发的过程中,依旧要养成书写注释的习惯。给interface注释能更加明确每一个属性的意义,给方法注释可以让自己和下一个开发者看到的时候,简洁明了、胸有成竹。

不过要注意使用TS开发最需要规避的一点就是:”any大法好“ 。

很多开发者在开发过程中尝尝会因为不知道数据类型、或者读取某些数据无从下手等原因,从而滥用any。最终失去了使用TS开发的意义。

from fe-interview.

tomoat avatar tomoat commented on May 13, 2024 1

NodeJS 给JavaScript提供了后端运行平台,NodeJS出现之前,基本上JavaScript只能在浏览器这个平台运行。

BOM和DOM
这是浏览器运行时中的两个不同的概念。

BOM 浏览器对象模型
提供了独立于内容而与浏览器窗口进行交互的对象。描述了与浏览器进行交互的方法和接口,可以对浏览器窗口进行访问和操作,譬如可以弹出新的窗口,改变状态栏中的文本,对Cookie的支持,IE还扩展了BOM,加入了ActiveXObject类,可以通过js脚本实例化ActiveX对象等等)

DOM 文档对象模型
DOM是针对XML的基于树的API。描述了处理网页内容的方法和接口,是HTML和XML的API,DOM把整个页面规划成由节点层级构成的文档。

DOM本身是与语言无关的API,它并不与Java,JavaScript或其他语言绑定。

特定语言的DOM
针对XHTML和HTML的DOM。这个DOM定义了一个HTMLDocument和HTMLElement做为这种实现的基础。

from fe-interview.

azl397985856 avatar azl397985856 commented on May 13, 2024

@FontEndArt JavaScript就是由ES和BOM、DOM组成的?

from fe-interview.

FontEndArt avatar FontEndArt commented on May 13, 2024

@FontEndArt JavaScript就是由ES和BOM、DOM组成的?

基本组成部分就是ES、BOM、DOM吧 要是严格来说的话还有别的 比如正则什么的就属于单独的体系

from fe-interview.

azl397985856 avatar azl397985856 commented on May 13, 2024

@FontEndArt BOM、DOM和JS没有任何关系

from fe-interview.

FontEndArt avatar FontEndArt commented on May 13, 2024

@FontEndArt BOM、DOM和JS没有任何关系

BOM、DOM和ES是两码事 但是是属于JS的 这个毋庸置疑

不能把Node算进去的哈 node可不是js

from fe-interview.

azl397985856 avatar azl397985856 commented on May 13, 2024

好吧 不想撕了

from fe-interview.

Related Issues (20)

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.