Movatterモバイル変換


[0]ホーム

URL:


Skip to content

Navigation Menu

Sign in
Appearance settings

Search code, repositories, users, issues, pull requests...

Provide feedback

We read every piece of feedback, and take your input very seriously.

Saved searches

Use saved searches to filter your results more quickly

Sign up
Appearance settings

License

NotificationsYou must be signed in to change notification settings

Paparacis/javascript-fix-the-scope-lab-js-intro-000

 
 

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

18 Commits
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

Objectives

  • Explore scope in JavaScript
  • Exercise bug-finding skills related to scope issues

Instructions

In this lab, you'll need to debug some issues related to function scope in #"auto">As usual, start by running the specs and reading the results. Then fix some things, run the tests again, and repeat.

You're probably pretty good at this right now — good luck!

A Hint About()

Remember the purpose of using() is to call functions in JavaScript. It essentially tells our code toexecute the function. A function called without a(), like simplyfunctionName, will return the function but NOT run it. You'll see the return value as[Function: functionName].

To get our code to execute that function, we instead callfunctionName(), which executes the code within that function.

As an example, the third test here at first returns:Error: Expected [Function: funkyFunction] to equal 'FUNKY!'

We can make the function execute by saying this:var theFunk = funkyFunction() But this returns ANOTHER FUNCTION! How would we tell that function to execute to return the string within it?

Resources

ViewFix The Scope Lab on Learn.co and start learning to code for free.

About

No description, website, or topics provided.

Resources

License

Contributing

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published

Languages

  • JavaScript77.1%
  • HTML22.9%

[8]ページ先頭

©2009-2025 Movatter.jp