JS技术

学习JavaScript的最佳方法

字号+ 作者:H5之家 来源:H5之家 2015-09-07 18:00 我要评论( )

The Best Way to Learn JavaScript.

The Best Way to Learn JavaScript

--------------------------------------------------------------------------------

----------------------------------------------------------------------------------

Assignment 2: appendTo’s Screencasts

任务2:

JavaScript 24-hour Trainer – This awesome resource was put together by Jeremy McPeak, who writes for Nettuts+ as well. It’s not just a book: it comes with over 4 hours of video tutorials on DVD. There are 43 lessons, covering everything from syntax to coding guidelines and code optimization.

       《JavaScript 24-hour Trainer 》由Jeremy McPeak 编撰,该作者也写过Nettuts+。它不仅仅是一本书:还附带了一张长达四小时的教学光碟。全书共43节课,涉及编码句法指导和代码优化。

While those books are great for understanding the JavaScript language and how to use it in the browser, there’s a lot more to learn. And while those books do go into some patterns and practices, here are two books devoted to those subjects that I think you’ll find useful.

       虽然这些书非常适合编程人员学习JavaScript语言以及如何在浏览器中使用这些语言,但是学无止境。虽然这些书的确进入了一些模式和实练中,我再推荐两本我认为有用的书。

JavaScript Patterns – Written by Stoyan Stefanov. I just finished reading this book, and, boy, do I wish I had read it sooner. After reading the resources above, you’ll know how to write JavaScript, but this book will teach you how to organize it, an important skill that isn’t as common as you’d think.

1)《JavaScript Patterns 》- Stoyan Stefanov著。我也是刚刚读完这本书,我真希望能尽快读完它。在读过上面的资源之后,你可以学到如何编写JavaScript,但是这本书会教你如何对资源进行重组,这项技能很重要,并非如你想象般简单。

JavaScript: The Good Parts – Written by Douglas Crockford. This little gem will explain what’s good and what’s bad about the JavaScript language.

2)《JavaScript:The Good Parts 》- Douglas Crockford 著。该书介绍了JavaScript的优缺点。

--------------------------------------------------------------------------------

---------------------------------------------------------------------------------

Assignment 6: Build Something!

任务6:做些事情!

As you worked through the resources above, you should have been following along with the code samples: pulling them apart, and tweaking them to see what happens. But now it’s time to really strike out on your own. It’s time to actually build something.

        在学习完上述资源后,你应该已经尝试了一些代码样本:修改代码、整合代码看看会怎么样。但是是时候让自己休息一下,做点东西出来了。

So, what can you build? There’s a lot you can do. Here are a couple of ideas.

       你能做什么呢?你能做很多东西。这里有一些意见。

A Photo Gallery: Display a set of photo thumbnails and a main photo. When a user clicks a thumbnail, have the larger version of the thumbnail (not the thumbnail itself) replace the current main photo. Bonus points if you can overlay a caption coming from the thumbnail alt tag, or loop through the photos if the user hasn’t clicked one for a minute.

1) 图片库:显示一套图片缩略图和主图。当用户点击缩略图的时候,要用较大的缩略图(不是原缩略图)替代当前的主图。如果你能覆盖缩略图alt 标记的标题就奖励积分,或是在用户一分钟内未点击的时候进行图片循环。

A To-do List: This might sound tougher than it is; but I’m not suggesting you build a full-fledged to-do application. Just have a text box with a button beside it; when you click the button, the entered text becomes an item in an unordered list below. Clicking on a list item removes it. It sounds simple enough, but there are several gotchas that it will be good for you to think about as a beginner.

2) 待办列表:听起来有点难,我也不打算推荐你制作一个完整的待办列表。只需要做一个文本框并在其旁放上按钮;点击按钮的时候,已输入的文字会在一个无序列表下面变成一个项目。点击列表项目便可移除。这听起来很容易,但有几个陷阱,对初学者来说仔细想想还是很有好处的。

An Animating Box: Animation is always tricky, but it doesn’t have to be complex. Have a div with some text in it, and several buttons above. One button can adjust the width; one, the height; and one, the background colour. The key is not to have the changes happen immediately, but over the course of, say, a second. Remember, Google is your friend, especially if you haven’t done any animation in JavaScript thus far.

3) 动画框:动画其实是小把戏而已,并不需要弄得太复杂。做一个包含了少许文本的div,其上要有若干按钮。一个按钮用来调整宽度,一个用来调整高度;还有一个用来调整背景颜色。关键是不要让更改发生得太快,但在一秒钟之内。记住,Google 是你的朋友,特别是如果迄今为止你还未用JavaScript 做任何动画的话。

I’m sure you can think of other projects that will be great practice. Of course, push yourself out of your comfort zone; that’s the only way to learn.

       我相信你能想到其他的很好的练习的计划。当然,学习的唯一方法是把自己从安乐窝里拽出来。

"Also, be sure to refer to the JavaScript category here on Nettuts+ for a massive list of tutorials, at all skill levels."

“此外,在所有的技能水平上,确保JavaScript 类别在Nettuts+上有大量教程列表。”

(Nettuts是一个专注于提供网络开发教程的网站。)

--------------------------------------------------------------------------------

----------------------------------------------------------------------------------

Assignment 7: Begin Learning a JavaScript Library

 

1.本站遵循行业规范,任何转载的稿件都会明确标注作者和来源;2.本站的原创文章,请转载时务必注明文章作者和来源,不尊重原创的行为我们将追究责任;3.作者投稿可能会经我们编辑修改或补充。

相关文章
  • 老生常谈,JavaScript闭包中的this对象

    老生常谈,JavaScript闭包中的this对象

    2016-02-26 10:21

  • 学习JavaScript之this,call,apply

    学习JavaScript之this,call,apply

    2016-01-28 20:45

  • JavaScript复习笔记--字符串

    JavaScript复习笔记--字符串

    2016-01-27 17:16

  • WEB前端教程-JavaScript里的类和继承

    WEB前端教程-JavaScript里的类和继承

    2016-01-21 15:28

网友点评
k