{"json_modified": "2016-04-04T12:31:38.466450", "uuid": "949f4a92-73b9-4eec-944c-d5fad50c5dfd", "title": "Atomics.exchange()", "url": "/en-US/docs/Web/JavaScript/Reference/Global_Objects/Atomics/exchange", "tags": ["Shared Memory", "Experimental", "Atomics", "Method", "JavaScript"], "translations": [{"uuid": "ad4e3e79-bc08-4df1-a56d-c69982e8bd40", "title": "Atomics.exchange()", "url": "/fr/docs/Web/JavaScript/Reference/Objets_globaux/Atomics/exchange", "tags": ["M\u00e9moire partag\u00e9e", "M\u00e9thode", "Atomics", "Exp\u00e9rimental", "JavaScript"], "summary": "La m\u00e9thode statique Atomics
.exchange()
permet d'\u00e9changer une valeur donn\u00e9e \u00e0 une position donn\u00e9e du tableau et de renvoyer l'ancienne valeur qui \u00e9tait contenue dans le tableau. Cette op\u00e9ration atomique garantit qu'aucune autre op\u00e9ration d'\u00e9criture n'est appliqu\u00e9e tant que la valeur modifi\u00e9e n'est pas \u00e9crite.", "localization_tags": [], "locale": "fr", "last_edit": "2016-01-30T08:25:13", "review_tags": []}], "modified": "2016-04-04T12:31:38", "label": "Atomics.exchange()", "localization_tags": [], "locale": "en-US", "id": 173497, "last_edit": "2016-01-28T11:35:54", "summary": "The static Atomics
.exchange()
method exchanges a given value at a given position in the array and returns the old value at that position. This atomic operation guarantees that no other write happens until the modified value is written back.", "sections": [{"id": "Quick_Links", "title": null}, {"id": "Syntax", "title": "Syntax"}, {"id": "Parameters", "title": "Parameters"}, {"id": "Return_value", "title": "Return value"}, {"id": "Exceptions", "title": "Exceptions"}, {"id": "Examples", "title": "Examples"}, {"id": "Specifications", "title": "Specifications"}, {"id": "Browser_compatibility", "title": "Browser compatibility"}, {"id": "See_also", "title": "See also"}], "slug": "Web/JavaScript/Reference/Global_Objects/Atomics/exchange", "review_tags": []}