掌握 JavaScript 的项目想法

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

Project ideas to master JavaScript

javascriptdom-eventsjavascript-framework

提问by donald

This question is the following of my other question here: Cannot understand node.js

这个问题是我在这里的另一个问题的以下内容:无法理解 node.js

I decided to learn JavaScript, however and in spite of I learn by doing, I don't find anything I can be doing in order to learn JavaScript.

我决定学习 JavaScript,然而,尽管我边做边学,但我找不到任何我可以做的事情来学习 JavaScript。

What projects do you recommend me to start?What cool things can I do to improve my skills from beginning to master? Please don't propose almost impossible projects for a beginner, I'd like to know everything about JS but starting from something not very easy but not very hard.

你推荐我开始什么项目?什么很酷的事情我可以做从开始提高我的技能高手?请不要为初学者提出几乎不可能的项目,我想了解关于 JS 的一切,但从一些不太容易但也不太难的事情开始。

回答by Jakob

If you want to learn about JavaScript with the intent of understanding the language itself and Node.js, you should not do anything that has do to with a browser. That will just force you to focus on quirks and silly DOM-things. Even jQuery would be wrong in my opinion as it is a framework for working with the browser.

如果您想了解 JavaScript 并希望了解语言本身和 Node.js,您不应该做任何与浏览器有关的事情。这只会迫使您专注于怪癖和愚蠢的 DOM 事物。在我看来,即使 jQuery 也是错误的,因为它是一个与浏览器一起工作的框架。

Write a good old regular command-line program. Write a BlackHyman game. If you like maths, solve some Project Eulerproblems. If you want to do some asynchronous and web-like things, scrape a website for info and print it in the terminal. Or make a tiny website using Node.js as a server.

编写一个很好的旧常规命令行程序。编写一个二十一点游戏。如果您喜欢数学,请解决一些Project Euler问题。如果您想做一些异步和类似网络的事情,请抓取网站以获取信息并将其打印在终端中。或者使用 Node.js 作为服务器制作一个小型网站。

Really, just do anything, but stay away from browser scripting (unless that is what you want to learn) :)

真的,做任何事情,但远离浏览器脚本(除非这是你想学习的):)

回答by Ionu? Staicu

I learned jQuery a lotby making a sort of website builder (drag and drop, etc), without knowing a bit of JavaScript (other than getElementByIdand innerHTML). I wasn't happy with performance (jQuery 1.1.x after all) and I started to learn and apply various optimization tips. After few months I realized that I know JavaScript at a satisfactory level (I was like Neo: I know Kung Fu!)

我通过制作一种网站构建器(拖放等)学到了很多jQuery ,而无需了解一点 JavaScript(除了getElementByIdinnerHTML)。我对性能不满意(毕竟是 jQuery 1.1.x),我开始学习和应用各种优化技巧。几个月后我意识到我对 JavaScript 的了解达到了令人满意的水平(我就像Neo:我知道功夫!

As a book, I'd recommend that you read Professional JavaScript. It covers a lot of topics, starting from basic stuff, going to advanced stuff.

作为一本书,我建议您阅读Professional JavaScript。它涵盖了很多主题,从基本内容到高级内容。

回答by Mark Baijens

I recommend start learning the work of DOM en WOM (Document Object Model) and (Window Object Model) Try change html code with your javescript (delete elements, add elements, edit elements). Do the same for attributes. When you understand this you can learn yourself some ajax. With this you got the core of js functionality. If you want to learn more you can start trying to make movable objects or something.

我建议开始学习 DOM en WOM(文档对象模型)和(窗口对象模型)的工作。尝试使用您的 javescript 更改 html 代码(删除元素、添加元素、编辑元素)。对属性执行相同的操作。当你明白这一点时,你可以自己学习一些ajax。有了这个,你就获得了 js 功能的核心。如果你想了解更多,你可以开始尝试制作可移动的物体或其他东西。

I recommend looking into jQuery aswell when you mastered the javascript language. This is a great javascript library with really good documentation that makes it a lot easier to develop in javascript. http://jquery.com

当您掌握了 javascript 语言时,我建议您也研究 jQuery。这是一个很棒的 javascript 库,有非常好的文档,可以让在 javascript 中开发变得容易得多。 http://jquery.com

(I'm assuming you familiar with some kind of php/java or other language that uses things like functions and objects)

(我假设您熟悉某种 php/java 或其他使用函数和对象之类的语言)

As a project you can think of making a new layout for an excising site using javascript to edit the elements. For example change the layout when some button is pressed. http://www.w3schools.com/js/default.aspis a great site to do some tutorials.

作为一个项目,您可以考虑使用 javascript 编辑元素为切除站点制作新布局。例如,当按下某个按钮时更改布局。 http://www.w3schools.com/js/default.asp是一个做一些教程的好网站。