From the course: Learning the JavaScript Language
Unlock the full course today
Join today to access over 24,400 courses taught by industry experts.
Arguments and parameters in functions - JavaScript Tutorial
From the course: Learning the JavaScript Language
Arguments and parameters in functions
- [Instructor] In this video, we're going to extend our knowledge of functions using arguments to solve a couple different kinds of problems. The first is taking some data and modifying it. The second is getting an answer to a question in a way we'll need to use repeatedly. We'll start by looking at modifying some data. Let's say I wanted to be able to take any string and change it so it looks like it was being said by Elmer Fudd from the "Looney Tunes" Bugs Bunny cartoons. His manner of speaking changes all R sounds to W sounds. So I have a function called "fuddify", loaded here in Node that does that. We're going to try it out before we look at it. So for example, if I feed that function, "Be very quiet, I'm hunting rabbits," I'll copy and paste that here into my terminal and I get, "Be very quiet, I'm hunting wabbits." And we'll just have a whole bunch of the sorts of things that Elmer Fudd might say. Like, "You screwy…
Contents
-
-
-
-
-
-
-
-
(Locked)
Basic functions4m 20s
-
(Locked)
Arguments and parameters in functions6m 54s
-
(Locked)
More on function arguments5m 3s
-
(Locked)
Objects, references, and functions7m 4s
-
(Locked)
Functions are objects5m 8s
-
(Locked)
Jargon: Scope in JavaScript2m 30s
-
(Locked)
Functions and scope5m 11s
-
(Locked)
Writing shorter functions with arrows3m 12s
-
(Locked)
Three little dots collect the rest4m 14s
-
(Locked)
Callback functions and looping4m 34s
-
(Locked)
-
-