# Pass doors Puzzle from the [rendezvous with cassidoo](https://buttondown.email/cassidoo/archive/i-never-regretted-what-i-turned-down-angela/) newsletter from October 16th, 2022. > Let’s say you have n doors that start out as closed. With the first pass across the doors, you toggle every door open. With the second pass, you toggle every second door. With the third, every third door, and so on. Write a function that takes in an integer numberOfPasses, and returns how many doors are open after the number of passes. Solution posted at https://gist.github.com/zoeisnowooze/3fd5b2f592a82a1b79be386ff3c53c3e