Tuesday, November 26, 2019

4 Creative Ways to Generate Organic Instagram Engagement

Want more engagement on your Instagram posts? Wondering how to entice people to engage with you on Instagram? In this article, you’ll discover four out-of-the-ordinary ways to create Instagram posts that prompt people to engage with and click on your content. #1: Encourage Instagram Engagement With Brand-Relevant Puzzles The typical image or video post on […]

The post 4 Creative Ways to Generate Organic Instagram Engagement appeared first on Social Media Marketing | Social Media Examiner.


by George Mathew via Social Media Marketing | Social Media Examiner

Over 90% of the Internet Users don't think that Social Media Companies Protect their Personal Data!

It’s 2019 and it’s safe to say that internet has taken over the world. From shopping and communication facilities to even transportation services can be availed with the help of internet now. Therefore, with everything going online slowly and steadily, the issue of privacy gets brought up every now...

[ This is a content summary only. Visit our website https://ift.tt/1b4YgHQ for full links, other content, and more! ]

by Ali Siddiqui via Digital Information World

Template Review: Aria

‘Aria’ is a free HTML multipurpose template built by Landingrepo. Features include a sticky header navigation that smooth scrolls to sections, services overview, pricing table, testimonial slider, portfolio section with more info on pop-up, team and enquiry form.

Full Review


by Rob Hope @robhope via One Page Love

Are the top 1 percent publishers of app stores driving the majority of the app downloads?

According to new data from Sensor Tower, The top 1 percent of app store publishers have generated revenue with more than 80 percent of total 29.6 billion downloads of apps and all within the third quarter of the year 2019. If you take a look at this scenario, this means that only 20 percent or 6...

[ This is a content summary only. Visit our website https://ift.tt/1b4YgHQ for full links, other content, and more! ]

by agha ali via Digital Information World

Range Slider Style 51

The post Range Slider Style 51 appeared first on Best jQuery.


by Admin via Best jQuery

CSS Timeline Style 86

The post CSS Timeline Style 86 appeared first on Best jQuery.


by Admin via Best jQuery

Monday, November 25, 2019

Quick Tip: How to Sort an Array of Objects in JavaScript

If you have an array of objects that you need to sort into a certain order, you might be tempted to reach for a JavaScript library. But before you do, remember that you can do some pretty neat sorting with the native Array.sort function.

In this article, we'll show you how to sort an array of objects in JavaScript with no fuss or bother.

To follow along, you'll need a knowledge of basic JavaScript concepts, such as declaring variables, writing functions, and conditional statements. We'll also be using ES6 syntax. You can get a refresher on that via our extensive collection of ES6 guides. This popular article was updated in November 2019.

Sort an array of objects in JavaScript

Basic Array Sorting

By default, the JavaScript Array.sort function converts each element in the array that needs to be sorted into a string, and compares them in Unicode code point order.

const foo = [9, 1, 4, 'zebroid', 'afterdeck'];
foo.sort(); // returns [ 1, 4, 9, 'afterdeck', 'zebroid' ]

const bar = [5, 18, 32, new Set, { user: 'Eleanor Roosevelt' }];
bar.sort(); // returns [ 18, 32, 5, { user: 'Eleanor Roosevelt' }, Set {} ]

You may be wondering why 32 comes before 5. Not logical, huh? Well, actually it is. This happens because each element in the array is first converted to a string, and "32" comes before "5" in Unicode order.

It’s also worth noting that unlike many other JavaScript array functions, Array.sort actually changes, or mutates the array it sorts.

const baz = ['My cat ate my homework', 37, 9, 5, 17];
baz.sort(); // baz array is modified
console.log(baz); // shows [ 17, 37, 5, 9, 'My cat ate my homework' ]

To avoid this, you can create a new instance of the array to be sorted and modify that instead. This is possible using an array method that returns a copy of the array. For example, Array.slice:

const sortedBaz = baz.slice().sort(); // a new instance of the baz array is created and sorted

Or if you prefer a newer syntax, you can use the spread operator for the same effect:

const sortedBaz = [...baz].sort(); // a new instance of the baz array is created and sorted

The output is the same in both cases:

console.log(baz); // ['My cat ate my homework', 37, 9, 5, 17];
console.log(sortedBaz); // [ 17, 37, 5, 9, 'My cat ate my homework' ]

The post Quick Tip: How to Sort an Array of Objects in JavaScript appeared first on SitePoint.


by Olayinka Omole via SitePoint