课程: JavaScript: Scope

今天就学习课程吧!

今天就开通帐号,24,700 门业界名师课程任您挑!

Challenge: Define local variable

Challenge: Define local variable - JavaScript教程

课程: JavaScript: Scope

Challenge: Define local variable

- [Instructor] So like we've done in the previous chapter, let's challenge you to code an example of a local variable. So here's the challenge. Define a function that console logs both a local and a global variable. But instead of working with strings, this time multiply two numbers which a number of warriors in an army. And in your code, test that the local variables are indeed not available globally. So good luck and I'll see you next.

内容