Message from JavaScript discussions

August 2017

— The problem is present when you use an array, say with a single element, that does not neccesarily indicate there is a length of 1

Message permanent page


For an array with something at index 2 and nothing else, I'll have a length of 3... but only one possible iteration, and thus the conditional fails

— Example of this failure:

var obj = ["one", "two", "three"];

var search = [];

search[2] = "three";

differentia.diff(obj, obj, search);  // undefined

Message permanent page

— This should return false, however... it only goes to index 2, as it's supposed to, and thus even though our search index only has one element, the iterations never reach 3, only 1, making the preemtion fail, and thus it never returns

Message permanent page

— The problem can be averted by using this regular object as a search index instead of an array:

var search = {2:"it doesn't matter what the value is if it's a primitive lol"};

Message permanent page

— Thoughts?

— Well, there must be a way to detect empty array slots

— Is js better than php?

— Anyone with this book

— Cross-platform desktop applications: with node, electron, and nw.js pdf

— Floofies did you get through it?

— Half