Wednesday 19 December 2018

How to remove item from a JavaScript object







How can I remove an item from a JavaScript object?




Like this:



var test = {'red':'#FF0000', 'blue':'#0000FF'};
test.remove('blue');

No comments:

Post a Comment

php - file_get_contents shows unexpected output while reading a file

I want to output an inline jpg image as a base64 encoded string, however when I do this : $contents = file_get_contents($filename); print &q...