Replace First Item In Array Javascript Methods And Functions