What do you want to save?
Add Code snippet
New code examples
-
PHP 2022-03-23 04:25:31
php sort array remove keys
<?php $fruits = array("d" => "lemon", "a" => "orange", "b" => "banana", "c" => "apple"); asort($fruits); foreach ($fruits as $key => $val) { echo "$... Add solution -
Javascript 2022-03-19 17:25:26
sorting of categories and subcategories in js
function iterative(categories, parentCategory, level = 0) { return categories .filter((category) => parentCategory ? category.parent === parentCategory : !category.parent) .map(category => { category.level = level; return cat... Add solution -
-
Python 2022-03-17 02:55:09
Check if a string is lapindrome or not in Python
s=input() s1,s2='','' if(len(s)%2==0): s1=s[:len(s)//2] s2=s[len(s)//2:] else: s1=s[:len(s)//2] s2=s[len(s)//2+1:] l1=list(s1) l2=list(s2) l1.sort() l2.sort() s1=str(l1) s2=str(l2) if(s1==s2): print('YES') else: print('NO') Add solution -
PHP 2022-03-17 01:00:02
php array sort by key value
$inventory = array( array("type"=>"fruit", "price"=>3.50), array("type"=>"milk", "price"=>2.90), array("type"=>"pork", "price"=>5.43), )... Add solution -
Javascript 2022-03-16 21:05:03
my js
const express = require('express') const app = express() const port = 3000 app.get('/', (req, res) => res.send('Hello World!')) var points = [40, 100, 1, 5, 25, 10]; points.sort((a,b) => a-b) var newArray = array.filter(function(item) { return ... Add solution
Best helpers
Ranking is empty