简体   繁体   English

“ >>>>”或“ <<<<”在JavaScript中的含义或作用

[英]What does “>>>>” or “<<<<” mean or do in Javascript

I have found this operator in a book about Node.js. 我在有关Node.js的书中找到了该运算符。 I don't know what it does or mean. 我不知道这是什么意思。 In the code below is more context for where I found this 在下面的代码中,我可以找到更多上下文

const EventEmitter = require('events');

class Pulser extends EventEmitter {
    start() {
        setInterval(() => {
            console.log(`${new Date().toISOString()} >>>> pulse`);
            this.emit('pulse');
            console.log(`${new Date().toISOString()} <<<< pulse`);
        }, 1000);
    }
}
module.exports = Pulser;

There's no operator there, that's just part of the string. 那里没有运算符,那只是字符串的一部分。 The only interpolated variable is new Date().toISOString() . 唯一的内插变量是new Date().toISOString() – CertainPerformance –某些性能

声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM