一个周末学 JavaScript?

声明:本页面是StackOverFlow热门问题的中英对照翻译,遵循CC BY-SA 4.0协议,如果您需要使用它,必须同样遵循CC BY-SA许可,注明原文地址和作者信息,同时你必须将它归于原作者(不是我):StackOverFlow 原文地址: http://stackoverflow.com/questions/2687566/
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

提示:将鼠标放在中文语句上可以显示对应的英文。显示中英文
时间:2020-08-23 01:28:12  来源:igfitidea点击:

Learning JavaScript in one weekend?

javascript

提问by dueyfinster

I am wondering if experienced JavaScript developers have any websites they use with examples to get the basics of JavaScript down in 24/28 hours? I have looked at Douglas Crockford's Google Tech Talk and I bought the book "Javascript: The Good Parts", but I haven't had time to read it.

我想知道有经验的 JavaScript 开发人员是否有任何网站,他们使用示例来在 24/28 小时内掌握 JavaScript 的基础知识?我看过 Douglas Crockford 的 Google Tech Talk 并购买了“Javascript: The Good Parts”一书,但我没有时间阅读。

回答by CMS

Here is my list of reallygood resources to learn the language:

这是我学习语言的非常好的资源列表:

Tools:

工具:

回答by Sean Vieira

The part of your question that matters here is

您的问题中重要的部分是

[how do] experienced Javascript developers ... get the basics of Javascript down in 24/28 hours

[如何] 经验丰富的 Javascript 开发人员...在 24/28 小时内掌握 Javascript 的基础知识

Experience is not something that you can get in one night, one week, one month, or one year. Experience is something that you acquire over the course of years of hard work — encountering bugs, learning best practices, re-writing code that you wrote four years before and asking yourself, "why did I do this", optimizing for far-less-than-perfect environments ...

经验不是一晚、一星期、一个月或一年就能得到的。经验是您在多年努力工作中获得的东西——遇到错误、学习最佳实践、重新编写四年前编写的代码并问自己,“我为什么要这样做”,针对远低于 -比完美的环境...

That being said, if you have only one night to learn enough to make you dangerous, then start at the bottom and work your way up. Daniel Vassallo has given you one very nice link already, and more than one person has suggested W3Schools for a quick overview of both Javascript and the DOM.

话虽如此,如果你只有一个晚上的时间来学习足以让你变得危险的东西,那么从底部开始,然后一路向上。Daniel Vassallo 已经为您提供了一个非常好的链接,并且不止一个人建议使用 W3Schools 来快速了解 Javascript 和 DOM。

But don't start with any of that. Instead, start by determining, as well as you can, what it is you want to be able to do with Javascript tomorrow. To do that you need to ask yourself two simple questions.

但不要从任何一个开始。相反,首先要尽可能地确定明天你想用 Javascript 做什么。为此,您需要问自己两个简单的问题。

What is your level of programing expertise?Can you code complex algorithms in Cand C++with the occasionally foray into some variant of assembler? Have you ever worked on a decently large project in a slightly "higher level" language like C#or Java? Do you know at least one scripting language decently? Or do the phrases "functional programing", "class-based inheritance" and "bubble sort" mean nothing to you right off the bat? If you are in any of the first three categories, a little time with a few of the bettertutorialsontheInternet, and maybe a quick look at a Stackoverflow questionortwoshould have you up and running in no time. If you are in the last category, you might do well to start off with the basics of programing in general. No matter what you are going to need an environment in which to learn. Which brings us to the second question ...

