Write a function that returns the number of truthy values in a given array. Return 0 if given an empty array.
// Examples
version: '3.5' | |
services: | |
es5: | |
container_name: es5 | |
image: docker.elastic.co/elasticsearch/elasticsearch:5.6.10 | |
environment: | |
xpack.security.enabled: "false" | |
ES_JAVA_OPTS: '-Xms512m -Xmx512m' | |
ports: | |
- 9200:9200 |
apiVersion: apps/v1 | |
kind: Deployment | |
metadata: | |
name: 'manual-test-namespaced' | |
namespace: 'nile2' | |
labels: | |
app: 'manual-test-namespaced' | |
spec: | |
replicas: 2 | |
selector: |
openapi: 3.0.0 | |
info: | |
title: Sample API | |
description: Optional multiline or single-line description in [CommonMark](http://commonmark.org/help/) or HTML. | |
version: 0.1.9 | |
servers: | |
- url: http://api.example.com/v1 | |
description: Optional server description, e.g. Main (production) server | |
- url: http://staging-api.example.com | |
description: Optional server description, e.g. Internal staging server for testing |