Drop While

Remove elements from the start of an array while a condition is true.

Code

General
arr.drop_while { |x| x < threshold }

Parameters

Array

Drop while less than threshold

Server

More Ruby Snippets