The Chrome console allows you to format messages using CSS properties. This lesson walks you through the syntax of formatting your logs with css then refactoring into a template tag function to make formatting more reusable.

const debug = (label, style, obj) => {
console.log(`%c${label}`, `${style}`, `${obj}`);
}; debug(
`debug: `,
`color: white; background-color: grey; padding: .5em;`,
JSON.stringify({name: 'Zhentian'}));

最新文章

  1. java:警告:[unchecked] 对作为普通类型 java.util.HashMap 的成员的put(K,V) 的调用未经检查
  2. 关于mysql的几个必知点
  3. png图片尺寸大小调整
  4. 炉石传说 C# 开发笔记 (源代码整理公开)
  5. underscorejs
  6. 【Winform】DataTable绑定到ComboBox
  7. uiscrollerview循环滚动(参考第三方库:HMBannerView)https://github.com/iunion/autoScrollBanner
  8. android anim 动画效果(转)
  9. [转]python集合set
  10. 微信内移动前端开发抓包调试工具fiddler使用教程
  11. A Game of Thrones(20) - Eddard
  12. GBK,UTF8是什么?有什么区别,做网站选择哪种好?
  13. hdu 2018递推
  14. PHP XML 函数
  15. 大数据与Mapreduce
  16. copyOf数组复制方法的使用(数组扩容练习)
  17. Xcode 常用代码段
  18. Win10下Clion配置opencv3
  19. MVC的Filter应用小结
  20. emacs之配置4,颜色插件

热门文章

  1. 【Codeforces Round #452 (Div. 2) B】Months and Years
  2. Oracle调用Java类开发的存储过程、函数的方法
  3. Impala基础认知与安装
  4. Thinkphp5创建控制器
  5. ActiveX控件开发 C#
  6. 01011_怎么打开任务管理器?win7打开任务管理器方法
  7. SpringMVC学习总结(2)——SpringMVC返回json配置
  8. upf1
  9. springboot入门(三)-- springboot集成mybatis及mybatis generator工具使用
  10. 卡塔兰数(Catalan)