Our end of year sale ends soon 👀 Get a year of Courses for $150 (40% off!)

Learn React with us!

Dive into new course Game Development with Phaser 👾

💥 ALL NEW: Code Adventures! ⚡ Dare to embark on a front end coding adventure 🌟

New AI course: Introduction to Computer Vision 💻

Get job-ready with our Career Toolbox Track's career advice, resume tips, and more 🧰

🤖 Check out all our AI content here 👀

Learn about our new Community Discord server here and join us on Discord here!

Students: got a cool project or resource to share? Submit it to Treehouse Links! 🤩

  • Home
  • Free Trial
  • Sign In
  • Plans
  • Tracks
  • Library
  • Community
  • Code Adventures
  • Support
  • Jobs
    • Newest
      • Newest
      • Active
      • Unanswered
      • Featured
    • All Topics
      • All Topics
      • • General Discussion
      • • 21st Century Skills
      • • AI
      • • Android
      • • APIs
      • • Business
      • • C#
      • • Computer Science
      • • CSS
      • • Data Analysis
      • • Databases
      • • Design
      • • Development Tools
      • • Digital Literacy
      • • Equity, Diversity, and Inclusion (EDI)
      • • Go Language
      • • HTML
      • • Java
      • • JavaScript
      • • Learning Resources
      • • Machine Learning
      • • PHP
      • • Python
      • • Quality Assurance
      • • React
      • • Ruby
      • • Security
  • Samantha Atkinson
    seal-mask
    .a{fill-rule:evenodd;}techdegree
    Samantha Atkinson
    Front End Web Development Techdegree Student 36,955 Points

    Why can't I give setInterval function a delay time of 0/zero.

    Posted November 29, 2021 12:33pm by Samantha Atkinson
    .a{fill-rule:evenodd;}techdegree
    Samantha Atkinson
    Front End Web Development Techdegree Student 36,955 Points
    • JavaScript
    • Callback Functions in JavaScript
    • Callbacks with Timers
    • Using Anonymous Functions with setInterval

    2 Answers

  • chelseacheevers
    chelseacheevers
    13,786 Points

    Just Thankful

    Posted August 10, 2021 7:38pm by chelseacheevers
    chelseacheevers
    13,786 Points
    • JavaScript
    • Callback Functions in JavaScript
    • Callbacks with Timers
    • Using Anonymous Functions with setInterval

    0 Answers

  • jlampstack
    jlampstack
    23,932 Points

    Another Approach using IIFE

    Posted May 7, 2020 7:31pm by jlampstack
    jlampstack
    23,932 Points
    • JavaScript
    • Callback Functions in JavaScript
    • Callbacks with Timers
    • Using Anonymous Functions with setInterval

    1 Answer

  • Nick Burton
    Nick Burton
    7,387 Points

    How to run setInterval() with dynamic delay value

    Posted July 25, 2019 12:26pm by Nick Burton
    Nick Burton
    7,387 Points
    • JavaScript
    • Callback Functions in JavaScript
    • Callbacks with Timers
    • Using Anonymous Functions with setInterval

    2 Answers

  • Christian Higgins
    Christian Higgins
    15,758 Points

    Below is a way to not name a function variable, but is it a best practice?

    Posted March 17, 2019 9:01pm by Christian Higgins
    Christian Higgins
    15,758 Points
    • JavaScript
    • Callback Functions in JavaScript
    • Callbacks with Timers
    • Using Anonymous Functions with setInterval

    1 Answer

  • ammarkhan
    seal-mask
    .a{fill-rule:evenodd;}techdegree
    ammarkhan
    Front End Web Development Techdegree Student 21,661 Points

    Why didn't we use getTime in setInterval?

    Posted March 10, 2018 12:06pm by ammarkhan
    .a{fill-rule:evenodd;}techdegree
    ammarkhan
    Front End Web Development Techdegree Student 21,661 Points
    • JavaScript
    • Callback Functions in JavaScript
    • Callbacks with Timers
    • Using Anonymous Functions with setInterval

    1 Answer

  • Akash Sharma
    seal-mask
    .a{fill-rule:evenodd;}techdegree
    Akash Sharma
    Full Stack JavaScript Techdegree Student 14,147 Points

    What is the difference between anonymous function and a variable statement with function expression?

    Posted November 3, 2017 5:26pm by Akash Sharma
    .a{fill-rule:evenodd;}techdegree
    Akash Sharma
    Full Stack JavaScript Techdegree Student 14,147 Points
    • JavaScript
    • Callback Functions in JavaScript
    • Callbacks with Timers
    • Using Anonymous Functions with setInterval

    2 Answers

  • Sjoerd Vermeijden
    Sjoerd Vermeijden
    5,840 Points

    Why would i want to use an anonymous function over a named function?

    Posted July 26, 2017 7:44pm by Sjoerd Vermeijden
    Sjoerd Vermeijden
    5,840 Points
    • JavaScript
    • Callback Functions in JavaScript
    • Callbacks with Timers
    • Using Anonymous Functions with setInterval

    2 Answers

Posting to the forum is only allowed for members with active accounts.
Please sign in or sign up to post.

    Treehouse

  • About
  • Blog
  • Careers
  • Community
  • Stories
  • Shop
  • Contact
  • Gift Card

See Full Catalogue

Techdegree

  • Front End Web Development
  • Full Stack JavaScript
  • Python Development
  • Data Analysis
  • UX Design

Tracks

  • Learn to Code for Beginners
  • Beginning Python
  • Beginning SQL
  • Beginning Java
  • ...see more

Courses

  • JavaScript Basics
  • Intro to HTML & CSS
  • Python Basics
  • CSS Layout
  • ...see more

Explore

  • Plans
  • Perks
  • Public Library Access
  • Treehouse for Libraries
  • Treehouse for Businesses
  • Twitter
  • YouTube
  • Facebook
  • LinkedIn
  • Instagram
Terms & Conditions | Privacy

© 2023 Treehouse Island, Inc.