Posts by Gabriel Maia • 149 points
4 posts
-
2
votes1
answer137
viewsQ: How can I make an object if 'auto-delete' in Javascript?
I tried something like: function Objeto(){ this.del = function(){ delete this; } } var a = new Objeto(); a.del(); But the variable a is still existing I know the method quoted in the @bfavaretto…
-
4
votes2
answers581
viewsQ: Location of a point within the arc range
I’m looking for a Javascript function that returns a random value within a range in the area of a circle. The interval would be along the radius with distances equivalent to the center point and the…
-
3
votes1
answer65
viewsQ: Reference not found for object property
I developed a simple code of particles in codepen.io and its execution generates a log with the error: Uncaught TypeError: Cannot read property 'color' of undefined What is the reason for the error?…
-
5
votes1
answer136
viewsQ: Generate a random value in a range, excluding a range
Using Javascript how to make an interval with random values with an internal interval deleted? Exemplifying: min | | | | |x|x|x|x|x|x| | | | | max | | = accepted value |x| = denied value Code used:…