Javascript中的类,对象和结构有什么区别? (2016年更新)

时间:2016-08-05 11:05:49

标签: javascript oop

好的,我想我知道 结构的答案: 它是一个对象set元素)没有 字段(元素)中的> (函数指针)。正确?

这个问题是asked 6 years ago,但答案是冗长的,模糊的(不必要的理论上),make incredible claims that Javascript has no classes并且没有提及Javascript关键字 POST /sdnext/tempClose.html HTTP/1.1 Host: localhost:8080 Connection: keep-alive Content-Length: 135 Cache-Control: max-age=0 Accept:text/html,application/xhtml+xml,application/xml;q=0.9,image/webp,*/*;q=0.8 Origin: http://localhost:8080 Upgrade-Insecure-Requests: 1 User-Agent: Mozilla/5.0 (Windows NT 6.1; WOW64) AppleWebKit/537.36(KHTML,like Gecko) Chrome/49.0.2623.112 Safari/537.36 Content-Type: application/x-www-form-urlencoded Referer: http://localhost:8080/sdnext/tempOpen.html Accept-Encoding: gzip, deflate Accept-Language: en-US,en;q=0.8 Cookie: JSESSIONID=B9D81D17E3B18B75494CBF8517B15995 Form Data view source view URL encoded monthlyMemberStatus0.noOffDays:24 monthlyMemberStatus1.noOffDays:31 monthlyMemberStatus2.noOffDays:31 monthlyMemberStatus3.noOffDays:31

我宁愿要求更新,但Stack Exchange没有明显的方法来请求旧问题的新答案。我想要求更新是有意隐藏新用户和匿名用户的内幕功能之一。

1 个答案:

答案 0 :(得分:3)

  • 您没有JavaScript中的类或结构。
  • 您所拥有的所有函数都可能像类和对象一样,这些变量是布尔值,数字和字符串等变量。