VS Code调试js
来源:互联网 发布:国外问卷调查赚钱知乎 编辑:程序博客网 时间:2024/06/04 23:34
[TOC]
精通javaScript1-1为例:
//'Lecture'类的构造函数//用名称(name)和教师(teacher)作为参数function Lecture(name, teacher) { // this.name = name; this.teacher = teacher;}Lecture.prototype.display = function () { return this.teacher + " is teaching " + this.name;}function Schedule(lectures) { this.lectures = lectures;}Schedule.prototype.display = function () { var str = ""; for (var i = 0; i < this.lectures.length; i++) { str += this.lectures[i].display() + " "; } return str;}var mySchedule = new Schedule([ new Lecture("Gym", "Mr. Smith"), new Lecture("Gym", "Mr. Smith"), new Lecture("Gym", "Mr. Smith")]);console.log(mySchedule.display())
VS Code ->帮助->切换开发人员工具,打开调试开发人员工具视图
选择console,点击shift+enter可以进行多行编辑,此时把右边的代码,复制粘进去,可以看到运行结果(这里用的是console,当然也可一用alert)。
阅读全文
0 0
- VS Code调试js
- VS Code 调试Node.js express网站(Visual Studio Code)
- VS Code调试配置
- VS Code 开发调试 TypeScript
- VS里调试JS
- Ubuntu 下VS Code 调试C代码
- 使用vs code 编辑调试php 配置
- 使用VS Code断点调试PHP
- Cocos Creator使用VS Code调试方法
- 使用VS Code编译调试C++程序
- 在VS Code中调试Jest单元测试
- 使用VS Code断点调试PHP
- VS 2003 调试js脚本
- vs 下如何调试js
- VS调试js学习总结
- 关于vs Code debug node.js
- visual studio code 调试 sails.js
- 解决VS Code编译调试中文输出乱码
- 编程珠玑 Pearls(9. 代码调优)
- CentOS
- C/C++的宏
- windows hadoop
- VS Code
- VS Code调试js
- algorithm 4th笔记(1.2)
- 编程珠玑 Pearls(5)编程小事
- 名人博客站点
- java maven项目文档生成
- 程序员面试金典
- 数据结构网站收集
- java web项目整合例子
- idea使用过程中遇到问题解决