Logo
  • Home
  • About
  • PeoplePerHour
  • Home
  • About
  • PeoplePerHour

Javascript

14 Dec 2011
0

Counting number of properties in a JS object

In Javascript | 1 Comment

When there is a JS array, it is easy to count the number of elements. For example: var arr = [“hello”, “world”]; console.log(arr.length); // 2 However, when you have an object it is a bit more tricky. .length wont work. One way is to iterate…

Recent Posts
  • Our Tech Stack 2020
  • Testing nginx rewrite performance
  • Kubernetes upgrading from autoscaling/v2beta1 to autoscaling/v2beta2
  • Our Tech Stack 2018
  • Working around the lack of volumes-from in Kubernetes
  • EKS – best instance type to use as worker nodes optimising for price per IP address
  • Our Tech Stack
  • AWS Lambda development pipeline
  • Presentation on agility and anti-fragility
  • New CoreOS out – list dangling volumes
Archives
  • January 2021
  • May 2020
  • August 2019
  • October 2018
  • August 2018
  • July 2018
  • September 2016
  • July 2016
  • April 2016
  • October 2015
  • May 2015
  • March 2015
  • February 2015
  • July 2014
  • June 2014
  • March 2014
  • April 2013
  • July 2012
  • December 2011
  • November 2011
Cloud
agile AWS background confluence CoreOS cors Cron css devops Docker git Gotcha howitworks iops jquery js Kubernetes microservices Networking nginx performance PHP SES shell sprites trac Yii