zoukankan      html  css  js  c++  java
  • 3.6语句

    语句

    if语句 (推荐花括号包起来)
    do white (先执行一次,再判断)
    white (先判断,再执行)
    for (循环内部的变量,外部也可以访问到,没有块级作用域)
    for in (枚举对象属性值,建议先检测是不是null或者undefined)
    label (Labels are not very commonly used in JavaScript since they make
    programs harder to read and understand. As much as possible, avoid
    using labels and, depending on the cases, prefer calling functions or
    throwing an error.)(难读懂,尽量不经常使用)
    break continue 跳出循环
    with 作用域作用在一个对象上(严格模式不允许使用)
    switch 不一定是常量,也可以是变量,或者表达式
    

    for while

    var count = 10;
    for(var i = 0; i < count; i++){
    	l(i);
    }
    
    var count = 10;
    var i = 0;
    while(i < count){
    	console.log(i);
    	i++;
    }
    
  • 相关阅读:
    python 爬虫 urllib模块 url编码处理
    python 爬虫 urllib模块 目录
    python 爬虫 urllib模块介绍
    python 爬虫 目录
    爬虫 介绍
    POJ 2533
    POJ 2531
    POJ 2524
    POJ 2505
    POJ 2521
  • 原文地址:https://www.cnblogs.com/caijw/p/8038032.html
Copyright © 2011-2022 走看看