Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- --IN MY LANGUAGE
- scope containsFalse -> function(array)
- for (value in array) :
- if (!value) :
- give(false)
- <-
- <-
- give(true)
- <-
- scope arrayOne, arrayTwo -> {true, true}, {false, true}
- output(containsFalse(arrayOne))
- output(containsFalse(arrayTwo))
- --IN LUA
- local containsFalse = function(array)
- for _, value in pairs(array) do
- if not value then
- return false
- end
- end
- return true
- end
- local arrayOne, arrayTwo = {true, true}, {false, true}
- print(containsFalse(arrayOne))
- print(containsFalse(arrayTwo))
Advertisement
Add Comment
Please, Sign In to add comment