Skip to content

Instantly share code, notes, and snippets.

const arr = [2,4,5,6,8,9];
for(let num of arr) {
console.log(num);
}
const str = 'JavaScript';
for(let letter of str) {
console.log(letter);
let obj = {
a: 1,
b: 2,
c: 3,
d: 9
};
console.log(obj.propertyIsEnumerable('a'));
for (let key in obj) {
let obj = {};
Object.defineProperty(obj, 'a', {
value: 1,
enumerable: false
});
Object.defineProperty(obj, 'b', {
value: 2,
enumerable: false
FROM node:8
WORKDIR /home/nodejs/app
COPY . .
RUN npm install --production
CMD [“node”, “index.js”]
FROM node:8
RUN groupadd -r nodejs && useradd -m -r -g -s /bin/bash nodejs nodejs
USER nodejs
...
FROM node:8
RUN groupadd -r nodejs && useradd -m -r -g -s /bin/bash nodejs nodejs
USER nodejs
WORKDIR /home/nodejs/app
COPY package.json .
RUN npm install --production
FROM node:8
RUN groupadd -r nodejs && useradd -m -r -g -s /bin/bash nodejs nodejs
USER nodejs
WORKDIR /home/nodejs/app
COPY package.json .
RUN npm install --production
# !/bin/sh
docker tag helloworld:latest yourorg/helloworld:$SHA1
docker tag helloworld:latest yourorg/helloworld:$BRANCH_NAME
docker tag helloworld:latest yourorg/build_$BUILD_NUM
const GeoJSON = require('./geojson');
const data = [
{ name: 'Location A', category: 'Store', street: 'Market', lat: 39.984, lng: -75.343 },
{ name: 'Location B', category: 'House', street: 'Broad', lat: 39.284, lng: -75.833 },
{ name: 'Location C', category: 'Office', street: 'South', lat: 39.123, lng: -74.534 }
];
console.log(GeoJSON.parse(data, {Point: ['lat', 'lng']}));
import logger from '../logSetup';
getInstallment(month: number, count: number ): number {
logger.debug(`>>>> Entering getInstallment(month = ${month}, count= ${count}`);
// process
const installment: number = 3;
log.debug('<<<< Exiting getIntallment()');
return installment;