Skip to content

Instantly share code, notes, and snippets.

@dance2die
Created April 14, 2018 20:59
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save dance2die/630c89d4a1ca751a73702dd23f83304e to your computer and use it in GitHub Desktop.
Save dance2die/630c89d4a1ca751a73702dd23f83304e to your computer and use it in GitHub Desktop.
// C#
==================== First/FirstOrDefault DEMO - Get First Order ====================
==================== First order after March ====================
Order ID: 3, Quantity: 30, Order Date: 03 Mar 2018 03:03 AM pst
==================== First or Default order after September ====================
<NULL>
// JS
==================== Filter (LINQ 'First/FirstOrDefault' Equivalent) DEMO - Get First Order ====================
==================== First order after March ====================
Order ID: 3, Quantity: 30, Order Date: Tue Apr 03 2018 03:03:03 GMT-0400 (Eastern Daylight Time)
==================== First or Default order after September ====================
<NULL>
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment