1 Star 0 Fork 84

sheep/前端77

forked from 万少/前端77 
Create your Gitee Account
Explore and code with more than 12 million developers,Free private repositories !:)
Sign up
This repository doesn't specify license. Please pay attention to the specific project description and its upstream code dependency when using it.
Clone or Download
02-let、const、var.html 1.52 KB
Copy Edit Raw Blame History
万少 authored 2022-05-13 09:46 . 箭头函数传递参数
<!DOCTYPE html>
<html lang="en">
<head>
<meta charset="UTF-8" />
<meta
name="viewport"
content="width=device-width, initial-scale=1.0,maximum-scale=1,minimum-scale=1,user-scalable=no"
/>
<title>02-let、const、var.html</title>
<style>
* {
margin: 0;
padding: 0;
box-sizing: border-box;
}
</style>
</head>
<body>
<script>
/*
1 let、const、var 都可以用来声明变量
2 var 过时的技术 有很多弊端-外面很多老程序员 以为 了解var 各种各样的弊端-是技术 错误!
1 如果你在网络上看文章 或者 视频 只要它使用 var 不用看 过时!!
2 快毕业了 去刷面试题 不晚!
3 let 和 const
4 const 声明了变量之后 这个变量 永远不能被修改!!! const 声明的变量 叫做 常量!!
1 使用了const定义的变量 表示它永远不会被改变
项目名称 - 拼汐汐
2 规范程序员设计 我们的程序
哪些变量需要被修改 哪些不要被修改
10ml 100ml
3 什么时候使用const
1 多看老师的使用
2 担心 先使用 let
4 对于 有经验的程序员 都知道const和let区别程序员
能使用 const 就不使用let
5 let
定义变量 也可以修改变量
*/
const username = '悟空';
// 修改 常量
username = '八戒';
</script>
</body>
</html>
马建仓 AI 助手
尝试更多
代码解读
代码找茬
代码优化
1
https://gitee.com/sheep-cc/front-end-77.git
git@gitee.com:sheep-cc/front-end-77.git
sheep-cc
front-end-77
前端77
js高级第1天

Search