Skip to content

Instantly share code, notes, and snippets.

View juliadmytrenko's full-sized avatar
🎯
Focusing

Julia Dmytrenko juliadmytrenko

🎯
Focusing
View GitHub Profile
@scottopolis
scottopolis / splice-object-array.js
Last active February 27, 2025 04:57
Remove object from array of objects in Javascript
// we have an array of objects, we want to remove one object using only the id property
const apps = [{id:34,name:'My App',another:'thing'},{id:37,name:'My New App',another:'things'}];
// get index of object with id of 37
const removeIndex = apps.findIndex( item => item.id === 37 );
// remove object
apps.splice( removeIndex, 1 );
@iampava
iampava / header.component.php
Created March 28, 2018 12:50
Reusable HTML "components" with PHP
<?php
function createHeader() {
return '
<header>
<h1>
<span class="emoji">🚀</span>
TW Checklist
<span class="emoji">🚀</span>
</h1>
</header>