博客
关于我
强烈建议你试试无所不能的chatGPT,快点击我
我如何运行一些JavaScript代码段
阅读量:2507 次
发布时间:2019-05-11

本文共 1516 字,大约阅读时间需要 5 分钟。

As I learn and try new different things using Javascript, I run little snippets of JavaScript every day.

当我学习和尝试使用Javascript进行新的尝试时,我每天都会运行一些JavaScript代码段。

Sometimes I just open a Chrome or Firefox window and type things there. This is perfect to try out a line or two, but it can quickly become a little of a problem if you have to spend some time on the code. For example, if you declare a const value, you need to refresh the window to re-run it.

有时,我只是打开Chrome或Firefox 窗口并在其中键入内容。 尝试一两行是完美的选择,但是如果您不得不花一些时间在代码上,那么很快就会成为一个小问题。 例如,如果声明一个const值,则需要刷新窗口以重新运行它。

There is a nice extension called . It’s a great way to test JS snippets while working in your editor.

有一个很好的扩展名为 。 这是在编辑器中工作时测试JS代码片段的好方法。

Another tool I use is , a little application.

我使用的另一个工具是 ,这是一个小小的应用程序。

You can type code on the left, and the app shows the result on the right.

您可以在左侧输入代码,然后该应用在右侧显示结果。

The code evaluates as you type, so you don’t have to press “run” or have roadblocks while you try things out.

该代码会在您键入时进行评估,因此您在尝试操作时不必按下“运行”或设置障碍。

It can test both browser and code.

它可以测试浏览器 代码。

You can import Node modules just by setting a working directory where it can find them in a node_modules folder. Or you can just install npm packages from the “Action -> Install NPM packages” menu.

您可以仅通过设置工作目录来导入Node模块,该目录可以在node_modules文件夹中找到它们。 或者,您可以仅从“操作->安装NPM软件包”菜单中安装npm软件包。

It supports and Babel.

它支持和Babel。

It’s currently macOS-only, but I’m sure there are similar tools for Linux and Windows.

它目前仅适用于macOS,但我确定对于Linux和Windows也有类似的工具。

翻译自:

转载地址:http://uhqgb.baihongyu.com/

你可能感兴趣的文章
Spring Boot Docker 实战
查看>>
Div Vertical Menu ver3
查看>>
Git简明操作
查看>>
InnoDB为什么要使用auto_Increment
查看>>
课堂练习之买书打折最便宜
查看>>
定义函数
查看>>
网络虚拟化技术(二): TUN/TAP MACVLAN MACVTAP
查看>>
MQTT协议笔记之mqtt.io项目HTTP协议支持
查看>>
(转)jQuery中append(),prepend()与after(),before()的区别
查看>>
Tecplot: Legend和图像中 Dashed/Dash dot/Long dash 等虚线显示没有区别的问题
查看>>
win8 开发之旅(2) --连连看游戏开发 项目错误的总结
查看>>
视频转换工具ffmpeg
查看>>
一、 object c -基础学习第一天 如何定义一个类
查看>>
C#调用C++编译的DLL详解
查看>>
Kali Linux的安装
查看>>
我的大学生活-5-08-赵心宁
查看>>
bzoj1708[Usaco2007 Oct]Money奶牛的硬币(背包方案数dp)
查看>>
P2700逐个击破(并查集/树形dp)
查看>>
python几大排序算法
查看>>
hdu 4619 二分图最大匹配 ——最大独立集
查看>>