You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Yasser Moradi edited this page Aug 24, 2015
·
2 revisions
Description:
SkipWhile is the opposite of TakeWhile. Again a predicate is specified but this time items that meet
the condition are skipped. When an item is encountered that causes the predicate to return false,
this item and all that follow it are returned.
Samples:
letfruits=['Apple','Banana','Cherry','Damson','Elderberry','Grape','Kiwi','Lemon','Melon','Orange'];console.log('SkipWhile method continues skiping items unti string length be bigger or equal than 10 then return remaining items ...');letskipWhilePartitioned=fruits.asEnumerable().skipWhile(f=>f.length<10).toArray();for(letindex=0;index<skipWhilePartitioned.length;index++)console.log(skipWhilePartitioned[index]);