What do you want to save?
Add Code snippet
New code examples
-
C# 2022-03-06 09:35:38
c# visitor pattern
using System; using System.Collections.Generic; namespace RefactoringGuru.DesignPatterns.Visitor.Conceptual { // The Component interface declares an `accept` method that should take the // base visitor interface as an argument. public interfa... Add solution -
Javascript 2021-11-11 20:32:16
javascript array of objects access properties
// The user object will be the test data for the notes taken below, // ALL NOTE ARE AND INFO CAN BE FOUND AT HACKERNOON! // THIS IS NOT MY WORK, I AM ONLY POSTING IT TO GREPPER FOR EASE OF USE OF FINDING THIS // MATERIAL LATER IF NEED BE! // With that ... Add solution -
Javascript 2021-09-25 17:28:05
access to nested properties on javascript using property names
const getNestedObject = (nestedObj, pathArr) => { return pathArr.reduce((obj, key) => (obj && obj[key] !== 'undefined') ? obj[key] : undefined, nestedObj); } // pass in your object structure as array elements const name = getNes... Add solution
Best helpers
+5
+5
+5
+5
+5
+5
+5
+5
+5
+5