您的编程专业知识水平如何?你能在复杂的算法进行编码C,并C++与偶尔涉足汇编的一些变种?你有没有用稍微“高级”的语言(比如C#或 )参与过一个相当大的项目Java?你至少懂一种脚本语言吗?或者,“函数式编程”、“基于类的继承”和“冒泡排序”这些短语对你来说毫无意义吗?如果您有任何前三类,一点点的时间与几个的教程互联网,也许快速浏览一下出现StackOverflow问题2应该让您立即启动并运行。如果您属于最后一类,那么从一般的编程基础知识开始可能会更好。无论您要学习什么,都需要一个环境。这就引出了第二个问题......

What is your platform?Are you planning on doing some server-side programing with node.js? Maybe you planning on developing some utility in a Rhinoor JScriptenvironment? If either of these situations are the case then reading the documentation for the platform you will be developing on will stand you in much better stead than reading up on the DOM. If, on the other hand you are planning on developing for the web, then you cannot do much better than to grab Firefoxwith the Firebugextension and start by building a simplified version of what you are going to be working on tomorrow.

你的平台是什么?你打算用 做一些服务器端编程node.js吗?也许您计划在 aRhinoJScript环境中开发一些实用程序?如果出现上述任何一种情况,那么阅读您将在其上开发的平台的文档将比阅读 DOM 更好。另一方面,如果您计划为 Web 进行开发,那么您最好使用带有Firebug扩展的Firefox并开始构建您明天将要进行的工作的简化版本。

And if none of this is in any way helpful to you then hopefully by the time you have finished reading it, someone else will have answered the question in a far more suitable manner ... that's the beauty of Stackoverflow.

如果这些都对您没有任何帮助,那么希望当您读完它时,其他人会以更合适的方式回答这个问题……这就是 Stackoverflow 的美妙之处。

回答by Daniel Vassallo

If you are starting with the W3Schools tutorial, you should get through that in just a couple of hours, at most. In the remaining time I would suggest watching the video lectures listed in the following blog article:

如果您是从W3Schools 教程开始的,最多应该在几个小时内完成。在剩下的时间里,我建议观看以下博客文章中列出的视频讲座:

The author of that blog article wrote very detailed points on each video talk, so you can get a very clear idea of what will be discussed. The talks are given by Douglas Crockford, John Resigand Nicholas Zakas- all significant figures in the JavaScript world. These should take quite a big chunk from your weekend, but they should serve as a very sound introduction for when you go through "The Good Parts" book.

那篇博客文章的作者在每个视频演讲中都写了非常详细的要点,因此您可以非常清楚地了解将要讨论的内容。演讲者是Douglas CrockfordJohn ResigNicholas Zakas,他们都是 JavaScript 世界的重要人物。这些应该占用你周末的大部分时间,但是当你阅读“ The Good Parts”这本书时,它们应该作为一个非常合理的介绍。

JavaScript is a very expressive language, and I hope learning it will be fun. You can really sense the enthusiasm of the speakers in the above talks when they describe some of the good features of the language, such as closuresand first-class functions. Enjoy!

JavaScript 是一种表现力很强的语言,我希望学习它会很有趣。在上面的演讲中,当他们描述语言的一些好的特性时,你可以真正感受到他们的热情,比如闭包一流的函数。享受!

回答by Caps

If you're learning Javascript it's worth checking out jQueryand Prototypeas they will help a lot with writing cross browser Javascript as well as some great resource for performing some of the trickier tasks in JS like animation, etc.

如果您正在学习 Javascript,那么值得检查一下jQueryPrototype,因为它们对编写跨浏览器 Javascript 有很大帮助,以及在 JS 中执行一些棘手任务(如动画等)的一些很好的资源。

回答by derek

i second the W3Schoolsreference. I also like the Javascript Phrasebook, it's got real world examples with brief explanations of each one. Doesn't go into the history or theory of the language, which may be too much reading if you want to stuff as much as possible into one weekend.

我第二个W3Schools参考。我也喜欢Javascript Phrasebook,它有真实世界的例子,每个例子都有简短的解释。不涉及语言的历史或理论,如果您想在一个周末内尽可能多地阅读这些内容,可能会读太多。

回答by s4eed

codecademyis really excellent site to learn not only javascript but HTML and css and some more stuffs. This site is a bit different than others. because you will learn stuffs in this site interactively.

codecademy是一个非常好的网站,不仅可以学习 javascript,还可以学习 HTML 和 css 以及更多东西。这个网站与其他网站有点不同。因为您将通过交互方式在该站点中学习东西。

回答by Stefano Borini

I was more or less in your situation. What I did was

我或多或少处于你的情况。我所做的是

  • I read "javascript, the good parts". It's a good book, but don't take it literally. For example, its use of objects, completely neglecting the new operator and the native object instantiation mechanism is frankly excessive. Hence, learn the prototype-based mechanism well.

  • take jQuery and learn it by using. Remember that jQuery is a great library to manipulate the web page DOM. add nodes, remove nodes, and much more. jQuery abstracts many browser dependent operations, so you don't go mad with browser incompatibilities.

  • tinker and when you find yourself in a troublesome spot, use FireBug to find the trouble. Make smaller examples, be very wary of variables introduced without the varkeyword, and always keep into account that thisrefers to the object owning a given routine, and this could be an unexpected one.

  • 我读了“javascript,好的部分”。这是一本好书,但不要从字面上理解。比如它对对象的使用,完全忽略了new操作符和原生的对象实例化机制,坦白说是过分了。因此,要好好学习基于原型的机制。

  • 使用 jQuery 并通过使用来学习它。请记住,jQuery 是一个很好的库,用于操作网页 DOM。添加节点、删除节点等等。jQuery 抽象了许多与浏览器相关的操作,因此您不会因浏览器不兼容而发疯。

  • 修补匠,当您发现自己遇到麻烦时,请使用 FireBug 找出问题所在。制作较小的示例,非常警惕没有var关键字引入的变量,并始终考虑this引用拥有给定例程的对象,这可能是意外的。

Javascript (and JS on the DOM) is a nice language, but its logic can be baffling sometimes. Don't give up. Once you get to understand how it works, it's rather intuitive.

Javascript(和 DOM 上的 JS)是一种很好的语言,但它的逻辑有时会令人困惑。不要放弃。一旦你了解了它是如何工作的,它就会变得相当直观。