批改状态:合格
老师批语:
//变量let n1 = 100;console.log(typeof n1);let n2 = "123";console.log(typeof n2);let n3 = true;console.log(typeof n3);let n4 = undefined;console.log(typeof n4);let n5 = null;console.log(typeof n5);//常量const NATION = "china";//对象const person = {name:'zhangsan',gender:'male',job:'work'};console.log(person);//数组const colors =["red","green","blue"];console.log(colors);
//函数参数与返回值function sum (a,b){return a+b;}console.log(sum(30,40));//匿名函数与箭头函数的转化let sum1 = function(a,b){return a+b;}sum1 = (a,b)=>{return a+b;}//只有一条语句时sum1 =(a,b)=>a+b;
Copyright 2014-2025 https://www.php.cn/ All Rights Reserved | php.cn | 湘ICP备2023035733号