This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| function factory(i) { | |
| return function() { | |
| i++; | |
| console.log(i); | |
| }; | |
| } | |
| const contadorDesde5 = factory(5); // 1 | |
| contadorDesde5(); |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| const request = require('request') | |
| const data = require('./urls') | |
| const fs = require('fs') | |
| const urls = data.map(product => ({ | |
| url: product['PRODUCTIMAGEURL'], | |
| name: product['PRODUCTSKU'] | |
| })) | |
| function processImg(url, name) { |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| function isPrimeNumberRecursive(n, next) { | |
| if (n <= 1) { | |
| return false | |
| } | |
| if (!next) { | |
| next = n - 1 | |
| } |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| require('blanket'); | |
| var chai = require('chai'), | |
| chaiHttp = require('chai-http'); | |
| var should = chai.should(); | |
| var server = require('../../server'); | |
| chai.use(chaiHttp); | |
| describe('Product UT:', function() { |