Lesson Planet
Search educational resources
  • Sign In Try It Free
  • AI Teacher Tools
    • Discover Resources Search reviewed educational resources by keyword, subject, grade, type, and more
    • Curriculum Manager (My Content) Manage saved and uploaded resources and folders To Access the Curriculum Manager Sign In or Join Now
    • Browse Resource Directory Browse educational resources by subject and topic
    • Curriculum Calendar Explore curriculum resources by date
    • Lesson Planning Articles Timely and inspiring teaching ideas that you can apply in your classroom
    • Our Story
    • Frequently Asked Questions
    • Testimonials
    • Contact Us
  • Pricing
  • School Access
    • Your school or district can sign up for Lesson Planet — with no cost to teachers
      Learn More
  • Sign In
  • Try It Free

Hi, what do you want to do?

Create a lesson plan
Create a lesson plan
Generate resources with 80+ AI teacher tools
Generate resources with 80+ AI teacher tools
Search 200,000 instructional videos
Search 200,000 instructional videos
Find a teaching resource
Find a teaching resource
Challenge: Moles in Holes Interactive
Publisher
Khan Academy
Resource Details
Curator Rating
Educator Rating
Not yet Rated
Grade
6th - Higher Ed
Subjects
STEM
1 more...
Resource Types
Activities & Projects
1 more...
Audiences
For Teacher Use
1 more...
Duration
15 mins
Instructional Strategies
Guided Practice
2 more...
Usage Permissions
Creative Commons
BY-NC-SA: 3.0
cc
Interactive

Challenge: Moles in Holes

Curated and Reviewed by Lesson Planet
This Challenge: Moles in Holes interactive also includes:
  • JavaScript Guide
  • Student Reference
  • Join to access all included materials

Move the moles to the holes in this simple coding exercise on using parameters in function calls. The task is broken down for you and the function that draws the mole is already provided. Your job is to add JavaScript code to call the function and provide parameters that position the mole just above the hole. 

9 Views 6 Downloads

Concepts

javascript, computer code, Computer Programming, coding, computer drawing, animation

Additional Tags

programming in javascript, drawing and animation coding

Pros

  • The results from changes in code are immediately displayed so coders can develop a deeper understanding of their code
  • Simple, easy-to-follow steps are broken down to help guide users through the coding exercise

Cons

  • You may need to adjust the function parameters to position the mole exactly, so that the program recognizes it as correct before confirming your completed exercise 

See similar resources:

Instructional Video

Learn to Code: Understanding Functions and Making a Guessing Game

Lifehacker
Here's where it all comes together. Using the skills learned in the previous three videos, the final installment of this series on JavaScript explores how to create functions. By the end of the video, young programmers will be able...
8 mins 9th - Higher Ed STEM
CCSS: Adaptable
Instructional Video

Function Parameters, Computer Programming

Khan Academy
Learn how functions in coding are even more helpful when you can pass parameters to them. The author shows how to modify a simple JavaScript function to have two parameters that help you position a repeated drawing to the correct place...
5 mins 6th - Higher Ed STEM
Instructional Video

Functions, Computer Programming

Khan Academy
The next step in your class's development as young programmers is learning to define and use a simple function in JavaScript code. Younger students may require some additional explanations to help highlight the importance of functions....
5 mins 6th - Higher Ed STEM
Instructional Video

Function Return Values, Computer Programming

Khan Academy
Functions that do calculations usually need to return a value. In this video, a function calculates and returns the total number of donuts eaten based on the years someone has been alive. Hopefully, your charges will have eaten much less...
5 mins 6th - Higher Ed STEM
Instructional Video

Learn to Code: Arrays and Logic Statements

Lifehacker
Young programmers learn about the concepts of arrays and logic statements with the third video in this introductory series on JavaScript. Starting with a brief explanation of arrays, the resource goes on to provide clear and...
14 mins 9th - Higher Ed STEM
CCSS: Adaptable
Lesson Plan

Creating Functions

Code.org
Quit repeating yourself ... you can make this simpler! Rather than repeating the same set of code over and over, class members learn to build and call functions in a series of challenges in App Lab. In the end, they combine...
9th - 12th STEM
Interactive

Challenge: Say Your Name

Khan Academy
Practice creating and using functions in a simple JavaScript coding exercise. Move code inside the function definition and then add lines to call the simple function. Adding function parameters and return values are covered later in this...
6th - Higher Ed STEM
Interactive

Challenge: Calculator

Khan Academy
Calculators aren't all that useful if they don't return the correct results. In this JavaScript programming exercise, beginning JavaScript coders are guided to fix the results returned by the functions so they return correct values....
6th - Higher Ed STEM
Lesson Plan

Creating Functions with Parameters

Code.org
The pupils practice modifying parameters in a function to add variations to their under the sea scene. The resource also introduces random number functions that alter the scene every time the program runs.
9th - 12th STEM
Interactive

Challenge: Funny Face

Khan Academy
A simple face can draw on the computer canvas using four lines of code each containing slightly different parameters to the ellipse function. Learners are guided through making changes to certain features such as making the mouth or eyes...
6th - Higher Ed STEM
Try It Free
© 1999-2026 Learning Explorer, Inc.
Teacher Lesson Plans, Worksheets and Resources

Sign up for the Lesson Planet Monthly Newsletter

Open Educational Resources (OER)

  • Health
  • Language Arts
  • Languages
  • Math
  • Physical Education
  • Science
  • Social Studies
  • Special Education
  • Visual and Performing Arts
View All Lesson Plans

Discover Resources

  • Our Review Process
  • How it Works
  • How to Search
  • Create a Collection

Manage Curriculum

  • Edit a Collection
  • Assign to Students
  • Manage My Content
Contact Us Site Map Privacy Policy Terms of Use