javascript C++ 程序员学习 JS 的资源
声明:本页面是StackOverFlow热门问题的中英对照翻译,遵循CC BY-SA 4.0协议,如果您需要使用它,必须同样遵循CC BY-SA许可,注明原文地址和作者信息,同时你必须将它归于原作者(不是我):StackOverFlow
原文地址: http://stackoverflow.com/questions/4278350/
Warning: these are provided under cc-by-sa 4.0 license. You are free to use/share it, But you must attribute it to the original authors (not me):
StackOverFlow
Resources for C++ programmer to learn JS
提问by SunnyShah
I am proficient in C++, I dont know Java Script and want to learn JS, What should be the way/process for me? I know basic html, CSS.
精通C++,不懂Java Script,想学JS,我应该怎么走?我知道基本的 html、CSS。
采纳答案by Ivo Wetzel
Check out the one and onlyJavaScript Guide from MDC:
https://developer.mozilla.org/en/docs/Web/JavaScript/Guide
查看来自 MDC 的唯一一份JavaScript 指南:https:
//developer.mozilla.org/en/docs/Web/JavaScript/Guide
Besides that, forget everything you know about C++ it won't help you in any way. JavaScript is a completely different beast on its own.
除此之外,忘记你所知道的关于 C++ 的一切,它不会以任何方式帮助你。JavaScript 本身就是一个完全不同的野兽。
It will take a lot of type to learn all the quirks of the language and the Browsers it runs in, if you want to do server side JavaScript check out Node.js, but be advised, learn a lotabout JS before doing that.
学习这门语言的所有怪癖和它运行的浏览器需要很多类型,如果你想做服务器端 JavaScript,请查看 Node.js,但请注意,在这样做之前,先了解很多关于 JS 的知识。
回答by Spudley
An answer that takes things in a different angle: Have you heard of Emscripten?
一个从不同角度看待事物的答案:您听说过Emscripten吗?
Emscripten is basically a C/C++ to Javascript converter. It allows you to write code in C/C++, compile it, and then convert your compiled bitcode to Javascript.
Emscripten 基本上是一个 C/C++ 到 Javascript 的转换器。它允许你用 C/C++ 编写代码,编译它,然后将你编译的 bitcode 转换为 Javascript。
Clearly, this isn't aimed at teaching a C++ programmer to write Javascript, so it isn't a direct answer to this question. But it does allow him to create Javascript code, in a round-about sort of way.
显然,这不是为了教 C++ 程序员编写 Javascript,所以它不是这个问题的直接答案。但它确实允许他以一种迂回的方式创建 Javascript 代码。
Of course, he could always try using it a learning tool, by writing some C++ code and studying the converted Javascript. It might be helpful in simple cases, although I suspect it wouldn't be ideal code to learn from.
当然,他可以随时尝试将其用作学习工具,通过编写一些 C++ 代码并研究转换后的 Javascript。在简单的情况下它可能会有所帮助,尽管我怀疑它不是理想的学习代码。
回答by ?imon Tóth
Good browser + a debugger plugin (both firefox and opera will suffice). Plus for the start its good to start on top of some good JS library: jQuery or Mootols (my favourites).
好的浏览器 + 调试器插件(firefox 和 opera 就足够了)。另外,从一些好的 JS 库开始是好的:jQuery 或 Mootols(我的最爱)。
The hardest issue for me were the differences in the implementation. C++ compilers tend to break the standard, or implement just some parts of it, but the differences between javascript implementations are just insane.
对我来说,最困难的问题是实现上的差异。C++ 编译器往往会打破标准,或者只实现其中的一部分,但是 javascript 实现之间的差异简直是天方夜谭。
If you are OK with C++, you will be able to code pretty easily, the syntax is similar, but everything is a lot simpler and dynamic.
如果您熟悉 C++,您将能够非常轻松地编写代码,语法相似,但一切都更加简单和动态。
回答by Andrew
Check out http://codeavengers.comto learn JavaScript, it's the best and easiest way.
查看http://codeavengers.com学习 JavaScript,这是最好和最简单的方法。
回答by Sachin Shanbhag
There is no relation between c++ and javascript anyway, so being proficient in C++ does not help you learn javascript, altough it gives you heads up in getting accustomed to the writing code in javascript easily.
无论如何,c++ 和 javascript 之间没有关系,因此精通 C++ 并不能帮助您学习 javascript,尽管它可以让您轻松习惯用 javascript 编写代码。
you can start here - http://homepage.ntlworld.com/kayseycarvey/
你可以从这里开始 - http://homepage.ntlworld.com/kayseycarvey/

