Invalid shorthand property initializer

后端 未结 4 2039
被撕碎了的回忆
被撕碎了的回忆 2020-12-04 16:13

I wrote the following code in JavaScript for a node project, but I ran into an error while testing a module. I\'m not sure what the error means. Here\'s my code:

<         


        
4条回答
  •  無奈伤痛
    2020-12-04 16:27

    Change the = to : to fix the error.

    var makeRequest = function(message) {
    var options = {
    host: 'localhost',
    port : 8080,
    path : '/',
    method: 'POST'
    }

提交回复
热议问题