console.time 方法 / console.timeEnd() 方法

统计一段代码的执行时间, 形参必须一致

console.time("string");

for(var i =0;i<100000;i++) { ; }

console.timeEnd("string");

console.error() 方法

用于输出标准错误输出流的方法。即向控制台中输出一行错误信息

console.error("This is an error string!!");

js console 一些拓展技巧的更多相关文章

  1. js 数组去重小技巧

    js 数组去重小技巧 Intro 今天遇到一个问题,需要对数据进行去重,想看一下有没有什么比较方便的方法,果然有些收获. Question 问题描述: 我有一个这样的数据: [ { "Pro ...

  2. js console API All In One

    js console API All In One const log = console.log; for(const key in console) { log(`navigator.${key} ...

  3. js console 性能测试 & don't-use-array-foreach-use-for-instead

    don't-use-array-foreach-use-for-instead slower https://coderwall.com/p/kvzbpa/don-t-use-array-foreac ...

  4. js console.log all in one

    js console.log all in one this & arguments "use strict"; /** * * @author xgqfrms * @li ...

  5. js console.log color all in one

    js console.log color all in one console.log color Chrome console.log 语法 / grammar %c, %s, css style ...

  6. js使用转义符技巧输出HTML

    有时候我们需要使用js输出html代码,会涉及一些标签.变量. 对于很长的html代码,为了让js具有较好的可读性,需要在js里对html代码进行一定的拆分.拼接. 简单明了版 通常我们这样做 var ...

  7. js几个小技巧和坑

    蝴蝶书看了,也知道充满了毒瘤和糟粕,但该用还是得用. 实际写了几天,小技巧记录下来.都是在py里有直接答案,不会遇到的问题,没想到js里这么费事. 还是要多读<ES6标准入门> 1判断ob ...

  8. js的45个技巧

    JavaScript是一个绝冠全球的编程语言,可用于Web开发.移动应用开发(PhoneGap.Appcelerator).服务器端开发(Node.js和Wakanda)等等.JavaScript还是 ...

  9. 浏览器js console对象

    js中调用console写日志 console.log("some log"); console.warn("some warning"); console.e ...

随机推荐

  1. android如何实现文件按时间先后顺序排列显示

    <span style="font-size:18px;">File[] files =parentFile.listFiles(fileFilter);//通过fil ...

  2. POJ 2503 字典树

    题目链接:http://poj.org/problem?id=2503 题意:给定一个词典,输入格式为[string1' 'string2]  意思是string2的值为string1. 然后给定一波 ...

  3. vim使用01

    安装与基础配置 iTerm快捷操作 清屏: <C l>/<W k> 剪切: <W x> 复制: <W v> 新增窗口: <W d> 切换窗口 ...

  4. 个人js类库mycool

    // JavaScript Document Sunbye 1.0 //getElementById //function start var $=function(_id){return docum ...

  5. 学习 Message(5): 关于 TApplicationEvents.OnMessage 的第二个参数 可以屏蔽 TWebBrowser右键菜单:

    http://www.cnblogs.com/del/archive/2008/10/25/1319318.html TApplicationEvents.OnMessage 的第二个参数 Handl ...

  6. R AnalyticFlow---R的流程图

    0.简介 R AnalyticFlow是一款利用R环境作为统计计算的数据分析软件,创作者是日本人,版权属于日本Ef-prime公司.R AnalyticFlow除了拥有直观的用户界面和流程图显示,它还 ...

  7. ural 1070. Local Time

    1070. Local Time Time limit: 1.0 secondMemory limit: 64 MB Soon the USU team will go to Vancouver to ...

  8. CentOS6.4 安装SSDB

    1.安装 wget --no-check-certificate https://github.com/ideawu/ssdb/archive/master.zipunzip mastercd ssd ...

  9. Coder-Strike 2014 - Round 1 C. Pattern

    题目的意思是给出n个长度相同的字符串然后找出与他们匹配的字符串 将字符串存入类似二维数组的里面,每一行代表一个字符串,遍历每列,判断每列是否有公共的匹配字符,如果有输出任意一个 如果没有输出'?' # ...

  10. 旋转轮子 UIActivityIndicatorView

    旋转轮子 *activityView = [[UIActivityIndicatorView alloc ]initWithActivityIndicatorStyle:UIActivityIndic ...