javascript - using an each-ready function for only one element? -
using jquery, can like
[1,2,3].each(my_func)
and inside my_func, don't receive arguments, can reference current number variable this
.
now let's want call my_func again 1 element. way:
[1].each(my_func)
is there better way call function again 1 element?
Comments
Post a Comment