React: Unexpected use of 'location';Solution: Use window.location instead of bare location.
React: Unexpected use of 'location';Solution: Use window.location instead of bare location.
| 'use strict'; | |
| /*****************NATIVE forEACH*********************/ | |
| Array.prototype.myEach = function(callback) { | |
| for (var i = 0; i < this.length; i++) | |
| callback(this[i], i, this); | |
| }; | |
| //tests | 
| { | |
| "estados": [ | |
| { | |
| "sigla": "AC", | |
| "nome": "Acre", | |
| "cidades": [ | |
| "Acrelândia", | |
| "Assis Brasil", | |
| "Brasiléia", | |
| "Bujari", | 
| var mongoObjectId = function () { | |
| var timestamp = (new Date().getTime() / 1000 | 0).toString(16); | |
| return timestamp + 'xxxxxxxxxxxxxxxx'.replace(/[x]/g, function() { | |
| return (Math.random() * 16 | 0).toString(16); | |
| }).toLowerCase(); | |
| }; |