1. var a = 10 && 20;
  2. console.log(a);
  3. var num = 20 || 30;
  4. console.log(num);
  5. var t = 0 || 20;
  6. console.log(t);
  7. var s = 0 && 30;
  8. console.log(s);
  1. var a = "21"+4-true+"3"
  1. var b = 0 ||"abc";
  2. var c = "abc" || 1;
  3. var d = 0 || NaN;
  1. var a = 10;
  2. a++;
  3. b = ++a + 2;
  4. c = ++b + a++ + 4;
  5. console.log(a);
  6. console.log(b);
  7. console.log(c);

1-2

  1. //下面那些符合命名规则
  2. A var a%=20
  3. B var 1a=20
  4. C var _a=40;
  5. D var $a=30

1-3

  1. console.log(""||"abc");
  2. console.log(0 == '');
  3. function b(){
  4. }
  5. console.log(typeof b);

1-4

  1. var x = "2"+3+4;

1-5

  1. var value = 0;
  2. if(value){
  3. console.log("true")
  4. }else{
  5. console.log("fasle")
  6. }

1-6

  1. var x=!false;
  2. var y;
  3. if(x==true){
  4. y = true
  5. }else{
  6. y = false
  7. }
  8. alert(y);

1-7

  1. var b = 10,c=3;
  2. if((b%c)>=2){
  3. alert("a")
  4. }else{
  5. alert("b")
  6. }

1-8

  1. var x = 1;
  2. var y =x+x++;
  3. alert(y);

1-9

  1. 1.typeof能得到哪些类型
  2. 2.===和==的区别

1-10 js中的内置对象

  1. Object,
  2. Array,
  3. Function,
  4. Number,
  5. String,
  6. Boolean,
  7. Date,
  8. RegExp,
  9. Error

1-11 Boolean值有哪些情况下为false

1-12

  1. 100 == '100'
  2. 0 == ''
  3. null == undefined