Uncategorized

Some javascript tips funtion filter

By normal:   var animals = [“cat”,”dog”,”fish”]; var threeLetterAnimals = []; for (let count = 0; count < animals.length; count++){ if (animals[count].length === 3) { threeLetterAnimals.push(animals[count]); } } console.log(threeLetterAnimals); // [“cat”, “dog”]   By Filter: var animals = [“cat”,”dog”,”fish”]; var threeLetterAnimals = animals.filter(function(animal) { return animal.length === 3; }); console.log(threeLetterAnimals); // [“cat”, “dog”]   const… Continue reading Some javascript tips funtion filter

Uncategorized

PHP Optimization – Using A Timer To Benchmark Code And Increase Speed

One of the best parts about being a programmer is that there’s seemingly always a better way to do things. A simple code tweak can drastically improve the execution time of your web application. The faster your application executes the quicker you release precious server resources. The first step in optimizing your existing PHP-based web… Continue reading PHP Optimization – Using A Timer To Benchmark Code And Increase Speed