What do you want to save?
Add Code snippet
New code examples
-
Javascript 2021-09-23 09:40:03
linear search javascript
// arr.indexOf(val) function linearSearchIndexOf(arr, val) { for (let i = 0; i < arr.length; i++) { if (arr[i] === val) { return i; } } return -1; } // arr.includes(val) function linearSearchIncludes(arr, val) { for (let i = 0;... Add solution -
Javascript 2021-09-12 03:18:02
Each then() should return a value or throw
outer.get('/account', function(req, res) { var id = req.user.uid var userRef = firebase.db.collection('users').doc(id) var profilePromise = userRef.get().then(doc => { if (doc.exists) { var profile = doc.data() profile.id = doc.id... Add solution -
Javascript 2021-09-01 00:34:01
object doesn't support this property or method find
//.find isnt supported in IE11, under here is a polyfill if (!Array.prototype.find) { Object.defineProperty(Array.prototype, 'find', { value: function(predicate) { // 1. Let O be ? ToObject(this value). if (this == null) { throw n... Add solution
Best helpers
Ranking is empty