JavaScript Lingo: Manipulating Data

Methods and functions are ways you can manipulate variables or other sets of information.

Methods are built in to JavaScript, and you will become more familiar with these as you write functions for the bonfires.

I'd suggest looking through the MDN (Mozilla Developer Network that we discussed in the first video) to familiarize yourself with the sheer amount and general potential for the methods that exist.

Examples include '.split(' ')', which will turn a string into an array and can do so in many different ways. Methods are powerful - many times when you want your script to do something, there's a method for that.

Functions, like variables, are something you define and create.

During your algorithm practice at Free Code Camp, you will create functions that take a certain piece of information and manipulate it in whatever way you choose.

You'll become more familiar with syntax there, but for now, just remember that with methods and functions you can do almost anything with your code.


方法是JavaScript中内置的, 当你在做 bonfires 的时候,会对这些更加熟悉。

我建议你通过 MDN (Mozilla Developer Network that we discussed in the first video) 来熟悉这些方法和其他一些功能。

例如 '.split(' ')'会返回一个字符串数组,并且可以通过多种方式来实现。 方法 是非常强大的- 许多时候,当你需要做某事的时候,总会有个方法来做这件事。


在你在Free Code Camp中的算法实践中, 你会创建一个函数来接收数据并按你的想法处理它。

那时候,你会更熟悉语法, 但是现在,你只要记住,使用方法和函数,你可以做几乎任何事情。