js basic exercise 1

<!DOCTYPE html>
<html>
<head>
<meta charset="UTF-8">
<title></title>
</head>
<body>
<script type="text/javascript">
// var a="box";
// alert(typeof a)
//
//
// var box;
// alert(box)
//
// var dd=null;
// alert(typeof dd);
//
// if(dd!=null){
// alert("对象存在")
// }
// alert(undefined==null)
//// var box1;
//// vard=null; //这个是错误的
//// alert(typeof==typeof d)
//

//boolean

// var box=true;
// alert(typeof box);
// var hell0="dksdkk";
// var heel=Boolean(hell0); // coercion, non-null, all are true;
// alert(typeof heel);
// if(hell0){
// alert("if true, execute me")
// }else{
// alert("false. execute me")
// }
// alert(parseInt("122FKDFDF")) //Forensics
// alert(parseInt("2.23455"))
// alert(parseFloat("2.23455")) //The decimal point will be taken
//
// var box=" mr";
// box=box+"leas";
// alert(typeof box.toString())
// var ss=10;
// alert(ss.toString(10));
// var boxs=new Object( 1);
// var age=boxs+1;
// alert(age);
//Operation
// var box=100;
//// var age=++box; //The first operation is assigned.
//// console.log(age) ;
// var bos=box++; //The assignment is done first.
// alert(bos);
//
// var box=3>2;
// console.log(box);
//
//
// var box=100; //Assign right to left,
// box =box+200; //self +200 for assignment;
// console.log(box);
// box+=100; //200 += instead of box+100;
//
//


</script>
</ body>
</html>

Guess you like

Origin http://43.154.161.224:23101/article/api/json?id=325847572&siteId=291194637