Skip to content

Instantly share code, notes, and snippets.

@DanDiplo
DanDiplo / JS-LINQ.js
Last active July 19, 2024 03:02
JavaScript equivalents of some common C# LINQ methods. To help me remember!
// JS array equivalents to C# LINQ methods - by Dan B.
// First: This version using older JavaScript notation for universal browser support (scroll down for ES6 version):
// Here's a simple array of "person" objects
var people = [
{ name: "John", age: 20 },
{ name: "Mary", age: 35 },
{ name: "Arthur", age: 78 },
{ name: "Mike", age: 27 },
@valryon
valryon / Timer.cs
Last active August 17, 2021 07:44
Unity simple Timer with co-routine
// 2014 - Pixelnest Studio
using System;
using System.Collections;
using UnityEngine;
/// <summary>
/// Ready to use timers for coroutines
/// </summary>
/// <summary>
/// Ready to use timers for coroutines