前端项目中export和import的作用

之前写过代码,但是那个时候是使用jsp+div+css写页面,jquery负责页面数据展示和数据请求。近期在学习前端,发现有export和import,想起了之前没用过,就研究搜索了一下,发现这个是在 ES6中添加的,难怪之前学习js的时候没见过。

翻看了一下ecma官网介绍,发现ES6是在2015年推出的,从推出这个规范到各家浏览器厂商支持,再到市场上实际应用,一般需要3年左右的时间。ecma制定了一个浏览器端运行代码的规范(发号施令),编号为262。对应的实现有如下

javascript,在浏览器端的实现。

actionscript,不过这个现在已经不怎么用了。

这些浏览器实现是实际干活的。

node.js 也是运行javascript的,不过是在服务器端运行的,即可以用javascript写后台逻辑。

https://ecma-international.org/publications-and-standards/standards/ecma-262/

1st edition, June 1997

2nd edition, August 1998

3rd edition, December 1999

4th edition (not existing)

5th edition, December 2009

5.1th edition, June 2011

6th edition, June 2015

7th edition, June 2016

8th edition, June 2017

9th edition, June 2018

10th edition, June 2019

11th edition, June 2020

12th edition, June 2021

13th edition, June 2022

14th edition, June 2023

从官网提供的内容可以得知,从ES5开始,几乎每年发布一个版本。

参考文档

https://blog.csdn.net/weixin_65793170/article/details/136476532

相关推荐
曦樂~3 小时前
【Web Development】02 CSS
前端·css
风骏时光牛马3 小时前
后端服务接口开发与数据逻辑处理
前端
东鹏特饮3 小时前
经典打砖块(Breakout)游戏
前端·css·css3
IT_陈寒3 小时前
Vite的HMR把我整不会了:一个生产环境的热更新坑
前端·人工智能·后端
Mh4 小时前
如何使用双缓冲优化视频切换
前端
risenav4 小时前
低头蓄力,抬头起跳:《萤虫跳跳》的 Rokid AIUI 开发实战
前端
ZhengEnCi4 小时前
如何看待 Fable 5.2 用纯代码生成 1.4MB 视觉作品:光追、水面、倒影、火光的程序化生成原理
前端
再吃一根胡萝卜5 小时前
DSH 插件的 Host 与 Client:为什么「只加载了 Host」,以及要不要自己写 Client 加载器
前端
parade岁月5 小时前
AI 写的前端代码为什么总像 5 年前的?Chrome 官方出手了
前端
tryCbest6 小时前
Vue系列——第 15 篇:内置组件全家桶——Transition、Teleport、Suspense、KeepAlive
前端·vue.js