diff options
author | Florian Merz <me@fiji-flo.de> | 2021-02-11 14:45:12 +0100 |
---|---|---|
committer | Florian Merz <me@fiji-flo.de> | 2021-02-11 14:45:12 +0100 |
commit | cb9e359a51c3249d8f5157db69d43fd413ddeda6 (patch) | |
tree | ae3040d626c3b5717da5bda2af9f0a9ff9bd389f /files/ca/web/javascript | |
parent | 8260a606c143e6b55a467edf017a56bdcd6cba7e (diff) | |
download | translated-content-cb9e359a51c3249d8f5157db69d43fd413ddeda6.tar.gz translated-content-cb9e359a51c3249d8f5157db69d43fd413ddeda6.tar.bz2 translated-content-cb9e359a51c3249d8f5157db69d43fd413ddeda6.zip |
unslug ca: move
Diffstat (limited to 'files/ca/web/javascript')
-rw-r--r-- | files/ca/web/javascript/about_javascript/index.html (renamed from files/ca/web/javascript/quant_a_javascript/index.html) | 0 | ||||
-rw-r--r-- | files/ca/web/javascript/guide/expressions_and_operators/index.html (renamed from files/ca/web/javascript/guide/expressions_i_operadors/index.html) | 0 | ||||
-rw-r--r-- | files/ca/web/javascript/guide/introduction/index.html (renamed from files/ca/web/javascript/guide/introducció/index.html) | 0 | ||||
-rw-r--r-- | files/ca/web/javascript/introducció_al_javascript_orientat_a_objectes/index.html | 362 | ||||
-rw-r--r-- | files/ca/web/javascript/reference/about/index.html (renamed from files/ca/web/javascript/referencia/sobre/index.html) | 0 | ||||
-rw-r--r-- | files/ca/web/javascript/reference/classes/constructor/index.html (renamed from files/ca/web/javascript/referencia/classes/constructor/index.html) | 0 | ||||
-rw-r--r-- | files/ca/web/javascript/reference/classes/index.html (renamed from files/ca/web/javascript/referencia/classes/index.html) | 0 | ||||
-rw-r--r-- | files/ca/web/javascript/reference/classes/static/index.html (renamed from files/ca/web/javascript/referencia/classes/static/index.html) | 0 | ||||
-rw-r--r-- | files/ca/web/javascript/reference/errors/read-only/index.html (renamed from files/ca/web/javascript/reference/errors/nomes-lectura/index.html) | 0 | ||||
-rw-r--r-- | files/ca/web/javascript/reference/functions/rest_parameters/index.html (renamed from files/ca/web/javascript/reference/functions/parameters_rest/index.html) | 0 | ||||
-rw-r--r-- | files/ca/web/javascript/reference/global_objects/array/entries/index.html (renamed from files/ca/web/javascript/referencia/objectes_globals/array/entries/index.html) | 0 | ||||
-rw-r--r-- | files/ca/web/javascript/reference/global_objects/array/every/index.html (renamed from files/ca/web/javascript/referencia/objectes_globals/array/every/index.html) | 0 | ||||
-rw-r--r-- | files/ca/web/javascript/reference/global_objects/array/fill/index.html (renamed from files/ca/web/javascript/referencia/objectes_globals/array/fill/index.html) | 0 | ||||
-rw-r--r-- | files/ca/web/javascript/reference/global_objects/array/filter/index.html (renamed from files/ca/web/javascript/referencia/objectes_globals/array/filter/index.html) | 0 | ||||
-rw-r--r-- | files/ca/web/javascript/reference/global_objects/array/find/index.html (renamed from files/ca/web/javascript/referencia/objectes_globals/array/find/index.html) | 0 | ||||
-rw-r--r-- | files/ca/web/javascript/reference/global_objects/array/findindex/index.html (renamed from files/ca/web/javascript/referencia/objectes_globals/array/findindex/index.html) | 0 | ||||
-rw-r--r-- | files/ca/web/javascript/reference/global_objects/array/foreach/index.html (renamed from files/ca/web/javascript/referencia/objectes_globals/array/foreach/index.html) | 0 | ||||
-rw-r--r-- | files/ca/web/javascript/reference/global_objects/array/includes/index.html (renamed from files/ca/web/javascript/referencia/objectes_globals/array/includes/index.html) | 0 | ||||
-rw-r--r-- | files/ca/web/javascript/reference/global_objects/array/index.html (renamed from files/ca/web/javascript/referencia/objectes_globals/array/index.html) | 0 | ||||
-rw-r--r-- | files/ca/web/javascript/reference/global_objects/array/indexof/index.html (renamed from files/ca/web/javascript/referencia/objectes_globals/array/indexof/index.html) | 0 | ||||
-rw-r--r-- | files/ca/web/javascript/reference/global_objects/array/isarray/index.html (renamed from files/ca/web/javascript/referencia/objectes_globals/array/isarray/index.html) | 0 | ||||
-rw-r--r-- | files/ca/web/javascript/reference/global_objects/array/join/index.html (renamed from files/ca/web/javascript/referencia/objectes_globals/array/join/index.html) | 0 | ||||
-rw-r--r-- | files/ca/web/javascript/reference/global_objects/array/keys/index.html (renamed from files/ca/web/javascript/referencia/objectes_globals/array/keys/index.html) | 0 | ||||
-rw-r--r-- | files/ca/web/javascript/reference/global_objects/array/lastindexof/index.html (renamed from files/ca/web/javascript/referencia/objectes_globals/array/lastindexof/index.html) | 0 | ||||
-rw-r--r-- | files/ca/web/javascript/reference/global_objects/array/length/index.html (renamed from files/ca/web/javascript/referencia/objectes_globals/array/length/index.html) | 0 | ||||
-rw-r--r-- | files/ca/web/javascript/reference/global_objects/array/map/index.html (renamed from files/ca/web/javascript/referencia/objectes_globals/array/map/index.html) | 0 | ||||
-rw-r--r-- | files/ca/web/javascript/reference/global_objects/array/of/index.html (renamed from files/ca/web/javascript/referencia/objectes_globals/array/of/index.html) | 0 | ||||
-rw-r--r-- | files/ca/web/javascript/reference/global_objects/array/pop/index.html (renamed from files/ca/web/javascript/referencia/objectes_globals/array/pop/index.html) | 0 | ||||
-rw-r--r-- | files/ca/web/javascript/reference/global_objects/array/push/index.html (renamed from files/ca/web/javascript/referencia/objectes_globals/array/push/index.html) | 0 | ||||
-rw-r--r-- | files/ca/web/javascript/reference/global_objects/array/reduce/index.html (renamed from files/ca/web/javascript/referencia/objectes_globals/array/reduce/index.html) | 0 | ||||
-rw-r--r-- | files/ca/web/javascript/reference/global_objects/array/reverse/index.html (renamed from files/ca/web/javascript/referencia/objectes_globals/array/reverse/index.html) | 0 | ||||
-rw-r--r-- | files/ca/web/javascript/reference/global_objects/array/shift/index.html (renamed from files/ca/web/javascript/referencia/objectes_globals/array/shift/index.html) | 0 | ||||
-rw-r--r-- | files/ca/web/javascript/reference/global_objects/array/slice/index.html (renamed from files/ca/web/javascript/referencia/objectes_globals/array/slice/index.html) | 0 | ||||
-rw-r--r-- | files/ca/web/javascript/reference/global_objects/array/some/index.html (renamed from files/ca/web/javascript/referencia/objectes_globals/array/some/index.html) | 0 | ||||
-rw-r--r-- | files/ca/web/javascript/reference/global_objects/array/splice/index.html (renamed from files/ca/web/javascript/referencia/objectes_globals/array/splice/index.html) | 0 | ||||
-rw-r--r-- | files/ca/web/javascript/reference/global_objects/boolean/index.html (renamed from files/ca/web/javascript/referencia/objectes_globals/boolean/index.html) | 0 | ||||
-rw-r--r-- | files/ca/web/javascript/reference/global_objects/boolean/tosource/index.html (renamed from files/ca/web/javascript/referencia/objectes_globals/boolean/tosource/index.html) | 0 | ||||
-rw-r--r-- | files/ca/web/javascript/reference/global_objects/boolean/tostring/index.html (renamed from files/ca/web/javascript/referencia/objectes_globals/boolean/tostring/index.html) | 0 | ||||
-rw-r--r-- | files/ca/web/javascript/reference/global_objects/boolean/valueof/index.html (renamed from files/ca/web/javascript/referencia/objectes_globals/boolean/valueof/index.html) | 0 | ||||
-rw-r--r-- | files/ca/web/javascript/reference/global_objects/dataview/prototype/index.html | 147 | ||||
-rw-r--r-- | files/ca/web/javascript/reference/global_objects/date/getdate/index.html (renamed from files/ca/web/javascript/referencia/objectes_globals/date/getdate/index.html) | 0 | ||||
-rw-r--r-- | files/ca/web/javascript/reference/global_objects/date/getday/index.html (renamed from files/ca/web/javascript/referencia/objectes_globals/date/getday/index.html) | 0 | ||||
-rw-r--r-- | files/ca/web/javascript/reference/global_objects/date/getfullyear/index.html (renamed from files/ca/web/javascript/referencia/objectes_globals/date/getfullyear/index.html) | 0 | ||||
-rw-r--r-- | files/ca/web/javascript/reference/global_objects/date/gethours/index.html (renamed from files/ca/web/javascript/referencia/objectes_globals/date/gethours/index.html) | 0 | ||||
-rw-r--r-- | files/ca/web/javascript/reference/global_objects/date/getmilliseconds/index.html (renamed from files/ca/web/javascript/referencia/objectes_globals/date/getmilliseconds/index.html) | 0 | ||||
-rw-r--r-- | files/ca/web/javascript/reference/global_objects/date/getminutes/index.html (renamed from files/ca/web/javascript/referencia/objectes_globals/date/getminutes/index.html) | 0 | ||||
-rw-r--r-- | files/ca/web/javascript/reference/global_objects/date/getmonth/index.html (renamed from files/ca/web/javascript/referencia/objectes_globals/date/getmonth/index.html) | 0 | ||||
-rw-r--r-- | files/ca/web/javascript/reference/global_objects/date/getseconds/index.html (renamed from files/ca/web/javascript/referencia/objectes_globals/date/getseconds/index.html) | 0 | ||||
-rw-r--r-- | files/ca/web/javascript/reference/global_objects/date/gettime/index.html (renamed from files/ca/web/javascript/referencia/objectes_globals/date/gettime/index.html) | 0 | ||||
-rw-r--r-- | files/ca/web/javascript/reference/global_objects/date/gettimezoneoffset/index.html (renamed from files/ca/web/javascript/referencia/objectes_globals/date/gettimezoneoffset/index.html) | 0 | ||||
-rw-r--r-- | files/ca/web/javascript/reference/global_objects/date/getutcdate/index.html (renamed from files/ca/web/javascript/referencia/objectes_globals/date/getutcdate/index.html) | 0 | ||||
-rw-r--r-- | files/ca/web/javascript/reference/global_objects/date/getutcday/index.html (renamed from files/ca/web/javascript/referencia/objectes_globals/date/getutcday/index.html) | 0 | ||||
-rw-r--r-- | files/ca/web/javascript/reference/global_objects/date/getutcfullyear/index.html (renamed from files/ca/web/javascript/referencia/objectes_globals/date/getutcfullyear/index.html) | 0 | ||||
-rw-r--r-- | files/ca/web/javascript/reference/global_objects/date/getutchours/index.html (renamed from files/ca/web/javascript/referencia/objectes_globals/date/getutchours/index.html) | 0 | ||||
-rw-r--r-- | files/ca/web/javascript/reference/global_objects/date/getutcmilliseconds/index.html (renamed from files/ca/web/javascript/referencia/objectes_globals/date/getutcmilliseconds/index.html) | 0 | ||||
-rw-r--r-- | files/ca/web/javascript/reference/global_objects/date/getutcminutes/index.html (renamed from files/ca/web/javascript/referencia/objectes_globals/date/getutcminutes/index.html) | 0 | ||||
-rw-r--r-- | files/ca/web/javascript/reference/global_objects/date/getutcmonth/index.html (renamed from files/ca/web/javascript/referencia/objectes_globals/date/getutcmonth/index.html) | 0 | ||||
-rw-r--r-- | files/ca/web/javascript/reference/global_objects/date/getutcseconds/index.html (renamed from files/ca/web/javascript/referencia/objectes_globals/date/getutcseconds/index.html) | 0 | ||||
-rw-r--r-- | files/ca/web/javascript/reference/global_objects/date/getyear/index.html (renamed from files/ca/web/javascript/referencia/objectes_globals/date/getyear/index.html) | 0 | ||||
-rw-r--r-- | files/ca/web/javascript/reference/global_objects/date/index.html (renamed from files/ca/web/javascript/referencia/objectes_globals/date/index.html) | 0 | ||||
-rw-r--r-- | files/ca/web/javascript/reference/global_objects/date/now/index.html (renamed from files/ca/web/javascript/referencia/objectes_globals/date/now/index.html) | 0 | ||||
-rw-r--r-- | files/ca/web/javascript/reference/global_objects/date/setdate/index.html (renamed from files/ca/web/javascript/referencia/objectes_globals/date/setdate/index.html) | 0 | ||||
-rw-r--r-- | files/ca/web/javascript/reference/global_objects/date/setfullyear/index.html (renamed from files/ca/web/javascript/referencia/objectes_globals/date/setfullyear/index.html) | 0 | ||||
-rw-r--r-- | files/ca/web/javascript/reference/global_objects/date/sethours/index.html (renamed from files/ca/web/javascript/referencia/objectes_globals/date/sethours/index.html) | 0 | ||||
-rw-r--r-- | files/ca/web/javascript/reference/global_objects/date/setmilliseconds/index.html (renamed from files/ca/web/javascript/referencia/objectes_globals/date/setmilliseconds/index.html) | 0 | ||||
-rw-r--r-- | files/ca/web/javascript/reference/global_objects/date/setminutes/index.html (renamed from files/ca/web/javascript/referencia/objectes_globals/date/setminutes/index.html) | 0 | ||||
-rw-r--r-- | files/ca/web/javascript/reference/global_objects/date/setmonth/index.html (renamed from files/ca/web/javascript/referencia/objectes_globals/date/setmonth/index.html) | 0 | ||||
-rw-r--r-- | files/ca/web/javascript/reference/global_objects/date/setseconds/index.html (renamed from files/ca/web/javascript/referencia/objectes_globals/date/setseconds/index.html) | 0 | ||||
-rw-r--r-- | files/ca/web/javascript/reference/global_objects/date/settime/index.html (renamed from files/ca/web/javascript/referencia/objectes_globals/date/settime/index.html) | 0 | ||||
-rw-r--r-- | files/ca/web/javascript/reference/global_objects/date/setutcdate/index.html (renamed from files/ca/web/javascript/referencia/objectes_globals/date/setutcdate/index.html) | 0 | ||||
-rw-r--r-- | files/ca/web/javascript/reference/global_objects/date/setutcfullyear/index.html (renamed from files/ca/web/javascript/referencia/objectes_globals/date/setutcfullyear/index.html) | 0 | ||||
-rw-r--r-- | files/ca/web/javascript/reference/global_objects/date/setutchours/index.html (renamed from files/ca/web/javascript/referencia/objectes_globals/date/setutchours/index.html) | 0 | ||||
-rw-r--r-- | files/ca/web/javascript/reference/global_objects/date/setutcmilliseconds/index.html (renamed from files/ca/web/javascript/referencia/objectes_globals/date/setutcmilliseconds/index.html) | 0 | ||||
-rw-r--r-- | files/ca/web/javascript/reference/global_objects/date/setutcminutes/index.html (renamed from files/ca/web/javascript/referencia/objectes_globals/date/setutcminutes/index.html) | 0 | ||||
-rw-r--r-- | files/ca/web/javascript/reference/global_objects/date/setutcmonth/index.html (renamed from files/ca/web/javascript/referencia/objectes_globals/date/setutcmonth/index.html) | 0 | ||||
-rw-r--r-- | files/ca/web/javascript/reference/global_objects/date/setutcseconds/index.html (renamed from files/ca/web/javascript/referencia/objectes_globals/date/setutcseconds/index.html) | 0 | ||||
-rw-r--r-- | files/ca/web/javascript/reference/global_objects/date/setyear/index.html (renamed from files/ca/web/javascript/referencia/objectes_globals/date/setyear/index.html) | 0 | ||||
-rw-r--r-- | files/ca/web/javascript/reference/global_objects/date/todatestring/index.html (renamed from files/ca/web/javascript/referencia/objectes_globals/date/todatestring/index.html) | 0 | ||||
-rw-r--r-- | files/ca/web/javascript/reference/global_objects/date/togmtstring/index.html (renamed from files/ca/web/javascript/referencia/objectes_globals/date/togmtstring/index.html) | 0 | ||||
-rw-r--r-- | files/ca/web/javascript/reference/global_objects/date/toisostring/index.html (renamed from files/ca/web/javascript/referencia/objectes_globals/date/toisostring/index.html) | 0 | ||||
-rw-r--r-- | files/ca/web/javascript/reference/global_objects/date/tojson/index.html (renamed from files/ca/web/javascript/referencia/objectes_globals/date/tojson/index.html) | 0 | ||||
-rw-r--r-- | files/ca/web/javascript/reference/global_objects/date/tostring/index.html (renamed from files/ca/web/javascript/referencia/objectes_globals/date/tostring/index.html) | 0 | ||||
-rw-r--r-- | files/ca/web/javascript/reference/global_objects/date/totimestring/index.html (renamed from files/ca/web/javascript/referencia/objectes_globals/date/totimestring/index.html) | 0 | ||||
-rw-r--r-- | files/ca/web/javascript/reference/global_objects/date/utc/index.html (renamed from files/ca/web/javascript/referencia/objectes_globals/date/utc/index.html) | 0 | ||||
-rw-r--r-- | files/ca/web/javascript/reference/global_objects/date/valueof/index.html (renamed from files/ca/web/javascript/referencia/objectes_globals/date/valueof/index.html) | 0 | ||||
-rw-r--r-- | files/ca/web/javascript/reference/global_objects/error/columnnumber/index.html (renamed from files/ca/web/javascript/referencia/objectes_globals/error/columnnumber/index.html) | 0 | ||||
-rw-r--r-- | files/ca/web/javascript/reference/global_objects/error/filename/index.html (renamed from files/ca/web/javascript/referencia/objectes_globals/error/filename/index.html) | 0 | ||||
-rw-r--r-- | files/ca/web/javascript/reference/global_objects/error/index.html (renamed from files/ca/web/javascript/referencia/objectes_globals/error/index.html) | 0 | ||||
-rw-r--r-- | files/ca/web/javascript/reference/global_objects/error/linenumber/index.html (renamed from files/ca/web/javascript/referencia/objectes_globals/error/linenumber/index.html) | 0 | ||||
-rw-r--r-- | files/ca/web/javascript/reference/global_objects/error/message/index.html (renamed from files/ca/web/javascript/referencia/objectes_globals/error/message/index.html) | 0 | ||||
-rw-r--r-- | files/ca/web/javascript/reference/global_objects/error/name/index.html (renamed from files/ca/web/javascript/referencia/objectes_globals/error/name/index.html) | 0 | ||||
-rw-r--r-- | files/ca/web/javascript/reference/global_objects/error/stack/index.html (renamed from files/ca/web/javascript/referencia/objectes_globals/error/stack/index.html) | 0 | ||||
-rw-r--r-- | files/ca/web/javascript/reference/global_objects/error/tosource/index.html (renamed from files/ca/web/javascript/referencia/objectes_globals/error/tosource/index.html) | 0 | ||||
-rw-r--r-- | files/ca/web/javascript/reference/global_objects/error/tostring/index.html (renamed from files/ca/web/javascript/referencia/objectes_globals/error/tostring/index.html) | 0 | ||||
-rw-r--r-- | files/ca/web/javascript/reference/global_objects/evalerror/prototype/index.html | 124 | ||||
-rw-r--r-- | files/ca/web/javascript/reference/global_objects/index.html (renamed from files/ca/web/javascript/referencia/objectes_globals/index.html) | 0 | ||||
-rw-r--r-- | files/ca/web/javascript/reference/global_objects/infinity/index.html (renamed from files/ca/web/javascript/referencia/objectes_globals/infinity/index.html) | 0 | ||||
-rw-r--r-- | files/ca/web/javascript/reference/global_objects/json/index.html (renamed from files/ca/web/javascript/referencia/objectes_globals/json/index.html) | 0 | ||||
-rw-r--r-- | files/ca/web/javascript/reference/global_objects/map/clear/index.html (renamed from files/ca/web/javascript/referencia/objectes_globals/map/clear/index.html) | 0 | ||||
-rw-r--r-- | files/ca/web/javascript/reference/global_objects/map/delete/index.html (renamed from files/ca/web/javascript/referencia/objectes_globals/map/delete/index.html) | 0 | ||||
-rw-r--r-- | files/ca/web/javascript/reference/global_objects/map/entries/index.html (renamed from files/ca/web/javascript/referencia/objectes_globals/map/entries/index.html) | 0 | ||||
-rw-r--r-- | files/ca/web/javascript/reference/global_objects/map/foreach/index.html (renamed from files/ca/web/javascript/referencia/objectes_globals/map/foreach/index.html) | 0 | ||||
-rw-r--r-- | files/ca/web/javascript/reference/global_objects/map/get/index.html (renamed from files/ca/web/javascript/referencia/objectes_globals/map/get/index.html) | 0 | ||||
-rw-r--r-- | files/ca/web/javascript/reference/global_objects/map/has/index.html (renamed from files/ca/web/javascript/referencia/objectes_globals/map/has/index.html) | 0 | ||||
-rw-r--r-- | files/ca/web/javascript/reference/global_objects/map/index.html (renamed from files/ca/web/javascript/referencia/objectes_globals/map/index.html) | 0 | ||||
-rw-r--r-- | files/ca/web/javascript/reference/global_objects/map/keys/index.html (renamed from files/ca/web/javascript/referencia/objectes_globals/map/keys/index.html) | 0 | ||||
-rw-r--r-- | files/ca/web/javascript/reference/global_objects/map/set/index.html (renamed from files/ca/web/javascript/referencia/objectes_globals/map/set/index.html) | 0 | ||||
-rw-r--r-- | files/ca/web/javascript/reference/global_objects/map/size/index.html (renamed from files/ca/web/javascript/referencia/objectes_globals/map/size/index.html) | 0 | ||||
-rw-r--r-- | files/ca/web/javascript/reference/global_objects/map/values/index.html (renamed from files/ca/web/javascript/referencia/objectes_globals/map/values/index.html) | 0 | ||||
-rw-r--r-- | files/ca/web/javascript/reference/global_objects/math/abs/index.html (renamed from files/ca/web/javascript/referencia/objectes_globals/math/abs/index.html) | 0 | ||||
-rw-r--r-- | files/ca/web/javascript/reference/global_objects/math/acos/index.html (renamed from files/ca/web/javascript/referencia/objectes_globals/math/acos/index.html) | 0 | ||||
-rw-r--r-- | files/ca/web/javascript/reference/global_objects/math/acosh/index.html (renamed from files/ca/web/javascript/referencia/objectes_globals/math/acosh/index.html) | 0 | ||||
-rw-r--r-- | files/ca/web/javascript/reference/global_objects/math/asin/index.html (renamed from files/ca/web/javascript/referencia/objectes_globals/math/asin/index.html) | 0 | ||||
-rw-r--r-- | files/ca/web/javascript/reference/global_objects/math/asinh/index.html (renamed from files/ca/web/javascript/referencia/objectes_globals/math/asinh/index.html) | 0 | ||||
-rw-r--r-- | files/ca/web/javascript/reference/global_objects/math/atan/index.html (renamed from files/ca/web/javascript/referencia/objectes_globals/math/atan/index.html) | 0 | ||||
-rw-r--r-- | files/ca/web/javascript/reference/global_objects/math/atan2/index.html (renamed from files/ca/web/javascript/referencia/objectes_globals/math/atan2/index.html) | 0 | ||||
-rw-r--r-- | files/ca/web/javascript/reference/global_objects/math/atanh/index.html (renamed from files/ca/web/javascript/referencia/objectes_globals/math/atanh/index.html) | 0 | ||||
-rw-r--r-- | files/ca/web/javascript/reference/global_objects/math/cbrt/index.html (renamed from files/ca/web/javascript/referencia/objectes_globals/math/cbrt/index.html) | 0 | ||||
-rw-r--r-- | files/ca/web/javascript/reference/global_objects/math/ceil/index.html (renamed from files/ca/web/javascript/referencia/objectes_globals/math/ceil/index.html) | 0 | ||||
-rw-r--r-- | files/ca/web/javascript/reference/global_objects/math/clz32/index.html (renamed from files/ca/web/javascript/referencia/objectes_globals/math/clz32/index.html) | 0 | ||||
-rw-r--r-- | files/ca/web/javascript/reference/global_objects/math/cos/index.html (renamed from files/ca/web/javascript/referencia/objectes_globals/math/cos/index.html) | 0 | ||||
-rw-r--r-- | files/ca/web/javascript/reference/global_objects/math/cosh/index.html (renamed from files/ca/web/javascript/referencia/objectes_globals/math/cosh/index.html) | 0 | ||||
-rw-r--r-- | files/ca/web/javascript/reference/global_objects/math/e/index.html (renamed from files/ca/web/javascript/referencia/objectes_globals/math/e/index.html) | 0 | ||||
-rw-r--r-- | files/ca/web/javascript/reference/global_objects/math/exp/index.html (renamed from files/ca/web/javascript/referencia/objectes_globals/math/exp/index.html) | 0 | ||||
-rw-r--r-- | files/ca/web/javascript/reference/global_objects/math/expm1/index.html (renamed from files/ca/web/javascript/referencia/objectes_globals/math/expm1/index.html) | 0 | ||||
-rw-r--r-- | files/ca/web/javascript/reference/global_objects/math/floor/index.html (renamed from files/ca/web/javascript/referencia/objectes_globals/math/floor/index.html) | 0 | ||||
-rw-r--r-- | files/ca/web/javascript/reference/global_objects/math/fround/index.html (renamed from files/ca/web/javascript/referencia/objectes_globals/math/fround/index.html) | 0 | ||||
-rw-r--r-- | files/ca/web/javascript/reference/global_objects/math/hypot/index.html (renamed from files/ca/web/javascript/referencia/objectes_globals/math/hypot/index.html) | 0 | ||||
-rw-r--r-- | files/ca/web/javascript/reference/global_objects/math/imul/index.html (renamed from files/ca/web/javascript/referencia/objectes_globals/math/imul/index.html) | 0 | ||||
-rw-r--r-- | files/ca/web/javascript/reference/global_objects/math/index.html (renamed from files/ca/web/javascript/referencia/objectes_globals/math/index.html) | 0 | ||||
-rw-r--r-- | files/ca/web/javascript/reference/global_objects/math/ln10/index.html (renamed from files/ca/web/javascript/referencia/objectes_globals/math/ln10/index.html) | 0 | ||||
-rw-r--r-- | files/ca/web/javascript/reference/global_objects/math/ln2/index.html (renamed from files/ca/web/javascript/referencia/objectes_globals/math/ln2/index.html) | 0 | ||||
-rw-r--r-- | files/ca/web/javascript/reference/global_objects/math/log/index.html (renamed from files/ca/web/javascript/referencia/objectes_globals/math/log/index.html) | 0 | ||||
-rw-r--r-- | files/ca/web/javascript/reference/global_objects/math/log10/index.html (renamed from files/ca/web/javascript/referencia/objectes_globals/math/log10/index.html) | 0 | ||||
-rw-r--r-- | files/ca/web/javascript/reference/global_objects/math/log10e/index.html (renamed from files/ca/web/javascript/referencia/objectes_globals/math/log10e/index.html) | 0 | ||||
-rw-r--r-- | files/ca/web/javascript/reference/global_objects/math/log1p/index.html (renamed from files/ca/web/javascript/referencia/objectes_globals/math/log1p/index.html) | 0 | ||||
-rw-r--r-- | files/ca/web/javascript/reference/global_objects/math/log2/index.html (renamed from files/ca/web/javascript/referencia/objectes_globals/math/log2/index.html) | 0 | ||||
-rw-r--r-- | files/ca/web/javascript/reference/global_objects/math/log2e/index.html (renamed from files/ca/web/javascript/referencia/objectes_globals/math/log2e/index.html) | 0 | ||||
-rw-r--r-- | files/ca/web/javascript/reference/global_objects/math/max/index.html (renamed from files/ca/web/javascript/referencia/objectes_globals/math/max/index.html) | 0 | ||||
-rw-r--r-- | files/ca/web/javascript/reference/global_objects/math/min/index.html (renamed from files/ca/web/javascript/referencia/objectes_globals/math/min/index.html) | 0 | ||||
-rw-r--r-- | files/ca/web/javascript/reference/global_objects/math/pi/index.html (renamed from files/ca/web/javascript/referencia/objectes_globals/math/pi/index.html) | 0 | ||||
-rw-r--r-- | files/ca/web/javascript/reference/global_objects/math/pow/index.html (renamed from files/ca/web/javascript/referencia/objectes_globals/math/pow/index.html) | 0 | ||||
-rw-r--r-- | files/ca/web/javascript/reference/global_objects/math/random/index.html (renamed from files/ca/web/javascript/referencia/objectes_globals/math/random/index.html) | 0 | ||||
-rw-r--r-- | files/ca/web/javascript/reference/global_objects/math/round/index.html (renamed from files/ca/web/javascript/referencia/objectes_globals/math/round/index.html) | 0 | ||||
-rw-r--r-- | files/ca/web/javascript/reference/global_objects/math/sign/index.html (renamed from files/ca/web/javascript/referencia/objectes_globals/math/sign/index.html) | 0 | ||||
-rw-r--r-- | files/ca/web/javascript/reference/global_objects/math/sin/index.html (renamed from files/ca/web/javascript/referencia/objectes_globals/math/sin/index.html) | 0 | ||||
-rw-r--r-- | files/ca/web/javascript/reference/global_objects/math/sinh/index.html (renamed from files/ca/web/javascript/referencia/objectes_globals/math/sinh/index.html) | 0 | ||||
-rw-r--r-- | files/ca/web/javascript/reference/global_objects/math/sqrt/index.html (renamed from files/ca/web/javascript/referencia/objectes_globals/math/sqrt/index.html) | 0 | ||||
-rw-r--r-- | files/ca/web/javascript/reference/global_objects/math/sqrt1_2/index.html (renamed from files/ca/web/javascript/referencia/objectes_globals/math/sqrt1_2/index.html) | 0 | ||||
-rw-r--r-- | files/ca/web/javascript/reference/global_objects/math/sqrt2/index.html (renamed from files/ca/web/javascript/referencia/objectes_globals/math/sqrt2/index.html) | 0 | ||||
-rw-r--r-- | files/ca/web/javascript/reference/global_objects/math/tan/index.html (renamed from files/ca/web/javascript/referencia/objectes_globals/math/tan/index.html) | 0 | ||||
-rw-r--r-- | files/ca/web/javascript/reference/global_objects/math/tanh/index.html (renamed from files/ca/web/javascript/referencia/objectes_globals/math/tanh/index.html) | 0 | ||||
-rw-r--r-- | files/ca/web/javascript/reference/global_objects/math/trunc/index.html (renamed from files/ca/web/javascript/referencia/objectes_globals/math/trunc/index.html) | 0 | ||||
-rw-r--r-- | files/ca/web/javascript/reference/global_objects/nan/index.html (renamed from files/ca/web/javascript/referencia/objectes_globals/nan/index.html) | 0 | ||||
-rw-r--r-- | files/ca/web/javascript/reference/global_objects/null/index.html (renamed from files/ca/web/javascript/referencia/objectes_globals/null/index.html) | 0 | ||||
-rw-r--r-- | files/ca/web/javascript/reference/global_objects/number/epsilon/index.html (renamed from files/ca/web/javascript/referencia/objectes_globals/number/epsilon/index.html) | 0 | ||||
-rw-r--r-- | files/ca/web/javascript/reference/global_objects/number/index.html (renamed from files/ca/web/javascript/referencia/objectes_globals/number/index.html) | 0 | ||||
-rw-r--r-- | files/ca/web/javascript/reference/global_objects/number/isfinite/index.html (renamed from files/ca/web/javascript/referencia/objectes_globals/number/isfinite/index.html) | 0 | ||||
-rw-r--r-- | files/ca/web/javascript/reference/global_objects/number/isinteger/index.html (renamed from files/ca/web/javascript/referencia/objectes_globals/number/isinteger/index.html) | 0 | ||||
-rw-r--r-- | files/ca/web/javascript/reference/global_objects/number/isnan/index.html (renamed from files/ca/web/javascript/referencia/objectes_globals/number/isnan/index.html) | 0 | ||||
-rw-r--r-- | files/ca/web/javascript/reference/global_objects/number/issafeinteger/index.html (renamed from files/ca/web/javascript/referencia/objectes_globals/number/issafeinteger/index.html) | 0 | ||||
-rw-r--r-- | files/ca/web/javascript/reference/global_objects/number/max_safe_integer/index.html (renamed from files/ca/web/javascript/referencia/objectes_globals/number/max_safe_integer/index.html) | 0 | ||||
-rw-r--r-- | files/ca/web/javascript/reference/global_objects/number/max_value/index.html (renamed from files/ca/web/javascript/referencia/objectes_globals/number/max_value/index.html) | 0 | ||||
-rw-r--r-- | files/ca/web/javascript/reference/global_objects/number/min_safe_integer/index.html (renamed from files/ca/web/javascript/referencia/objectes_globals/number/min_safe_integer/index.html) | 0 | ||||
-rw-r--r-- | files/ca/web/javascript/reference/global_objects/number/min_value/index.html (renamed from files/ca/web/javascript/referencia/objectes_globals/number/min_value/index.html) | 0 | ||||
-rw-r--r-- | files/ca/web/javascript/reference/global_objects/number/nan/index.html (renamed from files/ca/web/javascript/referencia/objectes_globals/number/nan/index.html) | 0 | ||||
-rw-r--r-- | files/ca/web/javascript/reference/global_objects/number/negative_infinity/index.html (renamed from files/ca/web/javascript/referencia/objectes_globals/number/negative_infinity/index.html) | 0 | ||||
-rw-r--r-- | files/ca/web/javascript/reference/global_objects/number/parsefloat/index.html (renamed from files/ca/web/javascript/referencia/objectes_globals/number/parsefloat/index.html) | 0 | ||||
-rw-r--r-- | files/ca/web/javascript/reference/global_objects/number/parseint/index.html (renamed from files/ca/web/javascript/referencia/objectes_globals/number/parseint/index.html) | 0 | ||||
-rw-r--r-- | files/ca/web/javascript/reference/global_objects/number/positive_infinity/index.html (renamed from files/ca/web/javascript/referencia/objectes_globals/number/positive_infinity/index.html) | 0 | ||||
-rw-r--r-- | files/ca/web/javascript/reference/global_objects/number/toexponential/index.html (renamed from files/ca/web/javascript/referencia/objectes_globals/number/toexponential/index.html) | 0 | ||||
-rw-r--r-- | files/ca/web/javascript/reference/global_objects/number/tofixed/index.html (renamed from files/ca/web/javascript/referencia/objectes_globals/number/tofixed/index.html) | 0 | ||||
-rw-r--r-- | files/ca/web/javascript/reference/global_objects/number/toprecision/index.html (renamed from files/ca/web/javascript/referencia/objectes_globals/number/toprecision/index.html) | 0 | ||||
-rw-r--r-- | files/ca/web/javascript/reference/global_objects/number/tostring/index.html (renamed from files/ca/web/javascript/referencia/objectes_globals/number/tostring/index.html) | 0 | ||||
-rw-r--r-- | files/ca/web/javascript/reference/global_objects/object/prototype/index.html | 215 | ||||
-rw-r--r-- | files/ca/web/javascript/reference/global_objects/parsefloat/index.html (renamed from files/ca/web/javascript/referencia/objectes_globals/parsefloat/index.html) | 0 | ||||
-rw-r--r-- | files/ca/web/javascript/reference/global_objects/set/add/index.html (renamed from files/ca/web/javascript/referencia/objectes_globals/set/add/index.html) | 0 | ||||
-rw-r--r-- | files/ca/web/javascript/reference/global_objects/set/clear/index.html (renamed from files/ca/web/javascript/referencia/objectes_globals/set/clear/index.html) | 0 | ||||
-rw-r--r-- | files/ca/web/javascript/reference/global_objects/set/delete/index.html (renamed from files/ca/web/javascript/referencia/objectes_globals/set/delete/index.html) | 0 | ||||
-rw-r--r-- | files/ca/web/javascript/reference/global_objects/set/entries/index.html (renamed from files/ca/web/javascript/referencia/objectes_globals/set/entries/index.html) | 0 | ||||
-rw-r--r-- | files/ca/web/javascript/reference/global_objects/set/has/index.html (renamed from files/ca/web/javascript/referencia/objectes_globals/set/has/index.html) | 0 | ||||
-rw-r--r-- | files/ca/web/javascript/reference/global_objects/set/index.html (renamed from files/ca/web/javascript/referencia/objectes_globals/set/index.html) | 0 | ||||
-rw-r--r-- | files/ca/web/javascript/reference/global_objects/set/values/index.html (renamed from files/ca/web/javascript/referencia/objectes_globals/set/values/index.html) | 0 | ||||
-rw-r--r-- | files/ca/web/javascript/reference/global_objects/string/anchor/index.html (renamed from files/ca/web/javascript/referencia/objectes_globals/string/anchor/index.html) | 0 | ||||
-rw-r--r-- | files/ca/web/javascript/reference/global_objects/string/big/index.html (renamed from files/ca/web/javascript/referencia/objectes_globals/string/big/index.html) | 0 | ||||
-rw-r--r-- | files/ca/web/javascript/reference/global_objects/string/blink/index.html (renamed from files/ca/web/javascript/referencia/objectes_globals/string/blink/index.html) | 0 | ||||
-rw-r--r-- | files/ca/web/javascript/reference/global_objects/string/bold/index.html (renamed from files/ca/web/javascript/referencia/objectes_globals/string/bold/index.html) | 0 | ||||
-rw-r--r-- | files/ca/web/javascript/reference/global_objects/string/charat/index.html (renamed from files/ca/web/javascript/referencia/objectes_globals/string/charat/index.html) | 0 | ||||
-rw-r--r-- | files/ca/web/javascript/reference/global_objects/string/concat/index.html (renamed from files/ca/web/javascript/referencia/objectes_globals/string/concat/index.html) | 0 | ||||
-rw-r--r-- | files/ca/web/javascript/reference/global_objects/string/endswith/index.html (renamed from files/ca/web/javascript/referencia/objectes_globals/string/endswith/index.html) | 0 | ||||
-rw-r--r-- | files/ca/web/javascript/reference/global_objects/string/fixed/index.html (renamed from files/ca/web/javascript/referencia/objectes_globals/string/fixed/index.html) | 0 | ||||
-rw-r--r-- | files/ca/web/javascript/reference/global_objects/string/fontcolor/index.html (renamed from files/ca/web/javascript/referencia/objectes_globals/string/fontcolor/index.html) | 0 | ||||
-rw-r--r-- | files/ca/web/javascript/reference/global_objects/string/fontsize/index.html (renamed from files/ca/web/javascript/referencia/objectes_globals/string/fontsize/index.html) | 0 | ||||
-rw-r--r-- | files/ca/web/javascript/reference/global_objects/string/fromcharcode/index.html (renamed from files/ca/web/javascript/referencia/objectes_globals/string/fromcharcode/index.html) | 0 | ||||
-rw-r--r-- | files/ca/web/javascript/reference/global_objects/string/index.html (renamed from files/ca/web/javascript/referencia/objectes_globals/string/index.html) | 0 | ||||
-rw-r--r-- | files/ca/web/javascript/reference/global_objects/string/indexof/index.html (renamed from files/ca/web/javascript/referencia/objectes_globals/string/indexof/index.html) | 0 | ||||
-rw-r--r-- | files/ca/web/javascript/reference/global_objects/string/italics/index.html (renamed from files/ca/web/javascript/referencia/objectes_globals/string/italics/index.html) | 0 | ||||
-rw-r--r-- | files/ca/web/javascript/reference/global_objects/string/length/index.html (renamed from files/ca/web/javascript/referencia/objectes_globals/string/length/index.html) | 0 | ||||
-rw-r--r-- | files/ca/web/javascript/reference/global_objects/string/link/index.html (renamed from files/ca/web/javascript/referencia/objectes_globals/string/link/index.html) | 0 | ||||
-rw-r--r-- | files/ca/web/javascript/reference/global_objects/string/normalize/index.html (renamed from files/ca/web/javascript/referencia/objectes_globals/string/normalize/index.html) | 0 | ||||
-rw-r--r-- | files/ca/web/javascript/reference/global_objects/string/small/index.html (renamed from files/ca/web/javascript/referencia/objectes_globals/string/small/index.html) | 0 | ||||
-rw-r--r-- | files/ca/web/javascript/reference/global_objects/string/startswith/index.html (renamed from files/ca/web/javascript/referencia/objectes_globals/string/startswith/index.html) | 0 | ||||
-rw-r--r-- | files/ca/web/javascript/reference/global_objects/string/sub/index.html (renamed from files/ca/web/javascript/referencia/objectes_globals/string/sub/index.html) | 0 | ||||
-rw-r--r-- | files/ca/web/javascript/reference/global_objects/string/substr/index.html (renamed from files/ca/web/javascript/referencia/objectes_globals/string/substr/index.html) | 0 | ||||
-rw-r--r-- | files/ca/web/javascript/reference/global_objects/string/sup/index.html (renamed from files/ca/web/javascript/referencia/objectes_globals/string/sup/index.html) | 0 | ||||
-rw-r--r-- | files/ca/web/javascript/reference/global_objects/string/tolocalelowercase/index.html (renamed from files/ca/web/javascript/referencia/objectes_globals/string/tolocalelowercase/index.html) | 0 | ||||
-rw-r--r-- | files/ca/web/javascript/reference/global_objects/string/tolocaleuppercase/index.html (renamed from files/ca/web/javascript/referencia/objectes_globals/string/tolocaleuppercase/index.html) | 0 | ||||
-rw-r--r-- | files/ca/web/javascript/reference/global_objects/string/tolowercase/index.html (renamed from files/ca/web/javascript/referencia/objectes_globals/string/tolowercase/index.html) | 0 | ||||
-rw-r--r-- | files/ca/web/javascript/reference/global_objects/string/tostring/index.html (renamed from files/ca/web/javascript/referencia/objectes_globals/string/tostring/index.html) | 0 | ||||
-rw-r--r-- | files/ca/web/javascript/reference/global_objects/string/touppercase/index.html (renamed from files/ca/web/javascript/referencia/objectes_globals/string/touppercase/index.html) | 0 | ||||
-rw-r--r-- | files/ca/web/javascript/reference/global_objects/string/trim/index.html (renamed from files/ca/web/javascript/referencia/objectes_globals/string/trim/index.html) | 0 | ||||
-rw-r--r-- | files/ca/web/javascript/reference/global_objects/string/trimend/index.html (renamed from files/ca/web/javascript/referencia/objectes_globals/string/trimright/index.html) | 0 | ||||
-rw-r--r-- | files/ca/web/javascript/reference/global_objects/string/trimstart/index.html (renamed from files/ca/web/javascript/referencia/objectes_globals/string/trimleft/index.html) | 0 | ||||
-rw-r--r-- | files/ca/web/javascript/reference/global_objects/syntaxerror/index.html (renamed from files/ca/web/javascript/referencia/objectes_globals/syntaxerror/index.html) | 0 | ||||
-rw-r--r-- | files/ca/web/javascript/reference/global_objects/undefined/index.html (renamed from files/ca/web/javascript/referencia/objectes_globals/undefined/index.html) | 0 | ||||
-rw-r--r-- | files/ca/web/javascript/reference/global_objects/weakmap/prototype/index.html | 133 | ||||
-rw-r--r-- | files/ca/web/javascript/reference/global_objects/weakset/prototype/index.html | 132 | ||||
-rw-r--r-- | files/ca/web/javascript/reference/index.html (renamed from files/ca/web/javascript/referencia/index.html) | 0 | ||||
-rw-r--r-- | files/ca/web/javascript/reference/operators/comma_operator/index.html (renamed from files/ca/web/javascript/referencia/operadors/operador_coma/index.html) | 0 | ||||
-rw-r--r-- | files/ca/web/javascript/reference/operators/conditional_operator/index.html (renamed from files/ca/web/javascript/referencia/operadors/conditional_operator/index.html) | 0 | ||||
-rw-r--r-- | files/ca/web/javascript/reference/operators/function/index.html (renamed from files/ca/web/javascript/referencia/operadors/function/index.html) | 0 | ||||
-rw-r--r-- | files/ca/web/javascript/reference/operators/grouping/index.html (renamed from files/ca/web/javascript/referencia/operadors/grouping/index.html) | 0 | ||||
-rw-r--r-- | files/ca/web/javascript/reference/operators/index.html (renamed from files/ca/web/javascript/referencia/operadors/index.html) | 0 | ||||
-rw-r--r-- | files/ca/web/javascript/reference/operators/super/index.html (renamed from files/ca/web/javascript/referencia/operadors/super/index.html) | 0 | ||||
-rw-r--r-- | files/ca/web/javascript/reference/operators/typeof/index.html (renamed from files/ca/web/javascript/referencia/operadors/typeof/index.html) | 0 | ||||
-rw-r--r-- | files/ca/web/javascript/reference/operators/void/index.html (renamed from files/ca/web/javascript/referencia/operadors/void/index.html) | 0 | ||||
-rw-r--r-- | files/ca/web/javascript/reference/operators/yield/index.html (renamed from files/ca/web/javascript/referencia/operadors/yield/index.html) | 0 | ||||
-rw-r--r-- | files/ca/web/javascript/reference/statements/block/index.html (renamed from files/ca/web/javascript/referencia/sentencies/block/index.html) | 0 | ||||
-rw-r--r-- | files/ca/web/javascript/reference/statements/break/index.html (renamed from files/ca/web/javascript/referencia/sentencies/break/index.html) | 0 | ||||
-rw-r--r-- | files/ca/web/javascript/reference/statements/continue/index.html (renamed from files/ca/web/javascript/referencia/sentencies/continue/index.html) | 0 | ||||
-rw-r--r-- | files/ca/web/javascript/reference/statements/debugger/index.html (renamed from files/ca/web/javascript/referencia/sentencies/debugger/index.html) | 0 | ||||
-rw-r--r-- | files/ca/web/javascript/reference/statements/do...while/index.html (renamed from files/ca/web/javascript/referencia/sentencies/do...while/index.html) | 0 | ||||
-rw-r--r-- | files/ca/web/javascript/reference/statements/empty/index.html (renamed from files/ca/web/javascript/referencia/sentencies/buida/index.html) | 0 | ||||
-rw-r--r-- | files/ca/web/javascript/reference/statements/export/index.html (renamed from files/ca/web/javascript/referencia/sentencies/export/index.html) | 0 | ||||
-rw-r--r-- | files/ca/web/javascript/reference/statements/for...of/index.html (renamed from files/ca/web/javascript/referencia/sentencies/for...of/index.html) | 0 | ||||
-rw-r--r-- | files/ca/web/javascript/reference/statements/for/index.html (renamed from files/ca/web/javascript/referencia/sentencies/for/index.html) | 0 | ||||
-rw-r--r-- | files/ca/web/javascript/reference/statements/function/index.html (renamed from files/ca/web/javascript/referencia/sentencies/function/index.html) | 0 | ||||
-rw-r--r-- | files/ca/web/javascript/reference/statements/if...else/index.html (renamed from files/ca/web/javascript/referencia/sentencies/if...else/index.html) | 0 | ||||
-rw-r--r-- | files/ca/web/javascript/reference/statements/index.html (renamed from files/ca/web/javascript/referencia/sentencies/index.html) | 0 | ||||
-rw-r--r-- | files/ca/web/javascript/reference/statements/return/index.html (renamed from files/ca/web/javascript/referencia/sentencies/return/index.html) | 0 | ||||
-rw-r--r-- | files/ca/web/javascript/reference/statements/throw/index.html (renamed from files/ca/web/javascript/referencia/sentencies/throw/index.html) | 0 | ||||
-rw-r--r-- | files/ca/web/javascript/reference/statements/while/index.html (renamed from files/ca/web/javascript/referencia/sentencies/while/index.html) | 0 | ||||
-rw-r--r-- | files/ca/web/javascript/referencia/objectes_globals/array/prototype/index.html | 203 | ||||
-rw-r--r-- | files/ca/web/javascript/referencia/objectes_globals/boolean/prototype/index.html | 118 | ||||
-rw-r--r-- | files/ca/web/javascript/referencia/objectes_globals/date/prototype/index.html | 222 | ||||
-rw-r--r-- | files/ca/web/javascript/referencia/objectes_globals/error/prototype/index.html | 151 | ||||
-rw-r--r-- | files/ca/web/javascript/referencia/objectes_globals/map/prototype/index.html | 126 | ||||
-rw-r--r-- | files/ca/web/javascript/referencia/objectes_globals/number/prototype/index.html | 126 | ||||
-rw-r--r-- | files/ca/web/javascript/referencia/objectes_globals/set/prototype/index.html | 124 | ||||
-rw-r--r-- | files/ca/web/javascript/referencia/objectes_globals/syntaxerror/prototype/index.html | 122 | ||||
-rw-r--r-- | files/ca/web/javascript/referencia/operadors/arithmetic_operators/index.html | 287 | ||||
-rw-r--r-- | files/ca/web/javascript/referencia/operadors/bitwise_operators/index.html | 719 | ||||
-rw-r--r-- | files/ca/web/javascript/referencia/operadors/logical_operators/index.html | 302 |
253 files changed, 0 insertions, 3613 deletions
diff --git a/files/ca/web/javascript/quant_a_javascript/index.html b/files/ca/web/javascript/about_javascript/index.html index f581aa7021..f581aa7021 100644 --- a/files/ca/web/javascript/quant_a_javascript/index.html +++ b/files/ca/web/javascript/about_javascript/index.html diff --git a/files/ca/web/javascript/guide/expressions_i_operadors/index.html b/files/ca/web/javascript/guide/expressions_and_operators/index.html index 9985daa497..9985daa497 100644 --- a/files/ca/web/javascript/guide/expressions_i_operadors/index.html +++ b/files/ca/web/javascript/guide/expressions_and_operators/index.html diff --git a/files/ca/web/javascript/guide/introducció/index.html b/files/ca/web/javascript/guide/introduction/index.html index 1b598dad9b..1b598dad9b 100644 --- a/files/ca/web/javascript/guide/introducció/index.html +++ b/files/ca/web/javascript/guide/introduction/index.html diff --git a/files/ca/web/javascript/introducció_al_javascript_orientat_a_objectes/index.html b/files/ca/web/javascript/introducció_al_javascript_orientat_a_objectes/index.html deleted file mode 100644 index 187f7930f4..0000000000 --- a/files/ca/web/javascript/introducció_al_javascript_orientat_a_objectes/index.html +++ /dev/null @@ -1,362 +0,0 @@ ---- -title: Introducció al Javascript orientat a Objectes -slug: Web/JavaScript/Introducció_al_Javascript_orientat_a_Objectes -translation_of: Learn/JavaScript/Objects -translation_of_original: Web/JavaScript/Introduction_to_Object-Oriented_JavaScript ---- -<div>{{jsSidebar("Introductory")}}</div> - -<p>JavaScript és orientat a objectes des del nucli, amb unes capacitats potents, flexibles {{Glossary("OOP")}}. Aquest article comença amb la introducció de la programació orientada a objectes, després es revisa el model d'objectes de Javascript, i finalment es mostren els conceptes de la programació orientada a objectes en JavaScript.</p> - -<h2 id="JavaScript_Review" name="JavaScript_Review">Revisió de JavaScript</h2> - -<p>Si no us sentiu segurs amb els conceptes de Javascript com ara variables, tipus, funcions, i àmbits podeu llegir sobre aquests temes en <a href="/en-US/docs/Web/JavaScript/A_re-introduction_to_JavaScript">Una reintroducció a JavaScript</a>. També podeu consultar la <a href="/en-US/docs/Web/JavaScript/Guide">Guia de JavaScript</a>.</p> - -<h2 id="Object-oriented_programming" name="Object-oriented_programming">Programació orientada a Objectes</h2> - -<p>La programació orientada a Objectes és un paradigma de programació que usa l'abstracció per crear models basants en el món real. Fa servir diverseses tècniques de paradigmes previament establerts, inclosa la modularitat, poliformisme, i l'encapsulament. Avui, moltes llengües de programació (com Java, JavaScript, C#, C++, Python, PHP, Ruby i Objective-C) suporten la programació orientada a Objectes (POO).</p> - -<p>La programació orientada a Objectes es pot entendre com el disseny de software fent servir una col·lecció d'objectes que cooperen, al contrari de la visió tradicional en el qual un programa es vist com una col·lecció de funcions, o simplement com una llista d'instruccions per a un ordinador. En POO, cada objecte és capaç de rebre missatges, processar data, i enviar missatges a altres objectes. Cada objecte pot ser entès com una petita màquina independent amb un rol diferent o amb responsabilitat.</p> - -<p>La programació orientada a Objectes intenta promoure una major flexibilitat, mantenibilitat en programació, i és àmpliament popular en enginyeria de software a gran esala. En virtut de la seva forta èmfasi en modularitat, el codi orientat a objecte intenta ser més simple de desenvolupar i més facil d'entendre després, es presta a una anàlisi més directa, codificació, i comprensió de situacions complexes i procediments en comptes d'altres mètodes de programació menys modulars.<a href="#cite-1"><sup>1</sup></a></p> - -<h2 id="Terminology" name="Terminology">Terminologia</h2> - -<dl> - <dt>{{Glossary("Namespace")}}</dt> - <dd>Un contenidor que permet als desenvolupadors agrupar totes les funcionalitats sota un nom únic d'aplicació específica.</dd> - <dt>{{Glossary("Class")}}</dt> - <dd>Defineix les característiques de l'objecte. És la definició d'una plantilla de variables i mètodes d'un objecte.</dd> - <dt>{{Glossary("Object")}}</dt> - <dd>Una instància d'una classe.</dd> - <dt>{{Glossary("Property")}}</dt> - <dd>Una característca d'un objecte, com ara un color.</dd> - <dt>{{Glossary("Method")}}</dt> - <dd>Una capacitat d'un objecte, com ara caminar. És una subrutina o funció associada amb una classe.</dd> - <dt>{{Glossary("Constructor")}}</dt> - <dd>Un mètode que es crida en el moment d'instanciació d'un objecte. Normalment té el mateix nom que el de la classe que el conté.</dd> - <dt>{{Glossary("Inheritance")}}</dt> - <dd>Una classe pot heretar les característiques d'una altra classe.</dd> - <dt>{{Glossary("Encapsulation")}}</dt> - <dd>Una manera d'agrupar les dades i mètodes que es fan servir juntes.</dd> - <dt>{{Glossary("Abstraction")}}</dt> - <dd>La conjunció d'una herència complexa, mètodes, les propietats d'un objecte, han de ser capaces de simular una realitat a modelar.</dd> - <dt>{{Glossary("Polymorphism")}}</dt> - <dd>Poli significa "<em>molts</em>" i morfisme significa "<em>formes</em>". Classes diferents poden definir el mateix mètode o propietat.</dd> -</dl> - -<p>Per una descripció més extensa sobre la programació orientada a objectes vegeu {interwiki("wikipedia", "Object-oriented programming")}} a la Viquipèdia.</p> - -<h2 id="Programació_basada_en_prototipus">Programació basada en prototipus</h2> - -<p>Programació basat en prototipus és un estil de programació orientada a objectes que no fa ús de les classes. En el seu lloc, la reutilització del comportament (conegut com a herència en llenguatges basats en classes) es porta a terme a través d'un procés de decoració (o d'ampliació) on els objectes que ja existeixen serveixen com a prototipus. Aquest model també és conegut com a model sense classes, orientat a prototip, o programació basadad en instàncies.</p> - -<p>L'exemple original (i més canònic) d'un llenguatge basat en prototipus és el llenguatge de programació {{interwiki("wikipedia", "Self (programming language)", "Self")}} desenvolupat per David Ungar i Randall Smith. Tanmateix, l'estil de programació sense classes s'ha anat fent més i més popular, i ha sigut adoptat per llenguatges de programació com JavaScript, Cecil, NewtonScript, Io, MOO, REBOL, Kevo, Squeak (quan s'utilitza el marc Viewer per manipular components Morphic), i altres.<a href="#cite-1"><sup>1</sup></a></p> - -<h2 id="JavaScript_Object_Oriented_Programming" name="JavaScript_Object_Oriented_Programming">Programació orientada a Objectes de JavaScript</h2> - -<h3 id="Namespace">Namespace</h3> - -<p>Un namespace és un contenidor el qual permet als desenvolupadors agrupar totes les funcionalitats sota un únic, nom d'aplicació específic. <strong>En JavaScript un namespace és només un altre objecte que conté mètodes, propietats, i objectes.</strong></p> - -<div class="note"> -<p><strong>Nota:</strong> Es important remarcar que en JavaScript, no hi ha diferèn<u>cia de nivell d'idioma entre els objectes regulars i els namespace</u>s. Això dista d'altres llenguatges orientats a objectes, i pot resultat confús als programadors nous en JavaScript.</p> -</div> - -<p>La idea darrera la creació d'un namespace en JavaScript és simple: Un objecte global és creat i totes les variables, metòdes, i funcions es converteixen en propietats d'aquest objecte.<u> L'ús de namespaces també minimitza la possibilitat de conflictes de noms en l'aplicació, ja que cada objecte d'aplicació son propietats d'un objecte global d'aplicació definit</u>.</p> - -<p>Creem un objecte global anomenat MYAPP:</p> - -<pre class="brush: js">// global namespace -var MYAPP = MYAPP || {};</pre> - -<p>En el codi de mostra superior, primer hem comprovat si MYAPP ja està definit (ja sigui en el mateix arxiu o en un altre arxiu). En cas de ser així, s'usa l'objecte global MYAPP existent, del contrari es crea un objecte buit anomenat MYAPP el qual encapsula el mètode, funcions, variables, i objectes.</p> - -<p>També podem crear sub-namespaces:</p> - -<pre class="brush: js">// sub namespace -MYAPP.event = {};</pre> - -<p>Abaix es troba la sintaxi de codi per crear un namespace i afegir variables, funcions, i un mètode:</p> - -<pre class="brush: js">// Create container called MYAPP.commonMethod for common method and properties -MYAPP.commonMethod = { - regExForName: "", // define regex for name validation - regExForPhone: "", // define regex for phone no validation - validateName: function(name){ - // Do something with name, you can access regExForName variable - // using "this.regExForName" - }, - - validatePhoneNo: function(phoneNo){ - // do something with phone number - } -} - -// Object together with the method declarations -MYAPP.event = { - addListener: function(el, type, fn) { - // code stuff - }, - removeListener: function(el, type, fn) { - // code stuff - }, - getEvent: function(e) { - // code stuff - } - - // Can add another method and properties -} - -// Syntax for Using addListener method: -MYAPP.event.addListener("yourel", "type", callback);</pre> - -<h3 id="Core_Objects" name="Core_Objects">Objectes estàndards integrats</h3> - -<p>JavaScript té alguns objectes inclosos en el seu nucli, per exemple, trobem objectes come Math, Object, Array, i String. L'exemple d'abaix ens mostra com fer servir l'objecte Math per aconseguir números aleatoris usant el seu mètode <code>random()</code>.</p> - -<pre class="brush: js">console.log(Math.random()); -</pre> - -<div class="note"><strong>Nota:</strong> Aquest i tots els exemples següents suposen que la funció anomenada {{domxref("console.log()")}} es defineix globalment. De fet, la funció <code>console.log()</code> no és part del llenguatge de JavaScript en si, però molts navegadors ho implementen per tal d'ajudar en la depuració.</div> - -<p>Vegeu <a href="/en-US/docs/Web/JavaScript/Reference/Global_Objects" title="en-US/docs/Web/JavaScript/Reference/Global_Objects">Referència de JavaScript: Objectes estàndards integrats</a> per una llista d'objectes cor en JavaScript.</p> - -<p>Cada objecte en JavaScript és una instància de l'objecte <a href="/en-US/docs/Web/JavaScript/Reference/Global_Objects/Object"><code>Object</code></a> i per tant, n'hereda totes les seves propietats i mètodes.</p> - -<h3 id="Custom_Objects" name="Custom_Objects">Objectes personalitzats</h3> - -<h4 id="The_Class" name="The_Class">La classe</h4> - -<p>JavaScript és un llenguatge basat en prototipus que no conté<u> cap <code>class</code> statement, </u>el qual si que es pot trobar en C++ o Java. Això és confós a vegades per a programadors acostumats a llenguatges amb el <u><code>class</code> statement.</u> En el seu lloc, JavaScript fa servir funcions com a classes. Definir duna classe és tan fàcil com definir una funció. En l'exemple d'abaix definim una nova classe anomenada Person.</p> - -<pre class="brush: js">var Person = function () {}; -</pre> - -<h4 id="The_Object_.28Class_Instance.29" name="The_Object_.28Class_Instance.29">L'objecte (instància de classe)</h4> - -<p>Per crear una nova instància d'un objecte <code>obj</code> fem servir la declaració <code>new obj</code>, assignant el resultat (el qual és de tipus <code>obj</code>) a una variable per accedir-hi més tard. <span style="font-size: 14px; line-height: 1.5;">Una forma alternativa de crear una nova instància és fent servir {{jsxref("Object.create()")}}. Aquesta crearà una instància This will create an <u>uninititalized instance.</u></span></p> - -<p>En l'exemple d'adalt definim una classe anomenada <code>Person</code>. En l'exemple següent creem dues instàncies (<code>person1</code> i <code>person2</code>).</p> - -<pre class="brush: js">var person1 = new Person(); -var person2 = new Person(); -</pre> - -<div class="note"><strong>Nota:</strong> Siusplau vegeu {{jsxref("Object.create()")}} per un mètode instantacional nou, addiccional new, additional, instantiation mètode.</div> - -<h4 id="The_Constructor" name="The_Constructor">El constructor</h4> - -<p>El constructor és cridat en el moment de la instantiation (el moment en que la instància de l'objecte és creat). El constructor és ún mètode de la classe. En JavaScript la funció serveix com el constructor de l'objecte, therefore there is no need to explicitly define a constructor method. Every action declared in the class gets executed at the time of instantiation.</p> - -<p>El constructor es fa servir per establir les propietats de l'objecte o per cridar mè call methods to prepare the object for use. Per afegir mètodes de classes i les seves definicions es necessita una sintaxi diferent que s'explicarà més tard en aquest article.</p> - -<p>En l'exemple d'abaix, el constructor de la classe <code>Person</code> mostra un missatge quan és crea una instànca <code>Person</code>.</p> - -<pre class="brush: js">var Person = function () { - console.log('instance created'); -}; - -var person1 = new Person(); -var person2 = new Person(); -</pre> - -<h4 id="The_Property_.28object_attribute.29" name="The_Property_.28object_attribute.29">La propietat (atribut de l'objecte)</h4> - -<p>Les propietats són variables contingudes en la classe; cada instància de l'objecte té aquestes propietats. Les propietats són asssignades en el constructor (funció) de la classe de forma que es creen en cada instància.</p> - -<p>Per treballar amb propietats de dins de la classe s'utilitza la paraula clau <code>this</code>, que fa referència a l'objecte actual. Accedir (llegir o escriure) a una propietat fora d'aquesta classe es fa mitjançant la sintaxi: <code>InstanceName.Property</code>; Aquesta és la mateixa sintaxi que es fa servir en C++, Java, i numeroses altres llengües. (Dins la classe, la sintaxi <code>this.Property</code> s'utilitza per obtindre o escriure el valor de les propietats.)</p> - -<p>En l'exemple següent definim la propietat <code>firstName</code> property per la classe <code>Person</code> i ho definim com a instanciació.</p> - -<pre class="brush: js">var Person = function (firstName) { - this.firstName = firstName; - console.log('Person instantiated'); -}; - -var person1 = new Person('Alice'); -var person2 = new Person('Bob'); - -// Show the firstName properties of the objects -console.log('person1 is ' + person1.firstName); // logs "person1 is Alice" -console.log('person2 is ' + person2.firstName); // logs "person2 is Bob" -</pre> - -<h4 id="The_methods" name="The_methods">Els mètodes</h4> - -<p>Els mètodes segueixen la mateixa llògica que les propietats; la diferència es que són funcions i estan definides com a funcions. Cridar un mètode és similar a accedir a una propietat, però s'afegeix <code>()</code> al final the nom del mètode, possiblement amb arguments. Per definir un mètode, s'assigna una funció a una propietat amb nom de la propietat de la classe <code>prototype</code>; el nom que s'assigna a la funció és el mateix que el nom que té el mètode en l'objecte.</p> - -<p>En l'exemple següent definim i usem el mètode <code>sayHello()</code> per la classe <code>Person</code>.</p> - -<pre class="brush: js">var Person = function (firstName) { - this.firstName = firstName; -}; - -Person.prototype.sayHello = function() { - console.log("Hello, I'm " + this.firstName); -}; - -var person1 = new Person("Alice"); -var person2 = new Person("Bob"); - -// call the Person sayHello method. -person1.sayHello(); // logs "Hello, I'm Alice" -person2.sayHello(); // logs "Hello, I'm Bob" -</pre> - -<p>En JavaScript els mètodes són funcions normals dels objectes que són lligats a un objecte com una propietat, El que vol dir que poden ser invocats "fora del context". Vegeu el codi d'exemple següent:</p> - -<pre class="brush: js">var Person = function (firstName) { - this.firstName = firstName; -}; - -Person.prototype.sayHello = function() { - console.log("Hello, I'm " + this.firstName); -}; - -var person1 = new Person("Alice"); -var person2 = new Person("Bob"); -var helloFunction = person1.sayHello; - -// logs "Hello, I'm Alice" -person1.sayHello(); - -// logs "Hello, I'm Bob" -person2.sayHello(); - -// logs "Hello, I'm undefined" (or fails -// with a TypeError in strict mode) -helloFunction(); - -// logs true -console.log(helloFunction === person1.sayHello); - -// logs true -console.log(helloFunction === Person.prototype.sayHello); - -// logs "Hello, I'm Alice" -helloFunction.call(person1);</pre> - -<p>Com l'exemple mostra, totes les referències a la funció <code>sayHello</code> — les que existeixen a <code>person1</code>, a <code>Person.prototype</code>, a la variable <code>helloFunction</code>, etc. — fan referència a la <em>mateixa funció</em>. El valor de <code>this</code> durant una crida a la funció depen en com es crida. En el cas comú en que es crida la funció des d'una propietat de l'objecte — <code>person1.sayHello()</code> — <code>this</code> rep el valor de l'objecte d'on prové la propietat (<code>person1</code>), és per això que <code>person1.sayHello()</code> fa servir el nom "Alice" i <code>person2.sayHello()</code> fa servir el nom "Bob". Però si ho cridem d'altres maneres, <code>this</code> rebrà un valor diferent: Cridar-la des d'una variable — <code>helloFunction()</code> — <code>this</code> rep el valor de l'objecte global (<code>window</code>, en navegadors). Al no tenir la propietat <code>firstName aquest </code>objecte (probablement) , acabem amb el resultat "Hello, I'm undefined". (Això és en el mode no estricte; en el <a href="/en-US/docs/Web/JavaScript/Reference/Strict_mode" title="/en/docs/Web/JavaScript/Reference/Functions_and_function_scope/Strict_mode">mode estricte </a>seria diferent [un error], però per evitar confussions no entrarem aquí en detall.) O podem assignar explícitament el valor de <code>this</code> mitjançant <code>Function#call</code> (o <code>Function#apply</code>), com es mostra al final de l'exemple.</p> - -<div class="note"><strong>Nota:</strong> Vegeu més sobre <code>this</code> a <a href="/en-US/docs/Web/JavaScript/Reference/Global_Objects/Function/call" title="https://developer.mozilla.org/en/JavaScript/Reference/Global_Objects/Function/call">Function#call</a> i <a href="/en-US/docs/Web/JavaScript/Reference/Global_Objects/Function/apply" title="https://developer.mozilla.org/en/JavaScript/Reference/Global_Objects/Function/apply">Function#apply</a></div> - -<h4 id="Inheritance" name="Inheritance">L'herència</h4> - -<p>L'herència és una manera de crear una classe com una versió especialitzada d'una o més classes (<em>JavaScript només suporta l'herència única</em>). La classe especialitzada és communment anomenada el <em>fill</em>, i l'altra classe es comunment anomenada el <em>pare</em>. En JavaScript això s'aconsegueix mitjançant l'assignació d'una instància de la classe pare a la classe fill, i després s'especialitza. En navegadors moderns també es pot usar <a href="/en-US/docs/Web/JavaScript/Reference/Global_Objects/Object/create#Classical_inheritance_with_Object.create" title="/en-US/docs/JavaScript/Reference/Global_Objects/Object/create#Classical_inheritance_with_Object.create">Object.create</a> per implementar herències.</p> - -<div class="note"> -<p><strong>Nota:</strong> JavaScript does no detecta la classe fill <code>prototype.constructor</code> (vegeu <a href="/en-US/docs/Web/JavaScript/Reference/Global_Objects/Object/prototype">Object.prototype</a>), així que ho hem de declarar manualment.</p> -</div> - -<p>En l'exemple d'abaix, definim la classe <code>Student</code> com una classe fill de <code>Person</code>. Després redefinim el mètode <code>sayHello()</code> i afegim el mètode <code>sayGoodBye()</code>.</p> - -<pre class="brush: js">// Define the Person constructor -var Person = function(firstName) { - this.firstName = firstName; -}; - -// Add a couple of methods to Person.prototype -Person.prototype.walk = function(){ - console.log("I am walking!"); -}; - -Person.prototype.sayHello = function(){ - console.log("Hello, I'm " + this.firstName); -}; - -// Define the Student constructor -function Student(firstName, subject) { - // Call the parent constructor, making sure (using Function#call) - // that "this" is set correctly during the call - Person.call(this, firstName); - - // Initialize our Student-specific properties - this.subject = subject; -}; - -// Create a Student.prototype object that inherits from Person.prototype. -// Note: A common error here is to use "new Person()" to create the -// Student.prototype. That's incorrect for several reasons, not least -// that we don't have anything to give Person for the "firstName" -// argument. The correct place to call Person is above, where we call -// it from Student. -Student.prototype = Object.create(Person.prototype); // See note below - -// Set the "constructor" property to refer to Student -Student.prototype.constructor = Student; - -// Replace the "sayHello" method -Student.prototype.sayHello = function(){ - console.log("Hello, I'm " + this.firstName + ". I'm studying " - + this.subject + "."); -}; - -// Add a "sayGoodBye" method -Student.prototype.sayGoodBye = function(){ - console.log("Goodbye!"); -}; - -// Example usage: -var student1 = new Student("Janet", "Applied Physics"); -student1.sayHello(); // "Hello, I'm Janet. I'm studying Applied Physics." -student1.walk(); // "I am walking!" -student1.sayGoodBye(); // "Goodbye!" - -// Check that instanceof works correctly -console.log(student1 instanceof Person); // true -console.log(student1 instanceof Student); // true -</pre> - -<p>Pel que fa a la línia <code>Student.prototype = Object.create(Person.prototype)</code>: En els motors de Javascript més antics sense <a href="/en-US/docs/Web/JavaScript/Reference/Global_Objects/Object/create" title="Object.create"><code>Object.create</code></a>, es pot utilitzar tant un "polyfill" (també conegut com a "falca", vegeu l'article enllaçat), o fer servir una funció que aconegueixi assolir el mateix resultat, tal com:</p> - -<pre class="brush: js">function createObject(proto) { - function ctor() { } - ctor.prototype = proto; - return new ctor(); -} - -// Usage: -Student.prototype = createObject(Person.prototype); -</pre> - -<div class="note"><strong>Nota:</strong> Vegeu <a href="/en-US/docs/Web/JavaScript/Reference/Global_Objects/Object/create" title="Object.create">Object.create</a> per més informació sobre el que fa, i una falca per a motors més vells.</div> - -<h4 id="Encapsulation" name="Encapsulation">L'encapsulació</h4> - -<p>En l'exemple anterior, <code>Student</code> no necessita saber com el mètode <code>Person</code> class's <code>walk()</code> és implementat, però tot i així pot fer-lo servir com a mètode; la classe <code>Student</code>no necessita definir explícitament aquest mètode a no ser que ho volguem canviar. D'això se'n diu <strong>encapsulació</strong>, per la qual cada classe empaqueta data i mètodes en una sola unitat.</p> - -<p>L'ocultació d'informació és una característica comuna en altres llenguatges sovint com a mètodes/propietats privats i protegits. Tot i que es podria simular alguna cosa com aquesta en JavaScript, no és un requeriment per fer programació orientada a objectes.<a href="#cite-2"><sup>2</sup></a></p> - -<h4 id="Abstraction" name="Abstraction">L'abstracció</h4> - -<p>L'abstracció és un mecanisme que permet modelar la part que ens ocupa del problema en el qual estem treballant. Això es pot aconseguir per mitjar de l'herència (especialització), o composició. JavaScript aconsegueix l'especialització per mitjà de l'herència, i la composició per mitjà de deixar a les instàncies de classes ser valors d'atributs d'altres objectes.</p> - -<p>La classe Function de JavaScript hereta de la classe Object (això demostra la especialització del model) i la propietat Function.prototype property és una instància d'Object (Això demostra composició).</p> - -<pre class="brush: js">var foo = function () {}; - -// logs "foo is a Function: true" -console.log('foo is a Function: ' + (foo instanceof Function)); - -// logs "foo.prototype is an Object: true" -console.log('foo.prototype is an Object: ' + (foo.prototype instanceof Object));</pre> - -<h4 id="Polymorphism" name="Polymorphism">El polimorfisme</h4> - -<p>Tal i com tots els mètodes i propietats són definides dins la propietat Prototype, classes diferents poden definir mètodes amb el mateix nom; els mètodes estan en l'àmbit de la classe en la qual estan definits. Això només és cert quan les dues classes no tenen una relació pare-fill (quan un no hereta de l'altre en una cadena d'herència).</p> - -<h2 id="Notes" name="Notes">Notes</h2> - -<p>Les tècniques presentades en aquesta article per implementar programació orientada a objectes no són les úniques que es poden fer servir en JavaScript, que és molt flexible en termes de com es pot realitzar la programació orientada a objectes.</p> - -<p>De la mateixa manera, les tècniques que s'han mostrat aquí no utilitzen cap <em>hack</em> del llenguatge, ni imiten cap implementació de teories d'objectes d'altres llenguatges.</p> - -<p>Hi ha altres tècniques que proporcionen programació orientada a objectes més avançada en JavaScript, però aquests estan fora de l'abast d'aquest article introductori.</p> - -<h2 id="References" name="References">Referències</h2> - -<ol> - <li><a name="cite-1"></a>Viquipèdia. "<a href="http://ca.wikipedia.org/wiki/Programaci%C3%B3_orientada_a_objectes">Programació orientada a Objectes</a>"</li> - <li><a name="cite-2"></a>Viquipèdia. "<a href="http://ca.wikipedia.org/wiki/Encapsulaci%C3%B3">Encapsulació (programació orientada a Objectes)</a>"</li> -</ol> diff --git a/files/ca/web/javascript/referencia/sobre/index.html b/files/ca/web/javascript/reference/about/index.html index b1fa0734b3..b1fa0734b3 100644 --- a/files/ca/web/javascript/referencia/sobre/index.html +++ b/files/ca/web/javascript/reference/about/index.html diff --git a/files/ca/web/javascript/referencia/classes/constructor/index.html b/files/ca/web/javascript/reference/classes/constructor/index.html index a0bd6b966f..a0bd6b966f 100644 --- a/files/ca/web/javascript/referencia/classes/constructor/index.html +++ b/files/ca/web/javascript/reference/classes/constructor/index.html diff --git a/files/ca/web/javascript/referencia/classes/index.html b/files/ca/web/javascript/reference/classes/index.html index 23daf7e1ff..23daf7e1ff 100644 --- a/files/ca/web/javascript/referencia/classes/index.html +++ b/files/ca/web/javascript/reference/classes/index.html diff --git a/files/ca/web/javascript/referencia/classes/static/index.html b/files/ca/web/javascript/reference/classes/static/index.html index 3255dc1552..3255dc1552 100644 --- a/files/ca/web/javascript/referencia/classes/static/index.html +++ b/files/ca/web/javascript/reference/classes/static/index.html diff --git a/files/ca/web/javascript/reference/errors/nomes-lectura/index.html b/files/ca/web/javascript/reference/errors/read-only/index.html index 30c70c40dd..30c70c40dd 100644 --- a/files/ca/web/javascript/reference/errors/nomes-lectura/index.html +++ b/files/ca/web/javascript/reference/errors/read-only/index.html diff --git a/files/ca/web/javascript/reference/functions/parameters_rest/index.html b/files/ca/web/javascript/reference/functions/rest_parameters/index.html index 68fc5f0bba..68fc5f0bba 100644 --- a/files/ca/web/javascript/reference/functions/parameters_rest/index.html +++ b/files/ca/web/javascript/reference/functions/rest_parameters/index.html diff --git a/files/ca/web/javascript/referencia/objectes_globals/array/entries/index.html b/files/ca/web/javascript/reference/global_objects/array/entries/index.html index 8b67c06038..8b67c06038 100644 --- a/files/ca/web/javascript/referencia/objectes_globals/array/entries/index.html +++ b/files/ca/web/javascript/reference/global_objects/array/entries/index.html diff --git a/files/ca/web/javascript/referencia/objectes_globals/array/every/index.html b/files/ca/web/javascript/reference/global_objects/array/every/index.html index ad707b4990..ad707b4990 100644 --- a/files/ca/web/javascript/referencia/objectes_globals/array/every/index.html +++ b/files/ca/web/javascript/reference/global_objects/array/every/index.html diff --git a/files/ca/web/javascript/referencia/objectes_globals/array/fill/index.html b/files/ca/web/javascript/reference/global_objects/array/fill/index.html index e1952a8407..e1952a8407 100644 --- a/files/ca/web/javascript/referencia/objectes_globals/array/fill/index.html +++ b/files/ca/web/javascript/reference/global_objects/array/fill/index.html diff --git a/files/ca/web/javascript/referencia/objectes_globals/array/filter/index.html b/files/ca/web/javascript/reference/global_objects/array/filter/index.html index c1bfec77f3..c1bfec77f3 100644 --- a/files/ca/web/javascript/referencia/objectes_globals/array/filter/index.html +++ b/files/ca/web/javascript/reference/global_objects/array/filter/index.html diff --git a/files/ca/web/javascript/referencia/objectes_globals/array/find/index.html b/files/ca/web/javascript/reference/global_objects/array/find/index.html index 8ee7742c09..8ee7742c09 100644 --- a/files/ca/web/javascript/referencia/objectes_globals/array/find/index.html +++ b/files/ca/web/javascript/reference/global_objects/array/find/index.html diff --git a/files/ca/web/javascript/referencia/objectes_globals/array/findindex/index.html b/files/ca/web/javascript/reference/global_objects/array/findindex/index.html index 5b089bdb98..5b089bdb98 100644 --- a/files/ca/web/javascript/referencia/objectes_globals/array/findindex/index.html +++ b/files/ca/web/javascript/reference/global_objects/array/findindex/index.html diff --git a/files/ca/web/javascript/referencia/objectes_globals/array/foreach/index.html b/files/ca/web/javascript/reference/global_objects/array/foreach/index.html index 4d391346eb..4d391346eb 100644 --- a/files/ca/web/javascript/referencia/objectes_globals/array/foreach/index.html +++ b/files/ca/web/javascript/reference/global_objects/array/foreach/index.html diff --git a/files/ca/web/javascript/referencia/objectes_globals/array/includes/index.html b/files/ca/web/javascript/reference/global_objects/array/includes/index.html index 9f64b0e117..9f64b0e117 100644 --- a/files/ca/web/javascript/referencia/objectes_globals/array/includes/index.html +++ b/files/ca/web/javascript/reference/global_objects/array/includes/index.html diff --git a/files/ca/web/javascript/referencia/objectes_globals/array/index.html b/files/ca/web/javascript/reference/global_objects/array/index.html index da7c400799..da7c400799 100644 --- a/files/ca/web/javascript/referencia/objectes_globals/array/index.html +++ b/files/ca/web/javascript/reference/global_objects/array/index.html diff --git a/files/ca/web/javascript/referencia/objectes_globals/array/indexof/index.html b/files/ca/web/javascript/reference/global_objects/array/indexof/index.html index 939571a0c8..939571a0c8 100644 --- a/files/ca/web/javascript/referencia/objectes_globals/array/indexof/index.html +++ b/files/ca/web/javascript/reference/global_objects/array/indexof/index.html diff --git a/files/ca/web/javascript/referencia/objectes_globals/array/isarray/index.html b/files/ca/web/javascript/reference/global_objects/array/isarray/index.html index 6393dde86f..6393dde86f 100644 --- a/files/ca/web/javascript/referencia/objectes_globals/array/isarray/index.html +++ b/files/ca/web/javascript/reference/global_objects/array/isarray/index.html diff --git a/files/ca/web/javascript/referencia/objectes_globals/array/join/index.html b/files/ca/web/javascript/reference/global_objects/array/join/index.html index 8d76b4474a..8d76b4474a 100644 --- a/files/ca/web/javascript/referencia/objectes_globals/array/join/index.html +++ b/files/ca/web/javascript/reference/global_objects/array/join/index.html diff --git a/files/ca/web/javascript/referencia/objectes_globals/array/keys/index.html b/files/ca/web/javascript/reference/global_objects/array/keys/index.html index 7d9df8e1f5..7d9df8e1f5 100644 --- a/files/ca/web/javascript/referencia/objectes_globals/array/keys/index.html +++ b/files/ca/web/javascript/reference/global_objects/array/keys/index.html diff --git a/files/ca/web/javascript/referencia/objectes_globals/array/lastindexof/index.html b/files/ca/web/javascript/reference/global_objects/array/lastindexof/index.html index 038aa614e5..038aa614e5 100644 --- a/files/ca/web/javascript/referencia/objectes_globals/array/lastindexof/index.html +++ b/files/ca/web/javascript/reference/global_objects/array/lastindexof/index.html diff --git a/files/ca/web/javascript/referencia/objectes_globals/array/length/index.html b/files/ca/web/javascript/reference/global_objects/array/length/index.html index a4954565ff..a4954565ff 100644 --- a/files/ca/web/javascript/referencia/objectes_globals/array/length/index.html +++ b/files/ca/web/javascript/reference/global_objects/array/length/index.html diff --git a/files/ca/web/javascript/referencia/objectes_globals/array/map/index.html b/files/ca/web/javascript/reference/global_objects/array/map/index.html index 6f0dc1a0d4..6f0dc1a0d4 100644 --- a/files/ca/web/javascript/referencia/objectes_globals/array/map/index.html +++ b/files/ca/web/javascript/reference/global_objects/array/map/index.html diff --git a/files/ca/web/javascript/referencia/objectes_globals/array/of/index.html b/files/ca/web/javascript/reference/global_objects/array/of/index.html index efe2d96abd..efe2d96abd 100644 --- a/files/ca/web/javascript/referencia/objectes_globals/array/of/index.html +++ b/files/ca/web/javascript/reference/global_objects/array/of/index.html diff --git a/files/ca/web/javascript/referencia/objectes_globals/array/pop/index.html b/files/ca/web/javascript/reference/global_objects/array/pop/index.html index 7d2ee3189f..7d2ee3189f 100644 --- a/files/ca/web/javascript/referencia/objectes_globals/array/pop/index.html +++ b/files/ca/web/javascript/reference/global_objects/array/pop/index.html diff --git a/files/ca/web/javascript/referencia/objectes_globals/array/push/index.html b/files/ca/web/javascript/reference/global_objects/array/push/index.html index 5770e5a10c..5770e5a10c 100644 --- a/files/ca/web/javascript/referencia/objectes_globals/array/push/index.html +++ b/files/ca/web/javascript/reference/global_objects/array/push/index.html diff --git a/files/ca/web/javascript/referencia/objectes_globals/array/reduce/index.html b/files/ca/web/javascript/reference/global_objects/array/reduce/index.html index fa6253fd0c..fa6253fd0c 100644 --- a/files/ca/web/javascript/referencia/objectes_globals/array/reduce/index.html +++ b/files/ca/web/javascript/reference/global_objects/array/reduce/index.html diff --git a/files/ca/web/javascript/referencia/objectes_globals/array/reverse/index.html b/files/ca/web/javascript/reference/global_objects/array/reverse/index.html index 2528cabdc5..2528cabdc5 100644 --- a/files/ca/web/javascript/referencia/objectes_globals/array/reverse/index.html +++ b/files/ca/web/javascript/reference/global_objects/array/reverse/index.html diff --git a/files/ca/web/javascript/referencia/objectes_globals/array/shift/index.html b/files/ca/web/javascript/reference/global_objects/array/shift/index.html index 7b5fa1b330..7b5fa1b330 100644 --- a/files/ca/web/javascript/referencia/objectes_globals/array/shift/index.html +++ b/files/ca/web/javascript/reference/global_objects/array/shift/index.html diff --git a/files/ca/web/javascript/referencia/objectes_globals/array/slice/index.html b/files/ca/web/javascript/reference/global_objects/array/slice/index.html index d181f94a65..d181f94a65 100644 --- a/files/ca/web/javascript/referencia/objectes_globals/array/slice/index.html +++ b/files/ca/web/javascript/reference/global_objects/array/slice/index.html diff --git a/files/ca/web/javascript/referencia/objectes_globals/array/some/index.html b/files/ca/web/javascript/reference/global_objects/array/some/index.html index 7abc1ed76d..7abc1ed76d 100644 --- a/files/ca/web/javascript/referencia/objectes_globals/array/some/index.html +++ b/files/ca/web/javascript/reference/global_objects/array/some/index.html diff --git a/files/ca/web/javascript/referencia/objectes_globals/array/splice/index.html b/files/ca/web/javascript/reference/global_objects/array/splice/index.html index c1abada8d9..c1abada8d9 100644 --- a/files/ca/web/javascript/referencia/objectes_globals/array/splice/index.html +++ b/files/ca/web/javascript/reference/global_objects/array/splice/index.html diff --git a/files/ca/web/javascript/referencia/objectes_globals/boolean/index.html b/files/ca/web/javascript/reference/global_objects/boolean/index.html index 83f2597df9..83f2597df9 100644 --- a/files/ca/web/javascript/referencia/objectes_globals/boolean/index.html +++ b/files/ca/web/javascript/reference/global_objects/boolean/index.html diff --git a/files/ca/web/javascript/referencia/objectes_globals/boolean/tosource/index.html b/files/ca/web/javascript/reference/global_objects/boolean/tosource/index.html index 6b6a1b8b2b..6b6a1b8b2b 100644 --- a/files/ca/web/javascript/referencia/objectes_globals/boolean/tosource/index.html +++ b/files/ca/web/javascript/reference/global_objects/boolean/tosource/index.html diff --git a/files/ca/web/javascript/referencia/objectes_globals/boolean/tostring/index.html b/files/ca/web/javascript/reference/global_objects/boolean/tostring/index.html index 90da6cba3a..90da6cba3a 100644 --- a/files/ca/web/javascript/referencia/objectes_globals/boolean/tostring/index.html +++ b/files/ca/web/javascript/reference/global_objects/boolean/tostring/index.html diff --git a/files/ca/web/javascript/referencia/objectes_globals/boolean/valueof/index.html b/files/ca/web/javascript/reference/global_objects/boolean/valueof/index.html index f99fd3c6c0..f99fd3c6c0 100644 --- a/files/ca/web/javascript/referencia/objectes_globals/boolean/valueof/index.html +++ b/files/ca/web/javascript/reference/global_objects/boolean/valueof/index.html diff --git a/files/ca/web/javascript/reference/global_objects/dataview/prototype/index.html b/files/ca/web/javascript/reference/global_objects/dataview/prototype/index.html deleted file mode 100644 index ebd6cbe729..0000000000 --- a/files/ca/web/javascript/reference/global_objects/dataview/prototype/index.html +++ /dev/null @@ -1,147 +0,0 @@ ---- -title: DataView.prototype -slug: Web/JavaScript/Reference/Global_Objects/DataView/prototype -translation_of: Web/JavaScript/Reference/Global_Objects/DataView -translation_of_original: Web/JavaScript/Reference/Global_Objects/DataView/prototype ---- -<div>{{JSRef}}</div> - -<p>La propietat <code><strong>DataView</strong></code><strong><code>.prototype</code></strong> representa el prototip de l'objecte {{jsxref("DataView")}}.</p> - -<div>{{js_property_attributes(0,0,0)}}</div> - -<h2 id="Descripció">Descripció</h2> - -<p>Les instàncies <code>DataView</code> hereten de <code>DataView.prototype</code>. Com passa amb tots els constructors, podeu canviar l'objecte prototip del constructor per produir canvis a totes les instàncies <code>DataView</code>.</p> - -<h2 id="Propietats">Propietats</h2> - -<dl> - <dt>DataView.prototype.constructor</dt> - <dd>Especifica la funció que crea un prototip de l'objecte. El valor inicial és el constructor integrat estàndard <code>DataView</code>.</dd> - <dt>{{jsxref("DataView.prototype.buffer")}} {{readonlyInline}}</dt> - <dd>L'{{jsxref("ArrayBuffer")}} referenciat per aquesta vista. Fixat en el temps de construcció i per tant és <strong>només de lectura.</strong></dd> - <dt>{{jsxref("DataView.prototype.byteLength")}} {{readonlyInline}}</dt> - <dd>La llargària (en bytes) d'aquesta vista des del començament del seu {{jsxref("ArrayBuffer")}}. Fixat en el temps de construcció i per tant és <strong>només de lectura.</strong></dd> - <dt>{{jsxref("DataView.prototype.byteOffset")}} {{readonlyInline}}</dt> - <dd>La posició (en bytes) d'aquesta vista des de l'inici del seu {{jsxref("ArrayBuffer")}}. Fixat en el temps de construcció i per tant és <strong>només de lectura.</strong></dd> -</dl> - -<h2 id="Mètodes">Mètodes</h2> - -<h3 id="Lectura">Lectura</h3> - -<dl> - <dt>{{jsxref("DataView.prototype.getInt8()")}}</dt> - <dd>Obté un nombre sencer (byte) de 8 bits amb signe al byte de posició especificat des de l'inici de la vista.</dd> - <dt>{{jsxref("DataView.prototype.getUint8()")}}</dt> - <dd>Obté un nombre sencer sense signe de 8 bits (unsigned byte) al byte de posició especificat des de l'inici de la vista.</dd> - <dt>{{jsxref("DataView.prototype.getInt16()")}}</dt> - <dd>Obté un nombre sencer de 16 bits (short) al byte de posició especificat des de l'inici de la vista.</dd> - <dt>{{jsxref("DataView.prototype.getUint16()")}}</dt> - <dd>Obté un nombre sencer sense signe de 16 bits (unsigned short) al byte de posició especificat des de l'inici de la vista.</dd> - <dt>{{jsxref("DataView.prototype.getInt32()")}}</dt> - <dd>Obté un nombre sencer de 32 bits (long) al byte de posició especificat des de l'inici de la vista.</dd> - <dt>{{jsxref("DataView.prototype.getUint32()")}}</dt> - <dd>Obté un nombre sencer sense signe de 31 bits (unsigned long) al byte de posició especificat des de l'inici de la vista.</dd> - <dt>{{jsxref("DataView.prototype.getFloat32()")}}</dt> - <dd>Obté un nombre en coma flotant amb signe de 32 bits (float) al byte de posició especificat des de l'inici de la vista.</dd> - <dt>{{jsxref("DataView.prototype.getFloat64()")}}</dt> - <dd>Obté un nombre en coma flotant amb signe de 64 bits (double) al byte de posició especificat des de l'inici de la vista.</dd> -</dl> - -<h3 id="Escritura">Escritura</h3> - -<dl> - <dt>{{jsxref("DataView.prototype.setInt8()")}}</dt> - <dd>Emmagatzema el valor d'un nombre sencer de 8 bits (byte) al byte de posició especificat des de l'inici de la vista.</dd> - <dt>{{jsxref("DataView.prototype.setUint8()")}}</dt> - <dd>Emmagatzema el valor d'un nombre sencer sense signe de 8 bits (unsigned byte) al byte de posició especificat des de l'inici de la vista.</dd> - <dt>{{jsxref("DataView.prototype.setInt16()")}}</dt> - <dd>Emmagatzema el valor d'un nombre sencer amb signe de 16 bits (short) al byte de posició especificat des de l'inici de la vista.</dd> - <dt>{{jsxref("DataView.prototype.setUint16()")}}</dt> - <dd>Emmagatzema el valor d'un nombre sencer sense signe de 16 bits (unsigned short) al byte de posició especificat des de l'inici de la vista.</dd> - <dt>{{jsxref("DataView.prototype.setInt32()")}}</dt> - <dd>Emmagatzema el valor d'un nombre sencer amb signe de 32 bits (long) al byte de posició especificat des de l'inici de la vista.</dd> - <dt>{{jsxref("DataView.prototype.setUint32()")}}</dt> - <dd>Emmagatzema el valor d'un nombre sencer sense signe de 32 bits (unsigned long) al byte de posició especificat des de l'inici de la vista.</dd> - <dt>{{jsxref("DataView.prototype.setFloat32()")}}</dt> - <dd>Emmagatzema el valor d'un nombre en coma flotant amb signe de 32 bits (float) al byte de posició especificat des de l'inici de la vista.</dd> - <dt>{{jsxref("DataView.prototype.setFloat64()")}}</dt> - <dd>Emmagatzema el valor d'un nombre en coma flotant amb signe de 64 bits (double) al byte de posició especificat des de l'inici de la vista.</dd> -</dl> - -<h2 id="Especificacions">Especificacions</h2> - -<table class="standard-table"> - <tbody> - <tr> - <th scope="col">Especificació</th> - <th scope="col">Estat</th> - <th scope="col">Comentaris</th> - </tr> - <tr> - <td>{{SpecName('ES6', '#sec-dataview.prototype', 'DataView.prototype')}}</td> - <td>{{Spec2('ES6')}}</td> - <td>Definició inicial.</td> - </tr> - </tbody> -</table> - -<h2 id="Compatibilitat_amb_navegador">Compatibilitat amb navegador</h2> - -<p>{{CompatibilityTable}}</p> - -<div id="compat-desktop"> -<table class="compat-table"> - <tbody> - <tr> - <th>Característica</th> - <th>Chrome</th> - <th>Firefox (Gecko)</th> - <th>Internet Explorer</th> - <th>Opera</th> - <th>Safari</th> - </tr> - <tr> - <td>Suport bàsic</td> - <td>9.0</td> - <td>{{ CompatGeckoDesktop("15.0") }}</td> - <td>10</td> - <td>12.1</td> - <td>5.1</td> - </tr> - </tbody> -</table> -</div> - -<div id="compat-mobile"> -<table class="compat-table"> - <tbody> - <tr> - <th>Característica</th> - <th>Android</th> - <th>Chrome per Android</th> - <th>Firefox Mobile (Gecko)</th> - <th>IE Mobile</th> - <th>Opera Mobile</th> - <th>Safari Mobile</th> - </tr> - <tr> - <td>Suport bàsic</td> - <td>4.0</td> - <td>{{CompatVersionUnknown}}</td> - <td>{{CompatGeckoMobile("15")}}</td> - <td>{{CompatUnknown}}</td> - <td>12.0</td> - <td>4.2</td> - </tr> - </tbody> -</table> -</div> - -<h2 id="Vegeu_també">Vegeu també</h2> - -<ul> - <li>{{jsxref("DataView")}}</li> -</ul> diff --git a/files/ca/web/javascript/referencia/objectes_globals/date/getdate/index.html b/files/ca/web/javascript/reference/global_objects/date/getdate/index.html index 16808aaae0..16808aaae0 100644 --- a/files/ca/web/javascript/referencia/objectes_globals/date/getdate/index.html +++ b/files/ca/web/javascript/reference/global_objects/date/getdate/index.html diff --git a/files/ca/web/javascript/referencia/objectes_globals/date/getday/index.html b/files/ca/web/javascript/reference/global_objects/date/getday/index.html index 244562c167..244562c167 100644 --- a/files/ca/web/javascript/referencia/objectes_globals/date/getday/index.html +++ b/files/ca/web/javascript/reference/global_objects/date/getday/index.html diff --git a/files/ca/web/javascript/referencia/objectes_globals/date/getfullyear/index.html b/files/ca/web/javascript/reference/global_objects/date/getfullyear/index.html index 94f14f4332..94f14f4332 100644 --- a/files/ca/web/javascript/referencia/objectes_globals/date/getfullyear/index.html +++ b/files/ca/web/javascript/reference/global_objects/date/getfullyear/index.html diff --git a/files/ca/web/javascript/referencia/objectes_globals/date/gethours/index.html b/files/ca/web/javascript/reference/global_objects/date/gethours/index.html index 3848e96339..3848e96339 100644 --- a/files/ca/web/javascript/referencia/objectes_globals/date/gethours/index.html +++ b/files/ca/web/javascript/reference/global_objects/date/gethours/index.html diff --git a/files/ca/web/javascript/referencia/objectes_globals/date/getmilliseconds/index.html b/files/ca/web/javascript/reference/global_objects/date/getmilliseconds/index.html index d438cf8cad..d438cf8cad 100644 --- a/files/ca/web/javascript/referencia/objectes_globals/date/getmilliseconds/index.html +++ b/files/ca/web/javascript/reference/global_objects/date/getmilliseconds/index.html diff --git a/files/ca/web/javascript/referencia/objectes_globals/date/getminutes/index.html b/files/ca/web/javascript/reference/global_objects/date/getminutes/index.html index 3ae466d56d..3ae466d56d 100644 --- a/files/ca/web/javascript/referencia/objectes_globals/date/getminutes/index.html +++ b/files/ca/web/javascript/reference/global_objects/date/getminutes/index.html diff --git a/files/ca/web/javascript/referencia/objectes_globals/date/getmonth/index.html b/files/ca/web/javascript/reference/global_objects/date/getmonth/index.html index 2631ebef9a..2631ebef9a 100644 --- a/files/ca/web/javascript/referencia/objectes_globals/date/getmonth/index.html +++ b/files/ca/web/javascript/reference/global_objects/date/getmonth/index.html diff --git a/files/ca/web/javascript/referencia/objectes_globals/date/getseconds/index.html b/files/ca/web/javascript/reference/global_objects/date/getseconds/index.html index 790c62e3e9..790c62e3e9 100644 --- a/files/ca/web/javascript/referencia/objectes_globals/date/getseconds/index.html +++ b/files/ca/web/javascript/reference/global_objects/date/getseconds/index.html diff --git a/files/ca/web/javascript/referencia/objectes_globals/date/gettime/index.html b/files/ca/web/javascript/reference/global_objects/date/gettime/index.html index 20c45f31c5..20c45f31c5 100644 --- a/files/ca/web/javascript/referencia/objectes_globals/date/gettime/index.html +++ b/files/ca/web/javascript/reference/global_objects/date/gettime/index.html diff --git a/files/ca/web/javascript/referencia/objectes_globals/date/gettimezoneoffset/index.html b/files/ca/web/javascript/reference/global_objects/date/gettimezoneoffset/index.html index 8af4d6e9e8..8af4d6e9e8 100644 --- a/files/ca/web/javascript/referencia/objectes_globals/date/gettimezoneoffset/index.html +++ b/files/ca/web/javascript/reference/global_objects/date/gettimezoneoffset/index.html diff --git a/files/ca/web/javascript/referencia/objectes_globals/date/getutcdate/index.html b/files/ca/web/javascript/reference/global_objects/date/getutcdate/index.html index ee3a8b881f..ee3a8b881f 100644 --- a/files/ca/web/javascript/referencia/objectes_globals/date/getutcdate/index.html +++ b/files/ca/web/javascript/reference/global_objects/date/getutcdate/index.html diff --git a/files/ca/web/javascript/referencia/objectes_globals/date/getutcday/index.html b/files/ca/web/javascript/reference/global_objects/date/getutcday/index.html index b6f992f9a1..b6f992f9a1 100644 --- a/files/ca/web/javascript/referencia/objectes_globals/date/getutcday/index.html +++ b/files/ca/web/javascript/reference/global_objects/date/getutcday/index.html diff --git a/files/ca/web/javascript/referencia/objectes_globals/date/getutcfullyear/index.html b/files/ca/web/javascript/reference/global_objects/date/getutcfullyear/index.html index 3ca1526e28..3ca1526e28 100644 --- a/files/ca/web/javascript/referencia/objectes_globals/date/getutcfullyear/index.html +++ b/files/ca/web/javascript/reference/global_objects/date/getutcfullyear/index.html diff --git a/files/ca/web/javascript/referencia/objectes_globals/date/getutchours/index.html b/files/ca/web/javascript/reference/global_objects/date/getutchours/index.html index f575df92a1..f575df92a1 100644 --- a/files/ca/web/javascript/referencia/objectes_globals/date/getutchours/index.html +++ b/files/ca/web/javascript/reference/global_objects/date/getutchours/index.html diff --git a/files/ca/web/javascript/referencia/objectes_globals/date/getutcmilliseconds/index.html b/files/ca/web/javascript/reference/global_objects/date/getutcmilliseconds/index.html index d09ac5bded..d09ac5bded 100644 --- a/files/ca/web/javascript/referencia/objectes_globals/date/getutcmilliseconds/index.html +++ b/files/ca/web/javascript/reference/global_objects/date/getutcmilliseconds/index.html diff --git a/files/ca/web/javascript/referencia/objectes_globals/date/getutcminutes/index.html b/files/ca/web/javascript/reference/global_objects/date/getutcminutes/index.html index e18a13c52f..e18a13c52f 100644 --- a/files/ca/web/javascript/referencia/objectes_globals/date/getutcminutes/index.html +++ b/files/ca/web/javascript/reference/global_objects/date/getutcminutes/index.html diff --git a/files/ca/web/javascript/referencia/objectes_globals/date/getutcmonth/index.html b/files/ca/web/javascript/reference/global_objects/date/getutcmonth/index.html index 48ba78349b..48ba78349b 100644 --- a/files/ca/web/javascript/referencia/objectes_globals/date/getutcmonth/index.html +++ b/files/ca/web/javascript/reference/global_objects/date/getutcmonth/index.html diff --git a/files/ca/web/javascript/referencia/objectes_globals/date/getutcseconds/index.html b/files/ca/web/javascript/reference/global_objects/date/getutcseconds/index.html index 1f69ca8199..1f69ca8199 100644 --- a/files/ca/web/javascript/referencia/objectes_globals/date/getutcseconds/index.html +++ b/files/ca/web/javascript/reference/global_objects/date/getutcseconds/index.html diff --git a/files/ca/web/javascript/referencia/objectes_globals/date/getyear/index.html b/files/ca/web/javascript/reference/global_objects/date/getyear/index.html index 8724b2e03b..8724b2e03b 100644 --- a/files/ca/web/javascript/referencia/objectes_globals/date/getyear/index.html +++ b/files/ca/web/javascript/reference/global_objects/date/getyear/index.html diff --git a/files/ca/web/javascript/referencia/objectes_globals/date/index.html b/files/ca/web/javascript/reference/global_objects/date/index.html index 3fb5a9368d..3fb5a9368d 100644 --- a/files/ca/web/javascript/referencia/objectes_globals/date/index.html +++ b/files/ca/web/javascript/reference/global_objects/date/index.html diff --git a/files/ca/web/javascript/referencia/objectes_globals/date/now/index.html b/files/ca/web/javascript/reference/global_objects/date/now/index.html index c3ef05fa86..c3ef05fa86 100644 --- a/files/ca/web/javascript/referencia/objectes_globals/date/now/index.html +++ b/files/ca/web/javascript/reference/global_objects/date/now/index.html diff --git a/files/ca/web/javascript/referencia/objectes_globals/date/setdate/index.html b/files/ca/web/javascript/reference/global_objects/date/setdate/index.html index 746de134fe..746de134fe 100644 --- a/files/ca/web/javascript/referencia/objectes_globals/date/setdate/index.html +++ b/files/ca/web/javascript/reference/global_objects/date/setdate/index.html diff --git a/files/ca/web/javascript/referencia/objectes_globals/date/setfullyear/index.html b/files/ca/web/javascript/reference/global_objects/date/setfullyear/index.html index c29d56ca4e..c29d56ca4e 100644 --- a/files/ca/web/javascript/referencia/objectes_globals/date/setfullyear/index.html +++ b/files/ca/web/javascript/reference/global_objects/date/setfullyear/index.html diff --git a/files/ca/web/javascript/referencia/objectes_globals/date/sethours/index.html b/files/ca/web/javascript/reference/global_objects/date/sethours/index.html index 7f660ba344..7f660ba344 100644 --- a/files/ca/web/javascript/referencia/objectes_globals/date/sethours/index.html +++ b/files/ca/web/javascript/reference/global_objects/date/sethours/index.html diff --git a/files/ca/web/javascript/referencia/objectes_globals/date/setmilliseconds/index.html b/files/ca/web/javascript/reference/global_objects/date/setmilliseconds/index.html index 53dc451ad4..53dc451ad4 100644 --- a/files/ca/web/javascript/referencia/objectes_globals/date/setmilliseconds/index.html +++ b/files/ca/web/javascript/reference/global_objects/date/setmilliseconds/index.html diff --git a/files/ca/web/javascript/referencia/objectes_globals/date/setminutes/index.html b/files/ca/web/javascript/reference/global_objects/date/setminutes/index.html index 7dba61cade..7dba61cade 100644 --- a/files/ca/web/javascript/referencia/objectes_globals/date/setminutes/index.html +++ b/files/ca/web/javascript/reference/global_objects/date/setminutes/index.html diff --git a/files/ca/web/javascript/referencia/objectes_globals/date/setmonth/index.html b/files/ca/web/javascript/reference/global_objects/date/setmonth/index.html index a84f51df7c..a84f51df7c 100644 --- a/files/ca/web/javascript/referencia/objectes_globals/date/setmonth/index.html +++ b/files/ca/web/javascript/reference/global_objects/date/setmonth/index.html diff --git a/files/ca/web/javascript/referencia/objectes_globals/date/setseconds/index.html b/files/ca/web/javascript/reference/global_objects/date/setseconds/index.html index 60ea2c0ae3..60ea2c0ae3 100644 --- a/files/ca/web/javascript/referencia/objectes_globals/date/setseconds/index.html +++ b/files/ca/web/javascript/reference/global_objects/date/setseconds/index.html diff --git a/files/ca/web/javascript/referencia/objectes_globals/date/settime/index.html b/files/ca/web/javascript/reference/global_objects/date/settime/index.html index 9774f3ee4c..9774f3ee4c 100644 --- a/files/ca/web/javascript/referencia/objectes_globals/date/settime/index.html +++ b/files/ca/web/javascript/reference/global_objects/date/settime/index.html diff --git a/files/ca/web/javascript/referencia/objectes_globals/date/setutcdate/index.html b/files/ca/web/javascript/reference/global_objects/date/setutcdate/index.html index 109178f66a..109178f66a 100644 --- a/files/ca/web/javascript/referencia/objectes_globals/date/setutcdate/index.html +++ b/files/ca/web/javascript/reference/global_objects/date/setutcdate/index.html diff --git a/files/ca/web/javascript/referencia/objectes_globals/date/setutcfullyear/index.html b/files/ca/web/javascript/reference/global_objects/date/setutcfullyear/index.html index 55185a431b..55185a431b 100644 --- a/files/ca/web/javascript/referencia/objectes_globals/date/setutcfullyear/index.html +++ b/files/ca/web/javascript/reference/global_objects/date/setutcfullyear/index.html diff --git a/files/ca/web/javascript/referencia/objectes_globals/date/setutchours/index.html b/files/ca/web/javascript/reference/global_objects/date/setutchours/index.html index 3c75ea903c..3c75ea903c 100644 --- a/files/ca/web/javascript/referencia/objectes_globals/date/setutchours/index.html +++ b/files/ca/web/javascript/reference/global_objects/date/setutchours/index.html diff --git a/files/ca/web/javascript/referencia/objectes_globals/date/setutcmilliseconds/index.html b/files/ca/web/javascript/reference/global_objects/date/setutcmilliseconds/index.html index e3265e247f..e3265e247f 100644 --- a/files/ca/web/javascript/referencia/objectes_globals/date/setutcmilliseconds/index.html +++ b/files/ca/web/javascript/reference/global_objects/date/setutcmilliseconds/index.html diff --git a/files/ca/web/javascript/referencia/objectes_globals/date/setutcminutes/index.html b/files/ca/web/javascript/reference/global_objects/date/setutcminutes/index.html index 5551364e52..5551364e52 100644 --- a/files/ca/web/javascript/referencia/objectes_globals/date/setutcminutes/index.html +++ b/files/ca/web/javascript/reference/global_objects/date/setutcminutes/index.html diff --git a/files/ca/web/javascript/referencia/objectes_globals/date/setutcmonth/index.html b/files/ca/web/javascript/reference/global_objects/date/setutcmonth/index.html index e06f0fba64..e06f0fba64 100644 --- a/files/ca/web/javascript/referencia/objectes_globals/date/setutcmonth/index.html +++ b/files/ca/web/javascript/reference/global_objects/date/setutcmonth/index.html diff --git a/files/ca/web/javascript/referencia/objectes_globals/date/setutcseconds/index.html b/files/ca/web/javascript/reference/global_objects/date/setutcseconds/index.html index 66f33a9e1b..66f33a9e1b 100644 --- a/files/ca/web/javascript/referencia/objectes_globals/date/setutcseconds/index.html +++ b/files/ca/web/javascript/reference/global_objects/date/setutcseconds/index.html diff --git a/files/ca/web/javascript/referencia/objectes_globals/date/setyear/index.html b/files/ca/web/javascript/reference/global_objects/date/setyear/index.html index ead16f2d21..ead16f2d21 100644 --- a/files/ca/web/javascript/referencia/objectes_globals/date/setyear/index.html +++ b/files/ca/web/javascript/reference/global_objects/date/setyear/index.html diff --git a/files/ca/web/javascript/referencia/objectes_globals/date/todatestring/index.html b/files/ca/web/javascript/reference/global_objects/date/todatestring/index.html index 9548215179..9548215179 100644 --- a/files/ca/web/javascript/referencia/objectes_globals/date/todatestring/index.html +++ b/files/ca/web/javascript/reference/global_objects/date/todatestring/index.html diff --git a/files/ca/web/javascript/referencia/objectes_globals/date/togmtstring/index.html b/files/ca/web/javascript/reference/global_objects/date/togmtstring/index.html index 08e63be739..08e63be739 100644 --- a/files/ca/web/javascript/referencia/objectes_globals/date/togmtstring/index.html +++ b/files/ca/web/javascript/reference/global_objects/date/togmtstring/index.html diff --git a/files/ca/web/javascript/referencia/objectes_globals/date/toisostring/index.html b/files/ca/web/javascript/reference/global_objects/date/toisostring/index.html index 759e53225c..759e53225c 100644 --- a/files/ca/web/javascript/referencia/objectes_globals/date/toisostring/index.html +++ b/files/ca/web/javascript/reference/global_objects/date/toisostring/index.html diff --git a/files/ca/web/javascript/referencia/objectes_globals/date/tojson/index.html b/files/ca/web/javascript/reference/global_objects/date/tojson/index.html index 8b583470bf..8b583470bf 100644 --- a/files/ca/web/javascript/referencia/objectes_globals/date/tojson/index.html +++ b/files/ca/web/javascript/reference/global_objects/date/tojson/index.html diff --git a/files/ca/web/javascript/referencia/objectes_globals/date/tostring/index.html b/files/ca/web/javascript/reference/global_objects/date/tostring/index.html index 8482fe5298..8482fe5298 100644 --- a/files/ca/web/javascript/referencia/objectes_globals/date/tostring/index.html +++ b/files/ca/web/javascript/reference/global_objects/date/tostring/index.html diff --git a/files/ca/web/javascript/referencia/objectes_globals/date/totimestring/index.html b/files/ca/web/javascript/reference/global_objects/date/totimestring/index.html index aac8de7a85..aac8de7a85 100644 --- a/files/ca/web/javascript/referencia/objectes_globals/date/totimestring/index.html +++ b/files/ca/web/javascript/reference/global_objects/date/totimestring/index.html diff --git a/files/ca/web/javascript/referencia/objectes_globals/date/utc/index.html b/files/ca/web/javascript/reference/global_objects/date/utc/index.html index 37bb2bc369..37bb2bc369 100644 --- a/files/ca/web/javascript/referencia/objectes_globals/date/utc/index.html +++ b/files/ca/web/javascript/reference/global_objects/date/utc/index.html diff --git a/files/ca/web/javascript/referencia/objectes_globals/date/valueof/index.html b/files/ca/web/javascript/reference/global_objects/date/valueof/index.html index 6c5f810ead..6c5f810ead 100644 --- a/files/ca/web/javascript/referencia/objectes_globals/date/valueof/index.html +++ b/files/ca/web/javascript/reference/global_objects/date/valueof/index.html diff --git a/files/ca/web/javascript/referencia/objectes_globals/error/columnnumber/index.html b/files/ca/web/javascript/reference/global_objects/error/columnnumber/index.html index 377c797cd3..377c797cd3 100644 --- a/files/ca/web/javascript/referencia/objectes_globals/error/columnnumber/index.html +++ b/files/ca/web/javascript/reference/global_objects/error/columnnumber/index.html diff --git a/files/ca/web/javascript/referencia/objectes_globals/error/filename/index.html b/files/ca/web/javascript/reference/global_objects/error/filename/index.html index dcca532f86..dcca532f86 100644 --- a/files/ca/web/javascript/referencia/objectes_globals/error/filename/index.html +++ b/files/ca/web/javascript/reference/global_objects/error/filename/index.html diff --git a/files/ca/web/javascript/referencia/objectes_globals/error/index.html b/files/ca/web/javascript/reference/global_objects/error/index.html index 2e1592edc5..2e1592edc5 100644 --- a/files/ca/web/javascript/referencia/objectes_globals/error/index.html +++ b/files/ca/web/javascript/reference/global_objects/error/index.html diff --git a/files/ca/web/javascript/referencia/objectes_globals/error/linenumber/index.html b/files/ca/web/javascript/reference/global_objects/error/linenumber/index.html index 7b85f29c19..7b85f29c19 100644 --- a/files/ca/web/javascript/referencia/objectes_globals/error/linenumber/index.html +++ b/files/ca/web/javascript/reference/global_objects/error/linenumber/index.html diff --git a/files/ca/web/javascript/referencia/objectes_globals/error/message/index.html b/files/ca/web/javascript/reference/global_objects/error/message/index.html index 4aa07268fa..4aa07268fa 100644 --- a/files/ca/web/javascript/referencia/objectes_globals/error/message/index.html +++ b/files/ca/web/javascript/reference/global_objects/error/message/index.html diff --git a/files/ca/web/javascript/referencia/objectes_globals/error/name/index.html b/files/ca/web/javascript/reference/global_objects/error/name/index.html index 995ecafd5f..995ecafd5f 100644 --- a/files/ca/web/javascript/referencia/objectes_globals/error/name/index.html +++ b/files/ca/web/javascript/reference/global_objects/error/name/index.html diff --git a/files/ca/web/javascript/referencia/objectes_globals/error/stack/index.html b/files/ca/web/javascript/reference/global_objects/error/stack/index.html index aa41949423..aa41949423 100644 --- a/files/ca/web/javascript/referencia/objectes_globals/error/stack/index.html +++ b/files/ca/web/javascript/reference/global_objects/error/stack/index.html diff --git a/files/ca/web/javascript/referencia/objectes_globals/error/tosource/index.html b/files/ca/web/javascript/reference/global_objects/error/tosource/index.html index c766aa312b..c766aa312b 100644 --- a/files/ca/web/javascript/referencia/objectes_globals/error/tosource/index.html +++ b/files/ca/web/javascript/reference/global_objects/error/tosource/index.html diff --git a/files/ca/web/javascript/referencia/objectes_globals/error/tostring/index.html b/files/ca/web/javascript/reference/global_objects/error/tostring/index.html index 79fd20f77f..79fd20f77f 100644 --- a/files/ca/web/javascript/referencia/objectes_globals/error/tostring/index.html +++ b/files/ca/web/javascript/reference/global_objects/error/tostring/index.html diff --git a/files/ca/web/javascript/reference/global_objects/evalerror/prototype/index.html b/files/ca/web/javascript/reference/global_objects/evalerror/prototype/index.html deleted file mode 100644 index 5f83d25a6f..0000000000 --- a/files/ca/web/javascript/reference/global_objects/evalerror/prototype/index.html +++ /dev/null @@ -1,124 +0,0 @@ ---- -title: EvalError.prototype -slug: Web/JavaScript/Reference/Global_Objects/EvalError/prototype -translation_of: Web/JavaScript/Reference/Global_Objects/EvalError -translation_of_original: Web/JavaScript/Reference/Global_Objects/EvalError/prototype ---- -<div>{{JSRef}}</div> - -<p>La propietat <code><strong>EvalError.prototype</strong></code> representa el prototip del constructor {{jsxref("EvalError")}}.</p> - -<div>{{js_property_attributes(0, 0, 0)}}</div> - -<h2 id="Descripció">Descripció</h2> - -<p>Totes les instàncies {{jsxref("EvalError")}} hereten de <code>EvalError.prototype</code>. Es pot utilitzar el prototip per afegir propietats o mètodes a totes les instàncies.</p> - -<h2 id="Propietats">Propietats</h2> - -<dl> - <dt><code>EvalError.prototype.constructor</code></dt> - <dd>Especifica la funció que ha creat el prototip d'una instància.</dd> - <dt>{{jsxref("Error.prototype.message", "EvalError.prototype.message")}}</dt> - <dd>Missatge d'error. Tot i que l'ECMA-262 especifica que {{jsxref("EvalError")}} hauria de proveir la seva pròpia propietat <code>message</code>, en <a href="/en-US/docs/Mozilla/Projects/SpiderMonkey">SpiderMonkey</a>, hereta {{jsxref("Error.prototype.message")}}.</dd> - <dt>{{jsxref("Error.prototype.name", "EvalError.prototype.name")}}</dt> - <dd>Nom de l'error. Heretat de {{jsxref("Error")}}.</dd> - <dt>{{jsxref("Error.prototype.fileName", "EvalError.prototype.fileName")}}</dt> - <dd>Camí cap al fitxer que ha llançat aquest error. Heretat de {{jsxref("Error")}}.</dd> - <dt>{{jsxref("Error.prototype.lineNumber", "EvalError.prototype.lineNumber")}}</dt> - <dd>Número de línia en el fitxer que ha llançat aquest error. Heretat de {{jsxref("Error")}}.</dd> - <dt>{{jsxref("Error.prototype.columnNumber", "EvalError.prototype.columnNumber")}}</dt> - <dd>Número de columna en la línia que ha llançat aquest error. Heretat de {{jsxref("Error")}}.</dd> - <dt>{{jsxref("Error.prototype.stack", "EvalError.prototype.stack")}}</dt> - <dd>Traça de l'error. Heretat de {{jsxref("Error")}}.</dd> -</dl> - -<h2 id="Mètodes">Mètodes</h2> - -<p>Tot i que l'objecte prototip {{jsxref("EvalError")}} no contè cap mètode en si mateix, les instàncies {{jsxref("EvalError")}} hereten alguns mètodes a través de la cadena prototip.</p> - -<h2 id="Especificacions">Especificacions</h2> - -<table class="standard-table"> - <tbody> - <tr> - <th scope="col">Especificació</th> - <th scope="col">Estat</th> - <th scope="col">Comentaris</th> - </tr> - <tr> - <td>{{SpecName('ES3')}}</td> - <td>{{Spec2('ES3')}}</td> - <td>Definició inicial</td> - </tr> - <tr> - <td>{{SpecName('ES5.1', '#sec-15.11.7.6', 'NativeError.prototype')}}</td> - <td>{{Spec2('ES5.1')}}</td> - <td>Definit com a <code><em>NativeError</em>.prototype</code>.</td> - </tr> - <tr> - <td>{{SpecName('ES6', '#sec-nativeerror.prototype', 'NativeError.prototype')}}</td> - <td>{{Spec2('ES6')}}</td> - <td>Definit com a <code><em>NativeError</em>.prototype</code>.</td> - </tr> - </tbody> -</table> - -<h2 id="Compatibilitat_amb_navegadors">Compatibilitat amb navegadors</h2> - -<div>{{CompatibilityTable}}</div> - -<div id="compat-desktop"> -<table class="compat-table"> - <tbody> - <tr> - <th>Característica</th> - <th>Chrome</th> - <th>Firefox (Gecko)</th> - <th>Internet Explorer</th> - <th>Opera</th> - <th>Safari</th> - </tr> - <tr> - <td>Suport bàsic</td> - <td>{{CompatVersionUnknown}}</td> - <td>{{CompatVersionUnknown}}</td> - <td>{{CompatVersionUnknown}}</td> - <td>{{CompatVersionUnknown}}</td> - <td>{{CompatVersionUnknown}}</td> - </tr> - </tbody> -</table> -</div> - -<div id="compat-mobile"> -<table class="compat-table"> - <tbody> - <tr> - <th>Característica</th> - <th>Android</th> - <th>Chrome per Android</th> - <th>Firefox Mobile (Gecko)</th> - <th>IE Mobile</th> - <th>Opera Mobile</th> - <th>Safari Mobile</th> - </tr> - <tr> - <td>Suport bàsic</td> - <td>{{CompatVersionUnknown}}</td> - <td>{{CompatVersionUnknown}}</td> - <td>{{CompatVersionUnknown}}</td> - <td>{{CompatVersionUnknown}}</td> - <td>{{CompatVersionUnknown}}</td> - <td>{{CompatVersionUnknown}}</td> - </tr> - </tbody> -</table> -</div> - -<h2 id="Vegeu_també">Vegeu també</h2> - -<ul> - <li>{{jsxref("Error.prototype")}}</li> - <li>{{jsxref("Function.prototype")}}</li> -</ul> diff --git a/files/ca/web/javascript/referencia/objectes_globals/index.html b/files/ca/web/javascript/reference/global_objects/index.html index 60bd0333f7..60bd0333f7 100644 --- a/files/ca/web/javascript/referencia/objectes_globals/index.html +++ b/files/ca/web/javascript/reference/global_objects/index.html diff --git a/files/ca/web/javascript/referencia/objectes_globals/infinity/index.html b/files/ca/web/javascript/reference/global_objects/infinity/index.html index 409609bfd2..409609bfd2 100644 --- a/files/ca/web/javascript/referencia/objectes_globals/infinity/index.html +++ b/files/ca/web/javascript/reference/global_objects/infinity/index.html diff --git a/files/ca/web/javascript/referencia/objectes_globals/json/index.html b/files/ca/web/javascript/reference/global_objects/json/index.html index efc86409e6..efc86409e6 100644 --- a/files/ca/web/javascript/referencia/objectes_globals/json/index.html +++ b/files/ca/web/javascript/reference/global_objects/json/index.html diff --git a/files/ca/web/javascript/referencia/objectes_globals/map/clear/index.html b/files/ca/web/javascript/reference/global_objects/map/clear/index.html index f29cc93eef..f29cc93eef 100644 --- a/files/ca/web/javascript/referencia/objectes_globals/map/clear/index.html +++ b/files/ca/web/javascript/reference/global_objects/map/clear/index.html diff --git a/files/ca/web/javascript/referencia/objectes_globals/map/delete/index.html b/files/ca/web/javascript/reference/global_objects/map/delete/index.html index 01c1b2cf28..01c1b2cf28 100644 --- a/files/ca/web/javascript/referencia/objectes_globals/map/delete/index.html +++ b/files/ca/web/javascript/reference/global_objects/map/delete/index.html diff --git a/files/ca/web/javascript/referencia/objectes_globals/map/entries/index.html b/files/ca/web/javascript/reference/global_objects/map/entries/index.html index d5f6942695..d5f6942695 100644 --- a/files/ca/web/javascript/referencia/objectes_globals/map/entries/index.html +++ b/files/ca/web/javascript/reference/global_objects/map/entries/index.html diff --git a/files/ca/web/javascript/referencia/objectes_globals/map/foreach/index.html b/files/ca/web/javascript/reference/global_objects/map/foreach/index.html index 7097bbee3d..7097bbee3d 100644 --- a/files/ca/web/javascript/referencia/objectes_globals/map/foreach/index.html +++ b/files/ca/web/javascript/reference/global_objects/map/foreach/index.html diff --git a/files/ca/web/javascript/referencia/objectes_globals/map/get/index.html b/files/ca/web/javascript/reference/global_objects/map/get/index.html index ec345df059..ec345df059 100644 --- a/files/ca/web/javascript/referencia/objectes_globals/map/get/index.html +++ b/files/ca/web/javascript/reference/global_objects/map/get/index.html diff --git a/files/ca/web/javascript/referencia/objectes_globals/map/has/index.html b/files/ca/web/javascript/reference/global_objects/map/has/index.html index d0ce1bec54..d0ce1bec54 100644 --- a/files/ca/web/javascript/referencia/objectes_globals/map/has/index.html +++ b/files/ca/web/javascript/reference/global_objects/map/has/index.html diff --git a/files/ca/web/javascript/referencia/objectes_globals/map/index.html b/files/ca/web/javascript/reference/global_objects/map/index.html index 8e2bb647bd..8e2bb647bd 100644 --- a/files/ca/web/javascript/referencia/objectes_globals/map/index.html +++ b/files/ca/web/javascript/reference/global_objects/map/index.html diff --git a/files/ca/web/javascript/referencia/objectes_globals/map/keys/index.html b/files/ca/web/javascript/reference/global_objects/map/keys/index.html index 47c975a891..47c975a891 100644 --- a/files/ca/web/javascript/referencia/objectes_globals/map/keys/index.html +++ b/files/ca/web/javascript/reference/global_objects/map/keys/index.html diff --git a/files/ca/web/javascript/referencia/objectes_globals/map/set/index.html b/files/ca/web/javascript/reference/global_objects/map/set/index.html index 3b77060831..3b77060831 100644 --- a/files/ca/web/javascript/referencia/objectes_globals/map/set/index.html +++ b/files/ca/web/javascript/reference/global_objects/map/set/index.html diff --git a/files/ca/web/javascript/referencia/objectes_globals/map/size/index.html b/files/ca/web/javascript/reference/global_objects/map/size/index.html index aa70c7d84b..aa70c7d84b 100644 --- a/files/ca/web/javascript/referencia/objectes_globals/map/size/index.html +++ b/files/ca/web/javascript/reference/global_objects/map/size/index.html diff --git a/files/ca/web/javascript/referencia/objectes_globals/map/values/index.html b/files/ca/web/javascript/reference/global_objects/map/values/index.html index f1b23be7e7..f1b23be7e7 100644 --- a/files/ca/web/javascript/referencia/objectes_globals/map/values/index.html +++ b/files/ca/web/javascript/reference/global_objects/map/values/index.html diff --git a/files/ca/web/javascript/referencia/objectes_globals/math/abs/index.html b/files/ca/web/javascript/reference/global_objects/math/abs/index.html index 34d3e5beb9..34d3e5beb9 100644 --- a/files/ca/web/javascript/referencia/objectes_globals/math/abs/index.html +++ b/files/ca/web/javascript/reference/global_objects/math/abs/index.html diff --git a/files/ca/web/javascript/referencia/objectes_globals/math/acos/index.html b/files/ca/web/javascript/reference/global_objects/math/acos/index.html index fdf781a4e2..fdf781a4e2 100644 --- a/files/ca/web/javascript/referencia/objectes_globals/math/acos/index.html +++ b/files/ca/web/javascript/reference/global_objects/math/acos/index.html diff --git a/files/ca/web/javascript/referencia/objectes_globals/math/acosh/index.html b/files/ca/web/javascript/reference/global_objects/math/acosh/index.html index edfe1dd8c0..edfe1dd8c0 100644 --- a/files/ca/web/javascript/referencia/objectes_globals/math/acosh/index.html +++ b/files/ca/web/javascript/reference/global_objects/math/acosh/index.html diff --git a/files/ca/web/javascript/referencia/objectes_globals/math/asin/index.html b/files/ca/web/javascript/reference/global_objects/math/asin/index.html index 81288af5b6..81288af5b6 100644 --- a/files/ca/web/javascript/referencia/objectes_globals/math/asin/index.html +++ b/files/ca/web/javascript/reference/global_objects/math/asin/index.html diff --git a/files/ca/web/javascript/referencia/objectes_globals/math/asinh/index.html b/files/ca/web/javascript/reference/global_objects/math/asinh/index.html index 9a249bb202..9a249bb202 100644 --- a/files/ca/web/javascript/referencia/objectes_globals/math/asinh/index.html +++ b/files/ca/web/javascript/reference/global_objects/math/asinh/index.html diff --git a/files/ca/web/javascript/referencia/objectes_globals/math/atan/index.html b/files/ca/web/javascript/reference/global_objects/math/atan/index.html index 034578fd54..034578fd54 100644 --- a/files/ca/web/javascript/referencia/objectes_globals/math/atan/index.html +++ b/files/ca/web/javascript/reference/global_objects/math/atan/index.html diff --git a/files/ca/web/javascript/referencia/objectes_globals/math/atan2/index.html b/files/ca/web/javascript/reference/global_objects/math/atan2/index.html index 2816bb40b8..2816bb40b8 100644 --- a/files/ca/web/javascript/referencia/objectes_globals/math/atan2/index.html +++ b/files/ca/web/javascript/reference/global_objects/math/atan2/index.html diff --git a/files/ca/web/javascript/referencia/objectes_globals/math/atanh/index.html b/files/ca/web/javascript/reference/global_objects/math/atanh/index.html index 8a6b7cc2c8..8a6b7cc2c8 100644 --- a/files/ca/web/javascript/referencia/objectes_globals/math/atanh/index.html +++ b/files/ca/web/javascript/reference/global_objects/math/atanh/index.html diff --git a/files/ca/web/javascript/referencia/objectes_globals/math/cbrt/index.html b/files/ca/web/javascript/reference/global_objects/math/cbrt/index.html index 70d6767183..70d6767183 100644 --- a/files/ca/web/javascript/referencia/objectes_globals/math/cbrt/index.html +++ b/files/ca/web/javascript/reference/global_objects/math/cbrt/index.html diff --git a/files/ca/web/javascript/referencia/objectes_globals/math/ceil/index.html b/files/ca/web/javascript/reference/global_objects/math/ceil/index.html index a96880eecd..a96880eecd 100644 --- a/files/ca/web/javascript/referencia/objectes_globals/math/ceil/index.html +++ b/files/ca/web/javascript/reference/global_objects/math/ceil/index.html diff --git a/files/ca/web/javascript/referencia/objectes_globals/math/clz32/index.html b/files/ca/web/javascript/reference/global_objects/math/clz32/index.html index 5cde08c7a8..5cde08c7a8 100644 --- a/files/ca/web/javascript/referencia/objectes_globals/math/clz32/index.html +++ b/files/ca/web/javascript/reference/global_objects/math/clz32/index.html diff --git a/files/ca/web/javascript/referencia/objectes_globals/math/cos/index.html b/files/ca/web/javascript/reference/global_objects/math/cos/index.html index 0236b38c9c..0236b38c9c 100644 --- a/files/ca/web/javascript/referencia/objectes_globals/math/cos/index.html +++ b/files/ca/web/javascript/reference/global_objects/math/cos/index.html diff --git a/files/ca/web/javascript/referencia/objectes_globals/math/cosh/index.html b/files/ca/web/javascript/reference/global_objects/math/cosh/index.html index 00ebc259b9..00ebc259b9 100644 --- a/files/ca/web/javascript/referencia/objectes_globals/math/cosh/index.html +++ b/files/ca/web/javascript/reference/global_objects/math/cosh/index.html diff --git a/files/ca/web/javascript/referencia/objectes_globals/math/e/index.html b/files/ca/web/javascript/reference/global_objects/math/e/index.html index efe7476396..efe7476396 100644 --- a/files/ca/web/javascript/referencia/objectes_globals/math/e/index.html +++ b/files/ca/web/javascript/reference/global_objects/math/e/index.html diff --git a/files/ca/web/javascript/referencia/objectes_globals/math/exp/index.html b/files/ca/web/javascript/reference/global_objects/math/exp/index.html index c6d6c6c098..c6d6c6c098 100644 --- a/files/ca/web/javascript/referencia/objectes_globals/math/exp/index.html +++ b/files/ca/web/javascript/reference/global_objects/math/exp/index.html diff --git a/files/ca/web/javascript/referencia/objectes_globals/math/expm1/index.html b/files/ca/web/javascript/reference/global_objects/math/expm1/index.html index b8055fba45..b8055fba45 100644 --- a/files/ca/web/javascript/referencia/objectes_globals/math/expm1/index.html +++ b/files/ca/web/javascript/reference/global_objects/math/expm1/index.html diff --git a/files/ca/web/javascript/referencia/objectes_globals/math/floor/index.html b/files/ca/web/javascript/reference/global_objects/math/floor/index.html index 4a83b8d0e8..4a83b8d0e8 100644 --- a/files/ca/web/javascript/referencia/objectes_globals/math/floor/index.html +++ b/files/ca/web/javascript/reference/global_objects/math/floor/index.html diff --git a/files/ca/web/javascript/referencia/objectes_globals/math/fround/index.html b/files/ca/web/javascript/reference/global_objects/math/fround/index.html index 7411993dbc..7411993dbc 100644 --- a/files/ca/web/javascript/referencia/objectes_globals/math/fround/index.html +++ b/files/ca/web/javascript/reference/global_objects/math/fround/index.html diff --git a/files/ca/web/javascript/referencia/objectes_globals/math/hypot/index.html b/files/ca/web/javascript/reference/global_objects/math/hypot/index.html index e29bb754f1..e29bb754f1 100644 --- a/files/ca/web/javascript/referencia/objectes_globals/math/hypot/index.html +++ b/files/ca/web/javascript/reference/global_objects/math/hypot/index.html diff --git a/files/ca/web/javascript/referencia/objectes_globals/math/imul/index.html b/files/ca/web/javascript/reference/global_objects/math/imul/index.html index 53050a9cd6..53050a9cd6 100644 --- a/files/ca/web/javascript/referencia/objectes_globals/math/imul/index.html +++ b/files/ca/web/javascript/reference/global_objects/math/imul/index.html diff --git a/files/ca/web/javascript/referencia/objectes_globals/math/index.html b/files/ca/web/javascript/reference/global_objects/math/index.html index d493f51b40..d493f51b40 100644 --- a/files/ca/web/javascript/referencia/objectes_globals/math/index.html +++ b/files/ca/web/javascript/reference/global_objects/math/index.html diff --git a/files/ca/web/javascript/referencia/objectes_globals/math/ln10/index.html b/files/ca/web/javascript/reference/global_objects/math/ln10/index.html index 42107c85f5..42107c85f5 100644 --- a/files/ca/web/javascript/referencia/objectes_globals/math/ln10/index.html +++ b/files/ca/web/javascript/reference/global_objects/math/ln10/index.html diff --git a/files/ca/web/javascript/referencia/objectes_globals/math/ln2/index.html b/files/ca/web/javascript/reference/global_objects/math/ln2/index.html index 92cf2693f2..92cf2693f2 100644 --- a/files/ca/web/javascript/referencia/objectes_globals/math/ln2/index.html +++ b/files/ca/web/javascript/reference/global_objects/math/ln2/index.html diff --git a/files/ca/web/javascript/referencia/objectes_globals/math/log/index.html b/files/ca/web/javascript/reference/global_objects/math/log/index.html index a3d8467ae5..a3d8467ae5 100644 --- a/files/ca/web/javascript/referencia/objectes_globals/math/log/index.html +++ b/files/ca/web/javascript/reference/global_objects/math/log/index.html diff --git a/files/ca/web/javascript/referencia/objectes_globals/math/log10/index.html b/files/ca/web/javascript/reference/global_objects/math/log10/index.html index 1a82f34848..1a82f34848 100644 --- a/files/ca/web/javascript/referencia/objectes_globals/math/log10/index.html +++ b/files/ca/web/javascript/reference/global_objects/math/log10/index.html diff --git a/files/ca/web/javascript/referencia/objectes_globals/math/log10e/index.html b/files/ca/web/javascript/reference/global_objects/math/log10e/index.html index 299c8d12ed..299c8d12ed 100644 --- a/files/ca/web/javascript/referencia/objectes_globals/math/log10e/index.html +++ b/files/ca/web/javascript/reference/global_objects/math/log10e/index.html diff --git a/files/ca/web/javascript/referencia/objectes_globals/math/log1p/index.html b/files/ca/web/javascript/reference/global_objects/math/log1p/index.html index 1a0eb32cd5..1a0eb32cd5 100644 --- a/files/ca/web/javascript/referencia/objectes_globals/math/log1p/index.html +++ b/files/ca/web/javascript/reference/global_objects/math/log1p/index.html diff --git a/files/ca/web/javascript/referencia/objectes_globals/math/log2/index.html b/files/ca/web/javascript/reference/global_objects/math/log2/index.html index 0806bd75ff..0806bd75ff 100644 --- a/files/ca/web/javascript/referencia/objectes_globals/math/log2/index.html +++ b/files/ca/web/javascript/reference/global_objects/math/log2/index.html diff --git a/files/ca/web/javascript/referencia/objectes_globals/math/log2e/index.html b/files/ca/web/javascript/reference/global_objects/math/log2e/index.html index 2f37ae44c1..2f37ae44c1 100644 --- a/files/ca/web/javascript/referencia/objectes_globals/math/log2e/index.html +++ b/files/ca/web/javascript/reference/global_objects/math/log2e/index.html diff --git a/files/ca/web/javascript/referencia/objectes_globals/math/max/index.html b/files/ca/web/javascript/reference/global_objects/math/max/index.html index 791b5dfdfe..791b5dfdfe 100644 --- a/files/ca/web/javascript/referencia/objectes_globals/math/max/index.html +++ b/files/ca/web/javascript/reference/global_objects/math/max/index.html diff --git a/files/ca/web/javascript/referencia/objectes_globals/math/min/index.html b/files/ca/web/javascript/reference/global_objects/math/min/index.html index 909e6ff2ee..909e6ff2ee 100644 --- a/files/ca/web/javascript/referencia/objectes_globals/math/min/index.html +++ b/files/ca/web/javascript/reference/global_objects/math/min/index.html diff --git a/files/ca/web/javascript/referencia/objectes_globals/math/pi/index.html b/files/ca/web/javascript/reference/global_objects/math/pi/index.html index b867c953df..b867c953df 100644 --- a/files/ca/web/javascript/referencia/objectes_globals/math/pi/index.html +++ b/files/ca/web/javascript/reference/global_objects/math/pi/index.html diff --git a/files/ca/web/javascript/referencia/objectes_globals/math/pow/index.html b/files/ca/web/javascript/reference/global_objects/math/pow/index.html index efe89000e9..efe89000e9 100644 --- a/files/ca/web/javascript/referencia/objectes_globals/math/pow/index.html +++ b/files/ca/web/javascript/reference/global_objects/math/pow/index.html diff --git a/files/ca/web/javascript/referencia/objectes_globals/math/random/index.html b/files/ca/web/javascript/reference/global_objects/math/random/index.html index d70169efd4..d70169efd4 100644 --- a/files/ca/web/javascript/referencia/objectes_globals/math/random/index.html +++ b/files/ca/web/javascript/reference/global_objects/math/random/index.html diff --git a/files/ca/web/javascript/referencia/objectes_globals/math/round/index.html b/files/ca/web/javascript/reference/global_objects/math/round/index.html index 2510799381..2510799381 100644 --- a/files/ca/web/javascript/referencia/objectes_globals/math/round/index.html +++ b/files/ca/web/javascript/reference/global_objects/math/round/index.html diff --git a/files/ca/web/javascript/referencia/objectes_globals/math/sign/index.html b/files/ca/web/javascript/reference/global_objects/math/sign/index.html index 520ff27dc4..520ff27dc4 100644 --- a/files/ca/web/javascript/referencia/objectes_globals/math/sign/index.html +++ b/files/ca/web/javascript/reference/global_objects/math/sign/index.html diff --git a/files/ca/web/javascript/referencia/objectes_globals/math/sin/index.html b/files/ca/web/javascript/reference/global_objects/math/sin/index.html index 7f1faf9a98..7f1faf9a98 100644 --- a/files/ca/web/javascript/referencia/objectes_globals/math/sin/index.html +++ b/files/ca/web/javascript/reference/global_objects/math/sin/index.html diff --git a/files/ca/web/javascript/referencia/objectes_globals/math/sinh/index.html b/files/ca/web/javascript/reference/global_objects/math/sinh/index.html index a1cc1f446a..a1cc1f446a 100644 --- a/files/ca/web/javascript/referencia/objectes_globals/math/sinh/index.html +++ b/files/ca/web/javascript/reference/global_objects/math/sinh/index.html diff --git a/files/ca/web/javascript/referencia/objectes_globals/math/sqrt/index.html b/files/ca/web/javascript/reference/global_objects/math/sqrt/index.html index b726db8a31..b726db8a31 100644 --- a/files/ca/web/javascript/referencia/objectes_globals/math/sqrt/index.html +++ b/files/ca/web/javascript/reference/global_objects/math/sqrt/index.html diff --git a/files/ca/web/javascript/referencia/objectes_globals/math/sqrt1_2/index.html b/files/ca/web/javascript/reference/global_objects/math/sqrt1_2/index.html index 3d7d3a1370..3d7d3a1370 100644 --- a/files/ca/web/javascript/referencia/objectes_globals/math/sqrt1_2/index.html +++ b/files/ca/web/javascript/reference/global_objects/math/sqrt1_2/index.html diff --git a/files/ca/web/javascript/referencia/objectes_globals/math/sqrt2/index.html b/files/ca/web/javascript/reference/global_objects/math/sqrt2/index.html index 3d049f228c..3d049f228c 100644 --- a/files/ca/web/javascript/referencia/objectes_globals/math/sqrt2/index.html +++ b/files/ca/web/javascript/reference/global_objects/math/sqrt2/index.html diff --git a/files/ca/web/javascript/referencia/objectes_globals/math/tan/index.html b/files/ca/web/javascript/reference/global_objects/math/tan/index.html index 590e1f5fc8..590e1f5fc8 100644 --- a/files/ca/web/javascript/referencia/objectes_globals/math/tan/index.html +++ b/files/ca/web/javascript/reference/global_objects/math/tan/index.html diff --git a/files/ca/web/javascript/referencia/objectes_globals/math/tanh/index.html b/files/ca/web/javascript/reference/global_objects/math/tanh/index.html index ada19d17e0..ada19d17e0 100644 --- a/files/ca/web/javascript/referencia/objectes_globals/math/tanh/index.html +++ b/files/ca/web/javascript/reference/global_objects/math/tanh/index.html diff --git a/files/ca/web/javascript/referencia/objectes_globals/math/trunc/index.html b/files/ca/web/javascript/reference/global_objects/math/trunc/index.html index 4f76502d69..4f76502d69 100644 --- a/files/ca/web/javascript/referencia/objectes_globals/math/trunc/index.html +++ b/files/ca/web/javascript/reference/global_objects/math/trunc/index.html diff --git a/files/ca/web/javascript/referencia/objectes_globals/nan/index.html b/files/ca/web/javascript/reference/global_objects/nan/index.html index 1d6f4a4dc8..1d6f4a4dc8 100644 --- a/files/ca/web/javascript/referencia/objectes_globals/nan/index.html +++ b/files/ca/web/javascript/reference/global_objects/nan/index.html diff --git a/files/ca/web/javascript/referencia/objectes_globals/null/index.html b/files/ca/web/javascript/reference/global_objects/null/index.html index 97506ddeb5..97506ddeb5 100644 --- a/files/ca/web/javascript/referencia/objectes_globals/null/index.html +++ b/files/ca/web/javascript/reference/global_objects/null/index.html diff --git a/files/ca/web/javascript/referencia/objectes_globals/number/epsilon/index.html b/files/ca/web/javascript/reference/global_objects/number/epsilon/index.html index 5e3f602703..5e3f602703 100644 --- a/files/ca/web/javascript/referencia/objectes_globals/number/epsilon/index.html +++ b/files/ca/web/javascript/reference/global_objects/number/epsilon/index.html diff --git a/files/ca/web/javascript/referencia/objectes_globals/number/index.html b/files/ca/web/javascript/reference/global_objects/number/index.html index 5f4b7a0bb2..5f4b7a0bb2 100644 --- a/files/ca/web/javascript/referencia/objectes_globals/number/index.html +++ b/files/ca/web/javascript/reference/global_objects/number/index.html diff --git a/files/ca/web/javascript/referencia/objectes_globals/number/isfinite/index.html b/files/ca/web/javascript/reference/global_objects/number/isfinite/index.html index 21d9493bf8..21d9493bf8 100644 --- a/files/ca/web/javascript/referencia/objectes_globals/number/isfinite/index.html +++ b/files/ca/web/javascript/reference/global_objects/number/isfinite/index.html diff --git a/files/ca/web/javascript/referencia/objectes_globals/number/isinteger/index.html b/files/ca/web/javascript/reference/global_objects/number/isinteger/index.html index ee524e91c2..ee524e91c2 100644 --- a/files/ca/web/javascript/referencia/objectes_globals/number/isinteger/index.html +++ b/files/ca/web/javascript/reference/global_objects/number/isinteger/index.html diff --git a/files/ca/web/javascript/referencia/objectes_globals/number/isnan/index.html b/files/ca/web/javascript/reference/global_objects/number/isnan/index.html index f6ba247306..f6ba247306 100644 --- a/files/ca/web/javascript/referencia/objectes_globals/number/isnan/index.html +++ b/files/ca/web/javascript/reference/global_objects/number/isnan/index.html diff --git a/files/ca/web/javascript/referencia/objectes_globals/number/issafeinteger/index.html b/files/ca/web/javascript/reference/global_objects/number/issafeinteger/index.html index 7570e7289d..7570e7289d 100644 --- a/files/ca/web/javascript/referencia/objectes_globals/number/issafeinteger/index.html +++ b/files/ca/web/javascript/reference/global_objects/number/issafeinteger/index.html diff --git a/files/ca/web/javascript/referencia/objectes_globals/number/max_safe_integer/index.html b/files/ca/web/javascript/reference/global_objects/number/max_safe_integer/index.html index 02483b41ac..02483b41ac 100644 --- a/files/ca/web/javascript/referencia/objectes_globals/number/max_safe_integer/index.html +++ b/files/ca/web/javascript/reference/global_objects/number/max_safe_integer/index.html diff --git a/files/ca/web/javascript/referencia/objectes_globals/number/max_value/index.html b/files/ca/web/javascript/reference/global_objects/number/max_value/index.html index 453ad01c23..453ad01c23 100644 --- a/files/ca/web/javascript/referencia/objectes_globals/number/max_value/index.html +++ b/files/ca/web/javascript/reference/global_objects/number/max_value/index.html diff --git a/files/ca/web/javascript/referencia/objectes_globals/number/min_safe_integer/index.html b/files/ca/web/javascript/reference/global_objects/number/min_safe_integer/index.html index 861ec666ec..861ec666ec 100644 --- a/files/ca/web/javascript/referencia/objectes_globals/number/min_safe_integer/index.html +++ b/files/ca/web/javascript/reference/global_objects/number/min_safe_integer/index.html diff --git a/files/ca/web/javascript/referencia/objectes_globals/number/min_value/index.html b/files/ca/web/javascript/reference/global_objects/number/min_value/index.html index 42af185360..42af185360 100644 --- a/files/ca/web/javascript/referencia/objectes_globals/number/min_value/index.html +++ b/files/ca/web/javascript/reference/global_objects/number/min_value/index.html diff --git a/files/ca/web/javascript/referencia/objectes_globals/number/nan/index.html b/files/ca/web/javascript/reference/global_objects/number/nan/index.html index 7c6f3f1440..7c6f3f1440 100644 --- a/files/ca/web/javascript/referencia/objectes_globals/number/nan/index.html +++ b/files/ca/web/javascript/reference/global_objects/number/nan/index.html diff --git a/files/ca/web/javascript/referencia/objectes_globals/number/negative_infinity/index.html b/files/ca/web/javascript/reference/global_objects/number/negative_infinity/index.html index 3fb4c1d150..3fb4c1d150 100644 --- a/files/ca/web/javascript/referencia/objectes_globals/number/negative_infinity/index.html +++ b/files/ca/web/javascript/reference/global_objects/number/negative_infinity/index.html diff --git a/files/ca/web/javascript/referencia/objectes_globals/number/parsefloat/index.html b/files/ca/web/javascript/reference/global_objects/number/parsefloat/index.html index cd3494b7ac..cd3494b7ac 100644 --- a/files/ca/web/javascript/referencia/objectes_globals/number/parsefloat/index.html +++ b/files/ca/web/javascript/reference/global_objects/number/parsefloat/index.html diff --git a/files/ca/web/javascript/referencia/objectes_globals/number/parseint/index.html b/files/ca/web/javascript/reference/global_objects/number/parseint/index.html index 2ef9597d11..2ef9597d11 100644 --- a/files/ca/web/javascript/referencia/objectes_globals/number/parseint/index.html +++ b/files/ca/web/javascript/reference/global_objects/number/parseint/index.html diff --git a/files/ca/web/javascript/referencia/objectes_globals/number/positive_infinity/index.html b/files/ca/web/javascript/reference/global_objects/number/positive_infinity/index.html index 234a779fd1..234a779fd1 100644 --- a/files/ca/web/javascript/referencia/objectes_globals/number/positive_infinity/index.html +++ b/files/ca/web/javascript/reference/global_objects/number/positive_infinity/index.html diff --git a/files/ca/web/javascript/referencia/objectes_globals/number/toexponential/index.html b/files/ca/web/javascript/reference/global_objects/number/toexponential/index.html index 69ca3478ac..69ca3478ac 100644 --- a/files/ca/web/javascript/referencia/objectes_globals/number/toexponential/index.html +++ b/files/ca/web/javascript/reference/global_objects/number/toexponential/index.html diff --git a/files/ca/web/javascript/referencia/objectes_globals/number/tofixed/index.html b/files/ca/web/javascript/reference/global_objects/number/tofixed/index.html index 8df53aafe3..8df53aafe3 100644 --- a/files/ca/web/javascript/referencia/objectes_globals/number/tofixed/index.html +++ b/files/ca/web/javascript/reference/global_objects/number/tofixed/index.html diff --git a/files/ca/web/javascript/referencia/objectes_globals/number/toprecision/index.html b/files/ca/web/javascript/reference/global_objects/number/toprecision/index.html index 0af5875e7f..0af5875e7f 100644 --- a/files/ca/web/javascript/referencia/objectes_globals/number/toprecision/index.html +++ b/files/ca/web/javascript/reference/global_objects/number/toprecision/index.html diff --git a/files/ca/web/javascript/referencia/objectes_globals/number/tostring/index.html b/files/ca/web/javascript/reference/global_objects/number/tostring/index.html index 7381fc97ac..7381fc97ac 100644 --- a/files/ca/web/javascript/referencia/objectes_globals/number/tostring/index.html +++ b/files/ca/web/javascript/reference/global_objects/number/tostring/index.html diff --git a/files/ca/web/javascript/reference/global_objects/object/prototype/index.html b/files/ca/web/javascript/reference/global_objects/object/prototype/index.html deleted file mode 100644 index 9451ccfefe..0000000000 --- a/files/ca/web/javascript/reference/global_objects/object/prototype/index.html +++ /dev/null @@ -1,215 +0,0 @@ ---- -title: Object.prototype -slug: Web/JavaScript/Reference/Global_Objects/Object/prototype -translation_of: Web/JavaScript/Reference/Global_Objects/Object -translation_of_original: Web/JavaScript/Reference/Global_Objects/Object/prototype ---- -<div>{{JSRef}}</div> - -<p>La propietat <code><strong>Object.prototype</strong></code> representa el prototipus per a {{jsxref("Object")}}.</p> - -<div>{{js_property_attributes(0, 0, 0)}}</div> - -<h2 id="Descripció">Descripció</h2> - -<p>A JavaScript, tots els objectes hereten de {{jsxref("Object")}}; tots els objectes hereten els mètodes i propietats de <code>Object.prototype</code>, tot i que es poden sobreescriure (excepte un <code>Object</code> amb prototipus <code>null</code>, és a dir, <code>Object.create(null)</code>). Per exemple, altres prototipus de constructors sobreescriuen la propietat <code>constructor</code> i ofereixen els seus propis mètodes {{jsxref("Object.prototype.toString()", "toString()")}}. Els canvis al prototipus <code>Object</code> es propaguen a tots els objectes a no ser que les propietats i mètodes que reben aquests canvis hagin sigut sobreescrites més avall a la cadena de prototipus.</p> - -<h2 id="Propietats">Propietats</h2> - -<dl> - <dt>{{jsxref("Object.prototype.constructor")}}</dt> - <dd>Especifica la funció que ha creat el prototipus de l'objecte.</dd> - <dt>{{jsxref("Object.prototype.__proto__")}} {{non-standard_inline}}</dt> - <dd>Referencia l'objecte utilitzat com a prototipus quan aquest objecte va ser instanciat.</dd> - <dt>{{jsxref("Object.prototype.__noSuchMethod__")}} {{non-standard_inline}}</dt> - <dd>Permet definir una funció que serà executada quan es cridi com mètode un membre no definit.</dd> - <dt><s class="obsoleteElement">{{jsxref("Object.prototype.__count__")}} {{obsolete_inline}}</s></dt> - <dd><s class="obsoleteElement">Retornava el nombre de propietats enumerables que hi hagués a un objecte definit per l'usuari. S'ha eliminat.</s></dd> - <dt><s class="obsoleteElement">{{jsxref("Object.prototype.__parent__")}} {{obsolete_inline}}</s></dt> - <dd><s class="obsoleteElement">Referenciava el context d'un objecte. S'ha eliminat.</s></dd> -</dl> - -<h2 id="Mètodes">Mètodes</h2> - -<dl> - <dt>{{jsxref("Object.prototype.__defineGetter__()")}} {{non-standard_inline}} {{deprecated_inline}}</dt> - <dd>Associa una funció a una propietat que, quan s'accedeix, executa aquesta funció i retorna el seu valor.</dd> - <dt>{{jsxref("Object.prototype.__defineSetter__()")}} {{non-standard_inline}} {{deprecated_inline}}</dt> - <dd>Associa una funció a una propietat que, quan s'assigna, executa aquesta funció que modifica la propietat.</dd> - <dt>{{jsxref("Object.prototype.__lookupGetter__()")}} {{non-standard_inline}} {{deprecated_inline}}</dt> - <dd>Retorna una funció associada a la propietat especificada pel mètode {{jsxref("Object.defineGetter", "__defineGetter__")}}.</dd> - <dt>{{jsxref("Object.prototype.__lookupSetter__()")}} {{non-standard_inline}} {{deprecated_inline}}</dt> - <dd>Retorna a funció associada a la propietat especificada pel mètode {{jsxref("Object.defineSetter", "__defineSetter__")}}.</dd> - <dt>{{jsxref("Object.prototype.hasOwnProperty()")}}</dt> - <dd>Retorna un booleà que indica si l'objecte conté la propietat especificada com una propietat pròpia d'ell mateix en comptes d'heretar-la a través de la cadena de prototipus.</dd> - <dt>{{jsxref("Object.prototype.isPrototypeOf()")}}</dt> - <dd>Retorna un booleà que indica si l'objecte espeicfifcat pertany a la cadena de prototipus de l'objecte sobre el que es crida aquest mètode.</dd> - <dt>{{jsxref("Object.prototype.propertyIsEnumerable()")}}</dt> - <dd>Retorna un booleà que indica si està activat l'atribut intern <a href="/en-US/docs/ECMAScript_DontEnum_attribute" title="ECMAScript_DontEnum_attribute">DontEnum de l'ECMAScript</a>.</dd> - <dt>{{jsxref("Object.prototype.toSource()")}} {{non-standard_inline}}</dt> - <dd>Retorna un string que conté cofi font que defineix un literal d'objecte que representa l'objecte sobre el que s'executa aquest mètode; aquest valor pot utilitzar-se per a crear un nou objecte.</dd> - <dt>{{jsxref("Object.prototype.toLocaleString()")}}</dt> - <dd>Crida el mètode {{jsxref("Object.toString", "toString()")}}.</dd> - <dt>{{jsxref("Object.prototype.toString()")}}</dt> - <dd>Retorna una representació d'aquest objecte en forma de string.</dd> - <dt>{{jsxref("Object.prototype.unwatch()")}} {{non-standard_inline}}</dt> - <dd>Esborra un <em>watchpoint</em> d'una propietat de l'objecte.</dd> - <dt>{{jsxref("Object.prototype.valueOf()")}}</dt> - <dd>Retorna el valor primitiu de l'objecte especificat.</dd> - <dt>{{jsxref("Object.prototype.watch()")}} {{non-standard_inline}}</dt> - <dd>Afegeix un <em>watchpoint</em> a una propietat de l'objecte.</dd> - <dt><s class="obsoleteElement">{{jsxref("Object.prototype.eval()")}} {{obsolete_inline}}</s></dt> - <dd><s class="obsoleteElement">Evaluava un string de codi font JavaScript dins el context de l'objecte especificat. S'ha eliminat.</s></dd> -</dl> - -<h2 id="Exemples">Exemples</h2> - -<p>Degut a que JavaScript no res semblant a subclasses d'objectes, la propietat <code>prototype</code> és una bona forma d'utilitzar algunes funcions que fan d'objectes com a "classe base". Per exemple:</p> - -<pre class="brush: js">var Person = function() { - this.canTalk = true; -}; - -Person.prototype.greet = function() { - if (this.canTalk) { - console.log('Hi, I am ' + this.name); - } -}; - -var Employee = function(name, title) { - Person.call(this); - this.name = name; - this.title = title; -}; - -Employee.prototype = Object.create(Person.prototype); -Employee.prototype.constructor = Employee; - -Employee.prototype.greet = function() { - if (this.canTalk) { - console.log('Hi, I am ' + this.name + ', the ' + this.title); - } -}; - -var Customer = function(name) { - Person.call(this); - this.name = name; -}; - -Customer.prototype = Object.create(Person.prototype); -Customer.prototype.constructor = Customer; - -var Mime = function(name) { - Person.call(this); - this.name = name; - this.canTalk = false; -}; - -Mime.prototype = Object.create(Person.prototype); -Mime.prototype.constructor = Mime; - -var bob = new Employee('Bob', 'Builder'); -var joe = new Customer('Joe'); -var rg = new Employee('Red Green', 'Handyman'); -var mike = new Customer('Mike'); -var mime = new Mime('Mime'); - -bob.greet(); -// Hi, I am Bob, the Builder - -joe.greet(); -// Hi, I am Joe - -rg.greet(); -// Hi, I am Red Green, the Handyman - -mike.greet(); -// Hi, I am Mike - -mime.greet(); -</pre> - -<h2 id="Especificacions">Especificacions</h2> - -<table class="standard-table"> - <tbody> - <tr> - <th scope="col">Especificació</th> - <th scope="col">Estat</th> - <th scope="col">Comentaris</th> - </tr> - <tr> - <td>{{SpecName('ES1')}}</td> - <td>{{Spec2('ES1')}}</td> - <td>Definició inicial. Implementat a JavaScript 1.0.</td> - </tr> - <tr> - <td>{{SpecName('ES5.1', '#sec-15.2.3.1', 'Object.prototype')}}</td> - <td>{{Spec2('ES5.1')}}</td> - <td> </td> - </tr> - <tr> - <td>{{SpecName('ES6', '#sec-object.prototype', 'Object.prototype')}}</td> - <td>{{Spec2('ES6')}}</td> - <td> </td> - </tr> - </tbody> -</table> - -<h2 id="Compatibilitat_amb_navegadors">Compatibilitat amb navegadors</h2> - -<div>{{CompatibilityTable}}</div> - -<div id="compat-desktop"> -<table class="compat-table"> - <tbody> - <tr> - <th>Característica</th> - <th>Chrome</th> - <th>Firefox (Gecko)</th> - <th>Internet Explorer</th> - <th>Opera</th> - <th>Safari</th> - </tr> - <tr> - <td>Suport bàsic</td> - <td>{{CompatVersionUnknown}}</td> - <td>{{CompatVersionUnknown}}</td> - <td>{{CompatVersionUnknown}}</td> - <td>{{CompatVersionUnknown}}</td> - <td>{{CompatVersionUnknown}}</td> - </tr> - </tbody> -</table> -</div> - -<div id="compat-mobile"> -<table class="compat-table"> - <tbody> - <tr> - <th>Característica</th> - <th>Android</th> - <th>Chrome for Android</th> - <th>Firefox Mobile (Gecko)</th> - <th>IE Mobile</th> - <th>Opera Mobile</th> - <th>Safari Mobile</th> - </tr> - <tr> - <td>Suport bàsic</td> - <td>{{CompatVersionUnknown}}</td> - <td>{{CompatVersionUnknown}}</td> - <td>{{CompatVersionUnknown}}</td> - <td>{{CompatVersionUnknown}}</td> - <td>{{CompatVersionUnknown}}</td> - <td>{{CompatVersionUnknown}}</td> - </tr> - </tbody> -</table> -</div> - -<h2 id="Vegeu_també"> Vegeu també</h2> - -<ul> - <li><a href="/en-US/docs/Web/JavaScript/Introduction_to_Object-Oriented_JavaScript">Introducció al JavaScript orientat a objectes</a></li> -</ul> diff --git a/files/ca/web/javascript/referencia/objectes_globals/parsefloat/index.html b/files/ca/web/javascript/reference/global_objects/parsefloat/index.html index 570fa6b63f..570fa6b63f 100644 --- a/files/ca/web/javascript/referencia/objectes_globals/parsefloat/index.html +++ b/files/ca/web/javascript/reference/global_objects/parsefloat/index.html diff --git a/files/ca/web/javascript/referencia/objectes_globals/set/add/index.html b/files/ca/web/javascript/reference/global_objects/set/add/index.html index b93eaa3efb..b93eaa3efb 100644 --- a/files/ca/web/javascript/referencia/objectes_globals/set/add/index.html +++ b/files/ca/web/javascript/reference/global_objects/set/add/index.html diff --git a/files/ca/web/javascript/referencia/objectes_globals/set/clear/index.html b/files/ca/web/javascript/reference/global_objects/set/clear/index.html index 6ef179daaa..6ef179daaa 100644 --- a/files/ca/web/javascript/referencia/objectes_globals/set/clear/index.html +++ b/files/ca/web/javascript/reference/global_objects/set/clear/index.html diff --git a/files/ca/web/javascript/referencia/objectes_globals/set/delete/index.html b/files/ca/web/javascript/reference/global_objects/set/delete/index.html index ea66c1a723..ea66c1a723 100644 --- a/files/ca/web/javascript/referencia/objectes_globals/set/delete/index.html +++ b/files/ca/web/javascript/reference/global_objects/set/delete/index.html diff --git a/files/ca/web/javascript/referencia/objectes_globals/set/entries/index.html b/files/ca/web/javascript/reference/global_objects/set/entries/index.html index 848e53ba8d..848e53ba8d 100644 --- a/files/ca/web/javascript/referencia/objectes_globals/set/entries/index.html +++ b/files/ca/web/javascript/reference/global_objects/set/entries/index.html diff --git a/files/ca/web/javascript/referencia/objectes_globals/set/has/index.html b/files/ca/web/javascript/reference/global_objects/set/has/index.html index ca9027b8a4..ca9027b8a4 100644 --- a/files/ca/web/javascript/referencia/objectes_globals/set/has/index.html +++ b/files/ca/web/javascript/reference/global_objects/set/has/index.html diff --git a/files/ca/web/javascript/referencia/objectes_globals/set/index.html b/files/ca/web/javascript/reference/global_objects/set/index.html index 993d296324..993d296324 100644 --- a/files/ca/web/javascript/referencia/objectes_globals/set/index.html +++ b/files/ca/web/javascript/reference/global_objects/set/index.html diff --git a/files/ca/web/javascript/referencia/objectes_globals/set/values/index.html b/files/ca/web/javascript/reference/global_objects/set/values/index.html index 307fa78113..307fa78113 100644 --- a/files/ca/web/javascript/referencia/objectes_globals/set/values/index.html +++ b/files/ca/web/javascript/reference/global_objects/set/values/index.html diff --git a/files/ca/web/javascript/referencia/objectes_globals/string/anchor/index.html b/files/ca/web/javascript/reference/global_objects/string/anchor/index.html index 15bd4db97b..15bd4db97b 100644 --- a/files/ca/web/javascript/referencia/objectes_globals/string/anchor/index.html +++ b/files/ca/web/javascript/reference/global_objects/string/anchor/index.html diff --git a/files/ca/web/javascript/referencia/objectes_globals/string/big/index.html b/files/ca/web/javascript/reference/global_objects/string/big/index.html index a3b8815f10..a3b8815f10 100644 --- a/files/ca/web/javascript/referencia/objectes_globals/string/big/index.html +++ b/files/ca/web/javascript/reference/global_objects/string/big/index.html diff --git a/files/ca/web/javascript/referencia/objectes_globals/string/blink/index.html b/files/ca/web/javascript/reference/global_objects/string/blink/index.html index 2378325897..2378325897 100644 --- a/files/ca/web/javascript/referencia/objectes_globals/string/blink/index.html +++ b/files/ca/web/javascript/reference/global_objects/string/blink/index.html diff --git a/files/ca/web/javascript/referencia/objectes_globals/string/bold/index.html b/files/ca/web/javascript/reference/global_objects/string/bold/index.html index 502810bb45..502810bb45 100644 --- a/files/ca/web/javascript/referencia/objectes_globals/string/bold/index.html +++ b/files/ca/web/javascript/reference/global_objects/string/bold/index.html diff --git a/files/ca/web/javascript/referencia/objectes_globals/string/charat/index.html b/files/ca/web/javascript/reference/global_objects/string/charat/index.html index 55a84ab7d0..55a84ab7d0 100644 --- a/files/ca/web/javascript/referencia/objectes_globals/string/charat/index.html +++ b/files/ca/web/javascript/reference/global_objects/string/charat/index.html diff --git a/files/ca/web/javascript/referencia/objectes_globals/string/concat/index.html b/files/ca/web/javascript/reference/global_objects/string/concat/index.html index 87cdda3c5e..87cdda3c5e 100644 --- a/files/ca/web/javascript/referencia/objectes_globals/string/concat/index.html +++ b/files/ca/web/javascript/reference/global_objects/string/concat/index.html diff --git a/files/ca/web/javascript/referencia/objectes_globals/string/endswith/index.html b/files/ca/web/javascript/reference/global_objects/string/endswith/index.html index 83a1201549..83a1201549 100644 --- a/files/ca/web/javascript/referencia/objectes_globals/string/endswith/index.html +++ b/files/ca/web/javascript/reference/global_objects/string/endswith/index.html diff --git a/files/ca/web/javascript/referencia/objectes_globals/string/fixed/index.html b/files/ca/web/javascript/reference/global_objects/string/fixed/index.html index 069ab4243f..069ab4243f 100644 --- a/files/ca/web/javascript/referencia/objectes_globals/string/fixed/index.html +++ b/files/ca/web/javascript/reference/global_objects/string/fixed/index.html diff --git a/files/ca/web/javascript/referencia/objectes_globals/string/fontcolor/index.html b/files/ca/web/javascript/reference/global_objects/string/fontcolor/index.html index be52cd576b..be52cd576b 100644 --- a/files/ca/web/javascript/referencia/objectes_globals/string/fontcolor/index.html +++ b/files/ca/web/javascript/reference/global_objects/string/fontcolor/index.html diff --git a/files/ca/web/javascript/referencia/objectes_globals/string/fontsize/index.html b/files/ca/web/javascript/reference/global_objects/string/fontsize/index.html index 9f30d124aa..9f30d124aa 100644 --- a/files/ca/web/javascript/referencia/objectes_globals/string/fontsize/index.html +++ b/files/ca/web/javascript/reference/global_objects/string/fontsize/index.html diff --git a/files/ca/web/javascript/referencia/objectes_globals/string/fromcharcode/index.html b/files/ca/web/javascript/reference/global_objects/string/fromcharcode/index.html index f4e2308bf9..f4e2308bf9 100644 --- a/files/ca/web/javascript/referencia/objectes_globals/string/fromcharcode/index.html +++ b/files/ca/web/javascript/reference/global_objects/string/fromcharcode/index.html diff --git a/files/ca/web/javascript/referencia/objectes_globals/string/index.html b/files/ca/web/javascript/reference/global_objects/string/index.html index 136820a54d..136820a54d 100644 --- a/files/ca/web/javascript/referencia/objectes_globals/string/index.html +++ b/files/ca/web/javascript/reference/global_objects/string/index.html diff --git a/files/ca/web/javascript/referencia/objectes_globals/string/indexof/index.html b/files/ca/web/javascript/reference/global_objects/string/indexof/index.html index 9b08b04ded..9b08b04ded 100644 --- a/files/ca/web/javascript/referencia/objectes_globals/string/indexof/index.html +++ b/files/ca/web/javascript/reference/global_objects/string/indexof/index.html diff --git a/files/ca/web/javascript/referencia/objectes_globals/string/italics/index.html b/files/ca/web/javascript/reference/global_objects/string/italics/index.html index f38a8f9579..f38a8f9579 100644 --- a/files/ca/web/javascript/referencia/objectes_globals/string/italics/index.html +++ b/files/ca/web/javascript/reference/global_objects/string/italics/index.html diff --git a/files/ca/web/javascript/referencia/objectes_globals/string/length/index.html b/files/ca/web/javascript/reference/global_objects/string/length/index.html index 63a3114d2d..63a3114d2d 100644 --- a/files/ca/web/javascript/referencia/objectes_globals/string/length/index.html +++ b/files/ca/web/javascript/reference/global_objects/string/length/index.html diff --git a/files/ca/web/javascript/referencia/objectes_globals/string/link/index.html b/files/ca/web/javascript/reference/global_objects/string/link/index.html index efe1385ddc..efe1385ddc 100644 --- a/files/ca/web/javascript/referencia/objectes_globals/string/link/index.html +++ b/files/ca/web/javascript/reference/global_objects/string/link/index.html diff --git a/files/ca/web/javascript/referencia/objectes_globals/string/normalize/index.html b/files/ca/web/javascript/reference/global_objects/string/normalize/index.html index 7a6bcef500..7a6bcef500 100644 --- a/files/ca/web/javascript/referencia/objectes_globals/string/normalize/index.html +++ b/files/ca/web/javascript/reference/global_objects/string/normalize/index.html diff --git a/files/ca/web/javascript/referencia/objectes_globals/string/small/index.html b/files/ca/web/javascript/reference/global_objects/string/small/index.html index 761797bdda..761797bdda 100644 --- a/files/ca/web/javascript/referencia/objectes_globals/string/small/index.html +++ b/files/ca/web/javascript/reference/global_objects/string/small/index.html diff --git a/files/ca/web/javascript/referencia/objectes_globals/string/startswith/index.html b/files/ca/web/javascript/reference/global_objects/string/startswith/index.html index ca25398d51..ca25398d51 100644 --- a/files/ca/web/javascript/referencia/objectes_globals/string/startswith/index.html +++ b/files/ca/web/javascript/reference/global_objects/string/startswith/index.html diff --git a/files/ca/web/javascript/referencia/objectes_globals/string/sub/index.html b/files/ca/web/javascript/reference/global_objects/string/sub/index.html index 0b512d038e..0b512d038e 100644 --- a/files/ca/web/javascript/referencia/objectes_globals/string/sub/index.html +++ b/files/ca/web/javascript/reference/global_objects/string/sub/index.html diff --git a/files/ca/web/javascript/referencia/objectes_globals/string/substr/index.html b/files/ca/web/javascript/reference/global_objects/string/substr/index.html index 5fdb1f03b4..5fdb1f03b4 100644 --- a/files/ca/web/javascript/referencia/objectes_globals/string/substr/index.html +++ b/files/ca/web/javascript/reference/global_objects/string/substr/index.html diff --git a/files/ca/web/javascript/referencia/objectes_globals/string/sup/index.html b/files/ca/web/javascript/reference/global_objects/string/sup/index.html index 24b46c88ce..24b46c88ce 100644 --- a/files/ca/web/javascript/referencia/objectes_globals/string/sup/index.html +++ b/files/ca/web/javascript/reference/global_objects/string/sup/index.html diff --git a/files/ca/web/javascript/referencia/objectes_globals/string/tolocalelowercase/index.html b/files/ca/web/javascript/reference/global_objects/string/tolocalelowercase/index.html index c138197bc1..c138197bc1 100644 --- a/files/ca/web/javascript/referencia/objectes_globals/string/tolocalelowercase/index.html +++ b/files/ca/web/javascript/reference/global_objects/string/tolocalelowercase/index.html diff --git a/files/ca/web/javascript/referencia/objectes_globals/string/tolocaleuppercase/index.html b/files/ca/web/javascript/reference/global_objects/string/tolocaleuppercase/index.html index 8f7b2aa716..8f7b2aa716 100644 --- a/files/ca/web/javascript/referencia/objectes_globals/string/tolocaleuppercase/index.html +++ b/files/ca/web/javascript/reference/global_objects/string/tolocaleuppercase/index.html diff --git a/files/ca/web/javascript/referencia/objectes_globals/string/tolowercase/index.html b/files/ca/web/javascript/reference/global_objects/string/tolowercase/index.html index 7147d0ea0d..7147d0ea0d 100644 --- a/files/ca/web/javascript/referencia/objectes_globals/string/tolowercase/index.html +++ b/files/ca/web/javascript/reference/global_objects/string/tolowercase/index.html diff --git a/files/ca/web/javascript/referencia/objectes_globals/string/tostring/index.html b/files/ca/web/javascript/reference/global_objects/string/tostring/index.html index 11f2555a2f..11f2555a2f 100644 --- a/files/ca/web/javascript/referencia/objectes_globals/string/tostring/index.html +++ b/files/ca/web/javascript/reference/global_objects/string/tostring/index.html diff --git a/files/ca/web/javascript/referencia/objectes_globals/string/touppercase/index.html b/files/ca/web/javascript/reference/global_objects/string/touppercase/index.html index 2a3b4fe56a..2a3b4fe56a 100644 --- a/files/ca/web/javascript/referencia/objectes_globals/string/touppercase/index.html +++ b/files/ca/web/javascript/reference/global_objects/string/touppercase/index.html diff --git a/files/ca/web/javascript/referencia/objectes_globals/string/trim/index.html b/files/ca/web/javascript/reference/global_objects/string/trim/index.html index 2dd955ea62..2dd955ea62 100644 --- a/files/ca/web/javascript/referencia/objectes_globals/string/trim/index.html +++ b/files/ca/web/javascript/reference/global_objects/string/trim/index.html diff --git a/files/ca/web/javascript/referencia/objectes_globals/string/trimright/index.html b/files/ca/web/javascript/reference/global_objects/string/trimend/index.html index 41ab89e3ca..41ab89e3ca 100644 --- a/files/ca/web/javascript/referencia/objectes_globals/string/trimright/index.html +++ b/files/ca/web/javascript/reference/global_objects/string/trimend/index.html diff --git a/files/ca/web/javascript/referencia/objectes_globals/string/trimleft/index.html b/files/ca/web/javascript/reference/global_objects/string/trimstart/index.html index f16a5b89fa..f16a5b89fa 100644 --- a/files/ca/web/javascript/referencia/objectes_globals/string/trimleft/index.html +++ b/files/ca/web/javascript/reference/global_objects/string/trimstart/index.html diff --git a/files/ca/web/javascript/referencia/objectes_globals/syntaxerror/index.html b/files/ca/web/javascript/reference/global_objects/syntaxerror/index.html index 2ad16e006f..2ad16e006f 100644 --- a/files/ca/web/javascript/referencia/objectes_globals/syntaxerror/index.html +++ b/files/ca/web/javascript/reference/global_objects/syntaxerror/index.html diff --git a/files/ca/web/javascript/referencia/objectes_globals/undefined/index.html b/files/ca/web/javascript/reference/global_objects/undefined/index.html index 3dd30fbefe..3dd30fbefe 100644 --- a/files/ca/web/javascript/referencia/objectes_globals/undefined/index.html +++ b/files/ca/web/javascript/reference/global_objects/undefined/index.html diff --git a/files/ca/web/javascript/reference/global_objects/weakmap/prototype/index.html b/files/ca/web/javascript/reference/global_objects/weakmap/prototype/index.html deleted file mode 100644 index 40c3e72ff6..0000000000 --- a/files/ca/web/javascript/reference/global_objects/weakmap/prototype/index.html +++ /dev/null @@ -1,133 +0,0 @@ ---- -title: WeakMap.prototype -slug: Web/JavaScript/Reference/Global_Objects/WeakMap/prototype -translation_of: Web/JavaScript/Reference/Global_Objects/WeakMap -translation_of_original: Web/JavaScript/Reference/Global_Objects/WeakMap/prototype ---- -<div>{{JSRef}}</div> - -<p>La propietat <code><strong>WeakMap</strong></code><strong><code>.prototype</code></strong> representa el prototip pel constructor {{jsxref("WeakMap")}}.</p> - -<div>{{js_property_attributes(0,0,0)}}</div> - -<h2 id="Descripció">Descripció</h2> - -<p>Les instantànies {{jsxref("WeakMap")}} hereten de {{jsxref("WeakMap.prototype")}}. Es pot utilitzar l'objecte prototip del constructor per afegir propietats o mètodes a totes les instàncies <code>WeakMap.</code></p> - -<p><code>WeakMap.prototype</code> és en si mateix només un objecte ordinari:</p> - -<pre class="brush: js">Object.prototype.toString.call(WeakMap.prototype); // "[object Object]"</pre> - -<h2 id="Propietats">Propietats</h2> - -<dl> - <dt><code>WeakMap.prototype.constructor</code></dt> - <dd>Retorna la funció que ha creat un prototip de la instància. Aquesta és la funció {{jsxref("WeakMap")}} per defecte.</dd> -</dl> - -<h2 id="Mètodes">Mètodes</h2> - -<dl> - <dt>{{jsxref("WeakMap.delete", "WeakMap.prototype.delete(key)")}}</dt> - <dd>Elimina qualsevol valor associat a <code>key</code>. <code>WeakMap.prototype.has(key)</code> retornarà <code>false</code> després d'això.</dd> - <dt>{{jsxref("WeakMap.get", "WeakMap.prototype.get(key)")}}</dt> - <dd>Retorna el valor associat a <code>key</code>, o <code>undefined</code> si no n'hi ha cap.</dd> - <dt>{{jsxref("WeakMap.has", "WeakMap.prototype.has(key)")}}</dt> - <dd>Retorna un booleà afirmant si un valor s'ha associat o no a la <code>key</code> en l'objecte <code>WeakMap</code>.</dd> - <dt>{{jsxref("WeakMap.set", "WeakMap.prototype.set(key, value)")}}</dt> - <dd>Estableix el valor per la <code>key</code> en l'objecte <code>WeakMap.</code> Retorna l'objecte <code>WeakMap.</code></dd> - <dt><s class="obsoleteElement">{{jsxref("WeakMap.prototype.clear()")}} {{obsolete_inline}}</s></dt> - <dd><s class="obsoleteElement">Elimina totes les parelles clau/valor de l'objecte <code>WeakMap.</code> Vegeu que es posible implementar un objecte <code>WeakMap</code>-like que tingui un mètode <code>.clear()</code> per mitjà d'encapsular un objecte <code>WeakMap </code>que no ho tingui (vegeu un exemple a la pàgina {{jsxref("WeakMap")}})</s></dd> -</dl> - -<h2 id="Especificacions">Especificacions</h2> - -<table class="standard-table"> - <tbody> - <tr> - <th scope="col">Especificació</th> - <th scope="col">Estat</th> - <th scope="col">Comentaris</th> - </tr> - <tr> - <td>{{SpecName('ES6', '#sec-weakmap.prototype', 'WeakMap.prototype')}}</td> - <td>{{Spec2('ES6')}}</td> - <td>Definició inicial</td> - </tr> - </tbody> -</table> - -<h2 id="Compatibilitat_amb_navegadors">Compatibilitat amb navegadors</h2> - -<p>{{CompatibilityTable}}</p> - -<div id="compat-desktop"> -<table class="compat-table"> - <tbody> - <tr> - <th>Característica</th> - <th>Chrome</th> - <th>Firefox (Gecko)</th> - <th>Internet Explorer</th> - <th>Opera</th> - <th>Safari</th> - </tr> - <tr> - <td>Suport bàsic</td> - <td>36</td> - <td>{{CompatGeckoDesktop("6.0")}}</td> - <td>11</td> - <td>23</td> - <td>7.1</td> - </tr> - <tr> - <td>Objecte ordinari</td> - <td>{{CompatUnknown}}</td> - <td>{{CompatGeckoDesktop("40")}}</td> - <td>{{CompatUnknown}}</td> - <td>{{CompatUnknown}}</td> - <td>{{CompatUnknown}}</td> - </tr> - </tbody> -</table> -</div> - -<div id="compat-mobile"> -<table class="compat-table"> - <tbody> - <tr> - <th>Característica</th> - <th>Android</th> - <th>Chrome per Android</th> - <th>Firefox Mobile (Gecko)</th> - <th>IE Mobile</th> - <th>Opera Mobile</th> - <th>Safari Mobile</th> - </tr> - <tr> - <td>Suport bàsic</td> - <td>{{CompatNo}}</td> - <td>{{CompatNo}}</td> - <td>{{CompatGeckoMobile("6.0")}}</td> - <td>{{CompatNo}}</td> - <td>{{CompatNo}}</td> - <td>8</td> - </tr> - <tr> - <td>Objecte ordinari</td> - <td>{{CompatUnknown}}</td> - <td>{{CompatUnknown}}</td> - <td>{{CompatGeckoMobile("40")}}</td> - <td>{{CompatUnknown}}</td> - <td>{{CompatUnknown}}</td> - <td>{{CompatUnknown}}</td> - </tr> - </tbody> -</table> -</div> - -<h2 id="Vegeu_també">Vegeu també</h2> - -<ul> - <li>{{jsxref("Map.prototype")}}</li> -</ul> diff --git a/files/ca/web/javascript/reference/global_objects/weakset/prototype/index.html b/files/ca/web/javascript/reference/global_objects/weakset/prototype/index.html deleted file mode 100644 index 4e86935904..0000000000 --- a/files/ca/web/javascript/reference/global_objects/weakset/prototype/index.html +++ /dev/null @@ -1,132 +0,0 @@ ---- -title: WeakSet.prototype -slug: Web/JavaScript/Reference/Global_Objects/WeakSet/prototype -translation_of: Web/JavaScript/Reference/Global_Objects/WeakSet -translation_of_original: Web/JavaScript/Reference/Global_Objects/WeakSet/prototype ---- -<div>{{JSRef}}</div> - -<p>La propietat <code><strong>WeakSet</strong></code><strong><code>.prototype</code></strong> representa el prototip pel constructor {{jsxref("WeakSet")}}.</p> - -<div>{{js_property_attributes(0,0,0)}}</div> - -<h2 id="Descripció">Descripció</h2> - -<p>Les instàncies {{jsxref("WeakSet")}} hereten de {{jsxref("WeakSet.prototype")}}. Es pot utilitzar l'objecte prototip del constructor per afegir propietats o mètodes a totes les instàncies <code>WeakSet</code>.</p> - -<p><code>WeakSet.prototype</code> és en si mateix només un objecte ordinari</p> - -<pre class="brush: js">Object.prototype.toString.call(WeakSet.prototype); // "[object Object]"</pre> - -<h2 id="Propietats">Propietats</h2> - -<dl> - <dt><code>WeakSet.prototype.constructor</code></dt> - <dd>Retorna la funció que ha creat un prototip de la instància. Aquesta és la funció {{jsxref("WeakSet")}} per defecte.</dd> -</dl> - -<h2 id="Mètodes">Mètodes</h2> - -<dl> - <dt>{{jsxref("WeakSet.add", "WeakSet.prototype.add(value)")}}</dt> - <dd>Afegeix un nou element amb el valor donat a l'objecte <code>WeakSet.</code></dd> - <dt>{{jsxref("WeakSet.delete", "WeakSet.prototype.delete(value)")}}</dt> - <dd>Elimina l'element associat al <code>value</code>. <code>WeakSet.prototype.has(value)</code> retornarà després <code>false</code>.</dd> - <dt>{{jsxref("WeakSet.has", "WeakSet.prototype.has(value)")}}</dt> - <dd>Retorna un booleà afirmant si un element és o no present amb el valor donat en l'objecte <code>WeakSet</code>.</dd> - <dt><s class="obsoleteElement">{{jsxref("WeakSet.prototype.clear()")}} {{obsolete_inline}}</s></dt> - <dd><s class="obsoleteElement">Elimina tots els elements de l'objecte <code>WeakSet.</code></s></dd> -</dl> - -<h2 id="Especificacions">Especificacions</h2> - -<table class="standard-table"> - <tbody> - <tr> - <th scope="col">Especificació</th> - <th scope="col">Estat</th> - <th scope="col">Comentaris</th> - </tr> - <tr> - <td>{{SpecName('ES6', '#sec-weakset.prototype', 'WeakSet.prototype')}}</td> - <td>{{Spec2('ES6')}}</td> - <td>Definició inicial.</td> - </tr> - </tbody> -</table> - -<h2 id="Compatibilitat_amb_navegadors">Compatibilitat amb navegadors</h2> - -<p>{{CompatibilityTable}}</p> - -<div id="compat-desktop"> -<table class="compat-table"> - <tbody> - <tr> - <th>Característica</th> - <th>Chrome</th> - <th>Firefox (Gecko)</th> - <th>Internet Explorer</th> - <th>Opera</th> - <th>Safari</th> - </tr> - <tr> - <td>Suport bàsic</td> - <td>36</td> - <td>{{ CompatGeckoDesktop(34) }}</td> - <td>{{CompatNo}}</td> - <td>23</td> - <td>{{CompatNo}}</td> - </tr> - <tr> - <td>Objecte ordinari</td> - <td>{{CompatUnknown}}</td> - <td>{{CompatGeckoDesktop("40")}}</td> - <td>{{CompatUnknown}}</td> - <td>{{CompatUnknown}}</td> - <td>{{CompatUnknown}}</td> - </tr> - </tbody> -</table> -</div> - -<div id="compat-mobile"> -<table class="compat-table"> - <tbody> - <tr> - <th>Característica</th> - <th>Chrome per Android</th> - <th>Android</th> - <th>Firefox Mobile (Gecko)</th> - <th>IE Mobile</th> - <th>Opera Mobile</th> - <th>Safari Mobile</th> - </tr> - <tr> - <td>Suport bàsic</td> - <td>{{CompatNo}}</td> - <td>{{CompatNo}}</td> - <td>{{ CompatGeckoMobile(34) }}</td> - <td>{{CompatNo}}</td> - <td>{{CompatNo}}</td> - <td>{{CompatNo}}</td> - </tr> - <tr> - <td>Objecte ordinari</td> - <td>{{CompatUnknown}}</td> - <td>{{CompatUnknown}}</td> - <td>{{CompatGeckoMobile("40")}}</td> - <td>{{CompatUnknown}}</td> - <td>{{CompatUnknown}}</td> - <td>{{CompatUnknown}}</td> - </tr> - </tbody> -</table> -</div> - -<h2 id="Vegeu_també">Vegeu també</h2> - -<ul> - <li>{{jsxref("Set.prototype")}}</li> - <li>{{jsxref("WeakMap.prototype")}}</li> -</ul> diff --git a/files/ca/web/javascript/referencia/index.html b/files/ca/web/javascript/reference/index.html index f524504ab2..f524504ab2 100644 --- a/files/ca/web/javascript/referencia/index.html +++ b/files/ca/web/javascript/reference/index.html diff --git a/files/ca/web/javascript/referencia/operadors/operador_coma/index.html b/files/ca/web/javascript/reference/operators/comma_operator/index.html index f6a62d2bc8..f6a62d2bc8 100644 --- a/files/ca/web/javascript/referencia/operadors/operador_coma/index.html +++ b/files/ca/web/javascript/reference/operators/comma_operator/index.html diff --git a/files/ca/web/javascript/referencia/operadors/conditional_operator/index.html b/files/ca/web/javascript/reference/operators/conditional_operator/index.html index 15265c62b3..15265c62b3 100644 --- a/files/ca/web/javascript/referencia/operadors/conditional_operator/index.html +++ b/files/ca/web/javascript/reference/operators/conditional_operator/index.html diff --git a/files/ca/web/javascript/referencia/operadors/function/index.html b/files/ca/web/javascript/reference/operators/function/index.html index 0908f591b6..0908f591b6 100644 --- a/files/ca/web/javascript/referencia/operadors/function/index.html +++ b/files/ca/web/javascript/reference/operators/function/index.html diff --git a/files/ca/web/javascript/referencia/operadors/grouping/index.html b/files/ca/web/javascript/reference/operators/grouping/index.html index 45e8566806..45e8566806 100644 --- a/files/ca/web/javascript/referencia/operadors/grouping/index.html +++ b/files/ca/web/javascript/reference/operators/grouping/index.html diff --git a/files/ca/web/javascript/referencia/operadors/index.html b/files/ca/web/javascript/reference/operators/index.html index 4a70edc4fb..4a70edc4fb 100644 --- a/files/ca/web/javascript/referencia/operadors/index.html +++ b/files/ca/web/javascript/reference/operators/index.html diff --git a/files/ca/web/javascript/referencia/operadors/super/index.html b/files/ca/web/javascript/reference/operators/super/index.html index c19e58cba1..c19e58cba1 100644 --- a/files/ca/web/javascript/referencia/operadors/super/index.html +++ b/files/ca/web/javascript/reference/operators/super/index.html diff --git a/files/ca/web/javascript/referencia/operadors/typeof/index.html b/files/ca/web/javascript/reference/operators/typeof/index.html index a7407e79ce..a7407e79ce 100644 --- a/files/ca/web/javascript/referencia/operadors/typeof/index.html +++ b/files/ca/web/javascript/reference/operators/typeof/index.html diff --git a/files/ca/web/javascript/referencia/operadors/void/index.html b/files/ca/web/javascript/reference/operators/void/index.html index ddf98ebfd9..ddf98ebfd9 100644 --- a/files/ca/web/javascript/referencia/operadors/void/index.html +++ b/files/ca/web/javascript/reference/operators/void/index.html diff --git a/files/ca/web/javascript/referencia/operadors/yield/index.html b/files/ca/web/javascript/reference/operators/yield/index.html index d01f641767..d01f641767 100644 --- a/files/ca/web/javascript/referencia/operadors/yield/index.html +++ b/files/ca/web/javascript/reference/operators/yield/index.html diff --git a/files/ca/web/javascript/referencia/sentencies/block/index.html b/files/ca/web/javascript/reference/statements/block/index.html index cfa5d7fd20..cfa5d7fd20 100644 --- a/files/ca/web/javascript/referencia/sentencies/block/index.html +++ b/files/ca/web/javascript/reference/statements/block/index.html diff --git a/files/ca/web/javascript/referencia/sentencies/break/index.html b/files/ca/web/javascript/reference/statements/break/index.html index d71eff620d..d71eff620d 100644 --- a/files/ca/web/javascript/referencia/sentencies/break/index.html +++ b/files/ca/web/javascript/reference/statements/break/index.html diff --git a/files/ca/web/javascript/referencia/sentencies/continue/index.html b/files/ca/web/javascript/reference/statements/continue/index.html index a6928d15b7..a6928d15b7 100644 --- a/files/ca/web/javascript/referencia/sentencies/continue/index.html +++ b/files/ca/web/javascript/reference/statements/continue/index.html diff --git a/files/ca/web/javascript/referencia/sentencies/debugger/index.html b/files/ca/web/javascript/reference/statements/debugger/index.html index 54d8d02e3d..54d8d02e3d 100644 --- a/files/ca/web/javascript/referencia/sentencies/debugger/index.html +++ b/files/ca/web/javascript/reference/statements/debugger/index.html diff --git a/files/ca/web/javascript/referencia/sentencies/do...while/index.html b/files/ca/web/javascript/reference/statements/do...while/index.html index 88f221f83d..88f221f83d 100644 --- a/files/ca/web/javascript/referencia/sentencies/do...while/index.html +++ b/files/ca/web/javascript/reference/statements/do...while/index.html diff --git a/files/ca/web/javascript/referencia/sentencies/buida/index.html b/files/ca/web/javascript/reference/statements/empty/index.html index 6800d476f8..6800d476f8 100644 --- a/files/ca/web/javascript/referencia/sentencies/buida/index.html +++ b/files/ca/web/javascript/reference/statements/empty/index.html diff --git a/files/ca/web/javascript/referencia/sentencies/export/index.html b/files/ca/web/javascript/reference/statements/export/index.html index c1d92ab504..c1d92ab504 100644 --- a/files/ca/web/javascript/referencia/sentencies/export/index.html +++ b/files/ca/web/javascript/reference/statements/export/index.html diff --git a/files/ca/web/javascript/referencia/sentencies/for...of/index.html b/files/ca/web/javascript/reference/statements/for...of/index.html index 5cc16f52f8..5cc16f52f8 100644 --- a/files/ca/web/javascript/referencia/sentencies/for...of/index.html +++ b/files/ca/web/javascript/reference/statements/for...of/index.html diff --git a/files/ca/web/javascript/referencia/sentencies/for/index.html b/files/ca/web/javascript/reference/statements/for/index.html index 00a16b62df..00a16b62df 100644 --- a/files/ca/web/javascript/referencia/sentencies/for/index.html +++ b/files/ca/web/javascript/reference/statements/for/index.html diff --git a/files/ca/web/javascript/referencia/sentencies/function/index.html b/files/ca/web/javascript/reference/statements/function/index.html index 37deff748f..37deff748f 100644 --- a/files/ca/web/javascript/referencia/sentencies/function/index.html +++ b/files/ca/web/javascript/reference/statements/function/index.html diff --git a/files/ca/web/javascript/referencia/sentencies/if...else/index.html b/files/ca/web/javascript/reference/statements/if...else/index.html index b45e9bea3c..b45e9bea3c 100644 --- a/files/ca/web/javascript/referencia/sentencies/if...else/index.html +++ b/files/ca/web/javascript/reference/statements/if...else/index.html diff --git a/files/ca/web/javascript/referencia/sentencies/index.html b/files/ca/web/javascript/reference/statements/index.html index e91e446cbf..e91e446cbf 100644 --- a/files/ca/web/javascript/referencia/sentencies/index.html +++ b/files/ca/web/javascript/reference/statements/index.html diff --git a/files/ca/web/javascript/referencia/sentencies/return/index.html b/files/ca/web/javascript/reference/statements/return/index.html index 5b3c3e902a..5b3c3e902a 100644 --- a/files/ca/web/javascript/referencia/sentencies/return/index.html +++ b/files/ca/web/javascript/reference/statements/return/index.html diff --git a/files/ca/web/javascript/referencia/sentencies/throw/index.html b/files/ca/web/javascript/reference/statements/throw/index.html index 37d13b964b..37d13b964b 100644 --- a/files/ca/web/javascript/referencia/sentencies/throw/index.html +++ b/files/ca/web/javascript/reference/statements/throw/index.html diff --git a/files/ca/web/javascript/referencia/sentencies/while/index.html b/files/ca/web/javascript/reference/statements/while/index.html index d3997dbefd..d3997dbefd 100644 --- a/files/ca/web/javascript/referencia/sentencies/while/index.html +++ b/files/ca/web/javascript/reference/statements/while/index.html diff --git a/files/ca/web/javascript/referencia/objectes_globals/array/prototype/index.html b/files/ca/web/javascript/referencia/objectes_globals/array/prototype/index.html deleted file mode 100644 index 35ebf53933..0000000000 --- a/files/ca/web/javascript/referencia/objectes_globals/array/prototype/index.html +++ /dev/null @@ -1,203 +0,0 @@ ---- -title: Array.prototype -slug: Web/JavaScript/Referencia/Objectes_globals/Array/prototype -translation_of: Web/JavaScript/Reference/Global_Objects/Array/prototype ---- -<div>{{JSRef}}</div> - -<p>La propietat <strong><code>Array.prototype</code></strong> representa el prototipus del constructor {{jsxref("Array")}}.</p> - -<div>{{js_property_attributes(0, 0, 0)}}</div> - -<h2 id="Description" name="Description">Descripció</h2> - -<p>Les instàncies de {{jsxref("Array")}} hereten de <code>Array.prototype</code>. Com tots els constructors, és possible modificar l'objecte prototipus del constructor per a afectar a totes les instàncies de {{jsxref("Array")}}.</p> - -<p>Fet poc conegut: <code>Array.prototype</code> és ell mateix un {{jsxref("Array")}}:</p> - -<pre class="brush: js">Array.isArray(Array.prototype); // true -</pre> - -<h2 id="Properties" name="Properties">Propietats</h2> - -<dl> - <dt><code>Array.prototype.constructor</code></dt> - <dd>Especifica la funció que ha creat el prototipus de l'objecte.</dd> - <dt>{{jsxref("Array.prototype.length")}}</dt> - <dd>Reflecteix el nombre d'elements d'un array.</dd> -</dl> - -<h2 id="Methods" name="Methods">Mètodes</h2> - -<h3 id="Mutator_methods" name="Mutator_methods">Mètodes Mutadors</h3> - -<p>Els mètodes següents modifiquen l'array:</p> - -<dl> - <dt>{{jsxref("Array.prototype.copyWithin()")}} {{experimental_inline}}</dt> - <dd>Copia una seqüència d'elements de l'array dins l'array.</dd> - <dt>{{jsxref("Array.prototype.fill()")}} {{experimental_inline}}</dt> - <dd>Omple tots els elements d'un array d'una posició inicial a una posició final amb un valor estàtic.</dd> - <dt>{{jsxref("Array.prototype.pop()")}}</dt> - <dd>Elimina l'últim element d'un array i retorna aquest element.</dd> - <dt>{{jsxref("Array.prototype.push()")}}</dt> - <dd>Afegeix un o més elements al final de l'array i retorna el nou tamany de l'array.</dd> - <dt>{{jsxref("Array.prototype.reverse()")}}</dt> - <dd>Capgira l'ordre dels elements d'un array a l'array mateix (no crea cap array nou) — el primer element esdevé l'últim, l'últim esdevé el primer, etcètera.</dd> - <dt>{{jsxref("Array.prototype.shift()")}}</dt> - <dd>Elimina el primer element d'un array i retorna aquest element.</dd> - <dt>{{jsxref("Array.prototype.sort()")}}</dt> - <dd>Ordena els elements d'un array a l'array mateix i retorna l'array.</dd> - <dt>{{jsxref("Array.prototype.splice()")}}</dt> - <dd>Afegeix i/o elimina elements d'un array.</dd> - <dt>{{jsxref("Array.prototype.unshift()")}}</dt> - <dd>Afegeix un o més elements al pricipi d'un array i retorna el nou tamany de l'array.</dd> -</dl> - -<h3 id="Accessor_methods" name="Accessor_methods">Mètodes d'accés</h3> - -<p>Aquests mètodes no modifiquen l'array sino que retornen algun tipus de representació de l'array.</p> - -<dl> - <dt>{{jsxref("Array.prototype.concat()")}}</dt> - <dd>Retorna un nou array format per la unió de l'array actual amb altres arrays o valors.</dd> - <dt>{{jsxref("Array.prototype.includes()")}} {{experimental_inline}}</dt> - <dd>Determina si un array inclou un element en concret, retornant <code>true</code> en cas afirmatiu i <code>false</code> en cas contrari.</dd> - <dt>{{jsxref("Array.prototype.join()")}}</dt> - <dd>Uneix tots els elements d'un array en un string.</dd> - <dt>{{jsxref("Array.prototype.slice()")}}</dt> - <dd>Extrau una secció d'un array i la retorna en forma de nou array.</dd> - <dt>{{jsxref("Array.prototype.toSource()")}} {{non-standard_inline}}</dt> - <dd>Retorna un literal d'array que representa l'array especificat; es pot emprar aquest valor per a crear un nou array. Sobreescriu el mètode {{jsxref("Object.prototype.toSource()")}}.</dd> - <dt>{{jsxref("Array.prototype.toString()")}}</dt> - <dd>Retorna un string que representa l'array i els seus elements. Sobreescriu el mètode {{jsxref("Object.prototype.toString()")}}.</dd> - <dt>{{jsxref("Array.prototype.toLocaleString()")}}</dt> - <dd>Retorna un string localitzat que representa l'array i els seus elements. Sobreescriu el mètode {{jsxref("Object.prototype.toLocaleString()")}}.</dd> - <dt>{{jsxref("Array.prototype.indexOf()")}}</dt> - <dd>Retorna la primera posició de l'array en la que es troba un element igual al valor especificat, o bé -1 si no es troba l'element dins l'array.</dd> - <dt>{{jsxref("Array.prototype.lastIndexOf()")}}</dt> - <dd>Retorna la última posició de l'array en la que es troba un element igual al valor especificat, o bé -1 si no es troba l'element dins l'array.</dd> -</dl> - -<h3 id="Iteration_methods" name="Iteration_methods">Mètodes d'iteració</h3> - -<p>Alguns mètodes accepten com a arguments funcions que es cridaran al processar l'array. Quan es criden aquests mètodes, s'emmagatzema el valor de <code>length</code> de l'array i qualsevol element afegit després a dins de la funció no serà visitat per la mateixa. Altres canvis a l'array (com ara canviar un valor o bé eliminar un element) poden afectar els resultats de l'operació si el mètode visita els elements que han canviat. Tot i que el comportament específic d'aquests mètodes en aquests casos està ben definit no es recomana recolzar-se en ell ja que pot confondre a altres programadors que llegeixin el vostre codi. En comptes de modificar l'array copieu-lo i modifiqueu la copia.</p> - -<dl> - <dt>{{jsxref("Array.prototype.forEach()")}}</dt> - <dd>Crida una funció per a cada element de l'array.</dd> - <dt>{{jsxref("Array.prototype.entries()")}} {{experimental_inline}}</dt> - <dd>Retorna un nou objecte <code>Array Iterator</code> que conté parells clau-valor per a cada posició de l'array.</dd> - <dt>{{jsxref("Array.prototype.every()")}}</dt> - <dd>Retorna <code>true</code> si tots els elements de l'array satisfan la funció proporcionada.</dd> - <dt>{{jsxref("Array.prototype.some()")}}</dt> - <dd>Retorna <code>true</code> si al menys un dels elements de l'array satisfà la funció proporcionada.</dd> - <dt>{{jsxref("Array.prototype.filter()")}}</dt> - <dd>Crea un nou array que conté tots eles elements de l'array des d'on es crida que facin que la funció que actua de filtre retorni <code>true</code>.</dd> - <dt>{{jsxref("Array.prototype.find()")}} {{experimental_inline}}</dt> - <dd>Retorna el valor trobat a l'array, si un element de l'array satisfà la funció proporcionada. En cas contrari retorna <code>undefined</code>.</dd> - <dt>{{jsxref("Array.prototype.findIndex()")}} {{experimental_inline}}</dt> - <dd>Retorna la posició on es troba l'element de l'array que satifcaci la funció proporcionada. Retorna <code>-1</code> si cap element la satisfà.</dd> - <dt>{{jsxref("Array.prototype.keys()")}} {{experimental_inline}}</dt> - <dd>Retorna un nou <code>Array Iterator</code> que conté les claus per a cada posició de l'array.</dd> - <dt>{{jsxref("Array.prototype.map()")}}</dt> - <dd>Crea un nou array a partir dels resultats de cridar a la funció proporcionada per a cada element de l'array.</dd> - <dt>{{jsxref("Array.prototype.reduce()")}}</dt> - <dd>Executa una funció sobre un acumulador i cada valor de l'array (aplicats d'esquerra a dreta) amb l'objectiu de redudir els valors a un sol valor.</dd> - <dt>{{jsxref("Array.prototype.reduceRight()")}}</dt> - <dd>Executa una funció sobre un acumulador i cada valor de l'array (aplicats de dreta a esquerra) amb l'objectiu de redudir els valors a un sol valor.</dd> - <dt>{{jsxref("Array.prototype.values()")}} {{experimental_inline}}</dt> - <dd>Retorna un nou objecte <code>Array Iterator</code> que conté els valors de cada posició de l'array.</dd> - <dt>{{jsxref("Array.prototype.@@iterator()", "Array.prototype[@@iterator]()")}} {{experimental_inline}}</dt> - <dd>Retorna un nou objecte <code>Array Iterator</code> que conté els valors per a cada posició de l'array.</dd> -</dl> - -<h3 id="Generic_methods" name="Generic_methods">Mètodes genèrics</h3> - -<p>Molts dels mètodes de l'objecte Array de JavaScript estan dissenyats per a ser aplicats de manera genèrica a qualsevol objecte que tingui la propietat <code>length</code> i que disposin la seva informació en forma de noms de propietats numèrices (com ara <code>array[5]</code> per a accedir a l'element desat a la posició 5). Alguns mètodes, com ara {{jsxref("Array.join", "join")}}, només llegeixen la propietat <code>length</code> i les altes propietats numèriques. D'altres mètodes, com ara {{jsxref("Array.reverse", "reverse")}}, necessiten que tant les propietats numèriques com la propietat <code>length</code> siguin mutables; això implica que aquests mètodes no es poden fer servir sobre objectes com ara {{jsxref("String")}}, on la seva propietat <code>length</code> així com les propietats numèriques no es poden modificar.</p> - -<h2 id="Specificacions">Specificacions</h2> - -<table class="standard-table"> - <tbody> - <tr> - <th scope="col">Especificacions</th> - <th scope="col">Estat</th> - <th scope="col">Comentaris</th> - </tr> - <tr> - <td>{{SpecName('ES1')}}</td> - <td>{{Spec2('ES1')}}</td> - <td>Definició inicial.</td> - </tr> - <tr> - <td>{{SpecName('ES5.1', '#sec-15.4.3.1', 'Array.prototype')}}</td> - <td>{{Spec2('ES5.1')}}</td> - <td> </td> - </tr> - <tr> - <td>{{SpecName('ES6', '#sec-array.prototype', 'Array.prototype')}}</td> - <td>{{Spec2('ES6')}}</td> - <td> </td> - </tr> - </tbody> -</table> - -<h2 id="Browser_compatibility" name="Browser_compatibility">Compatibilitat amb navegadors</h2> - -<div>{{CompatibilityTable}}</div> - -<div id="compat-desktop"> -<table class="compat-table"> - <tbody> - <tr> - <th>Característica</th> - <th>Chrome</th> - <th>Firefox (Gecko)</th> - <th>Internet Explorer</th> - <th>Opera</th> - <th>Safari</th> - </tr> - <tr> - <td>Suport bàsic</td> - <td>{{CompatVersionUnknown}}</td> - <td>{{CompatVersionUnknown}}</td> - <td>{{CompatVersionUnknown}}</td> - <td>{{CompatVersionUnknown}}</td> - <td>{{CompatVersionUnknown}}</td> - </tr> - </tbody> -</table> -</div> - -<div id="compat-mobile"> -<table class="compat-table"> - <tbody> - <tr> - <th>Característica</th> - <th>Android</th> - <th>Chrome for Android</th> - <th>Firefox Mobile (Gecko)</th> - <th>IE Mobile</th> - <th>Opera Mobile</th> - <th>Safari Mobile</th> - </tr> - <tr> - <td>Suport bàsic</td> - <td>{{CompatVersionUnknown}}</td> - <td>{{CompatVersionUnknown}}</td> - <td>{{CompatVersionUnknown}}</td> - <td>{{CompatVersionUnknown}}</td> - <td>{{CompatVersionUnknown}}</td> - <td>{{CompatVersionUnknown}}</td> - </tr> - </tbody> -</table> -</div> - -<h2 id="See_also" name="See_also">Vegeu també</h2> - -<ul> - <li>{{jsxref("Array")}}</li> - <li>{{jsxref("Function.prototype")}}</li> -</ul> diff --git a/files/ca/web/javascript/referencia/objectes_globals/boolean/prototype/index.html b/files/ca/web/javascript/referencia/objectes_globals/boolean/prototype/index.html deleted file mode 100644 index e0845eb102..0000000000 --- a/files/ca/web/javascript/referencia/objectes_globals/boolean/prototype/index.html +++ /dev/null @@ -1,118 +0,0 @@ ---- -title: Boolean.prototype -slug: Web/JavaScript/Referencia/Objectes_globals/Boolean/prototype -translation_of: Web/JavaScript/Reference/Global_Objects/Boolean -translation_of_original: Web/JavaScript/Reference/Global_Objects/Boolean/prototype ---- -<div>{{JSRef("Global_Objects", "Boolean")}}</div> - -<h2 id="Summary" name="Summary">Resum</h2> - -<p>La propietat <strong><code>Boolean.prototype</code></strong> representa el prototipus pel constructor {{jsxref("Global_Objects/Boolean", "Boolean")}}.</p> - -<div>{{js_property_attributes(0, 0, 0)}}</div> - -<h2 id="Description" name="Description">Descripció</h2> - -<p>Les instàncies de {{jsxref("Global_Objects/Boolean", "Boolean")}} hereten de<code> Boolean.prototype</code>. Es pot emprar l'objecte prototipus del constructor per a afegir noves propietats o mètodes a totes les instàncies de {{jsxref("Global_Objects/Boolean", "Boolean")}}.</p> - -<h2 id="Propietats">Propietats</h2> - -<dl> - <dt><code>Boolean.prototype.constructor</code></dt> - <dd>Retorna la funció que ha creat la instància del prototipus. Aquesta funció és {{jsxref("Global_Objects/Boolean", "Boolean")}} per defecte.</dd> -</dl> - -<div>{{jsOverrides("Object", "properties", "constructor")}}</div> - -<h2 id="Mètodes">Mètodes</h2> - -<dl> - <dt>{{jsxref("Boolean.prototype.toSource()")}} {{non-standard_inline}}</dt> - <dd>Retorna una cadena de caràcters que conté el codi fond de l'objecte {{jsxref("Global_Objects/Boolean", "Boolean")}}; aquesta pot utilitzar-se per a crear un objecte equivalent. Sobreescriu el mètode {{jsxref("Object.prototype.toSource()")}}.</dd> - <dt>{{jsxref("Boolean.prototype.toString()")}}</dt> - <dd>Retorna una cadena de caràcters que valdrà o bé <code>"true"</code> o bé <code>"false"</code>, depenent del valor que l'objecte representi. Sobreescriu el mètode {{jsxref("Object.prototype.toString()")}}.</dd> - <dt>{{jsxref("Boolean.prototype.valueOf()")}}</dt> - <dd>Retorna el valor primitiu de l'objecte {{jsxref("Global_Objects/Boolean", "Boolean")}}. Sobreescriu el mètode {{jsxref("Object.prototype.valueOf()")}}.</dd> -</dl> - -<div>{{jsOverrides("Object", "methods", "toSource", "toString", "valueOf")}}</div> - -<h2 id="Especificacions">Especificacions</h2> - -<table class="standard-table"> - <tbody> - <tr> - <th scope="col">Especificació</th> - <th scope="col">Estat</th> - <th scope="col">Comentaris</th> - </tr> - <tr> - <td>ECMAScript 1a Edició.</td> - <td>Standard</td> - <td>Definició inicial. Implementat a JavaScript 1.0.</td> - </tr> - <tr> - <td>{{SpecName('ES5.1', '#sec-15.6.3.1', 'Boolean.prototype')}}</td> - <td>{{Spec2('ES5.1')}}</td> - <td> </td> - </tr> - <tr> - <td>{{SpecName('ES6', '#sec-boolean.prototype', 'Boolean.prototype')}}</td> - <td>{{Spec2('ES6')}}</td> - <td> </td> - </tr> - </tbody> -</table> - -<h2 id="Compatibilitat_amb_navegadors">Compatibilitat amb navegadors</h2> - -<div>{{CompatibilityTable}}</div> - -<div id="compat-desktop"> -<table class="compat-table"> - <tbody> - <tr> - <th>Característica</th> - <th>Chrome</th> - <th>Firefox (Gecko)</th> - <th>Internet Explorer</th> - <th>Opera</th> - <th>Safari</th> - </tr> - <tr> - <td>Suport bàsic</td> - <td>{{CompatVersionUnknown}}</td> - <td>{{CompatVersionUnknown}}</td> - <td>{{CompatVersionUnknown}}</td> - <td>{{CompatVersionUnknown}}</td> - <td>{{CompatVersionUnknown}}</td> - </tr> - </tbody> -</table> -</div> - -<div id="compat-mobile"> -<table class="compat-table"> - <tbody> - <tr> - <th>Característica</th> - <th>Android</th> - <th>Chrome for Android</th> - <th>Firefox Mobile (Gecko)</th> - <th>IE Mobile</th> - <th>Opera Mobile</th> - <th>Safari Mobile</th> - </tr> - <tr> - <td>Suport bàsic</td> - <td>{{CompatVersionUnknown}}</td> - <td>{{CompatVersionUnknown}}</td> - <td>{{CompatVersionUnknown}}</td> - <td>{{CompatVersionUnknown}}</td> - <td>{{CompatVersionUnknown}}</td> - <td>{{CompatVersionUnknown}}</td> - </tr> - </tbody> -</table> -</div> diff --git a/files/ca/web/javascript/referencia/objectes_globals/date/prototype/index.html b/files/ca/web/javascript/referencia/objectes_globals/date/prototype/index.html deleted file mode 100644 index 91e2dff38f..0000000000 --- a/files/ca/web/javascript/referencia/objectes_globals/date/prototype/index.html +++ /dev/null @@ -1,222 +0,0 @@ ---- -title: Date.prototype -slug: Web/JavaScript/Referencia/Objectes_globals/Date/prototype -translation_of: Web/JavaScript/Reference/Global_Objects/Date -translation_of_original: Web/JavaScript/Reference/Global_Objects/Date/prototype ---- -<div>{{JSRef("Global_Objects", "Date")}}</div> - -<h2 id="Summary" name="Summary">Resum</h2> - -<p>La propietat <strong><code>Date.prototype</code></strong> representa el prototipus per al constructor {{jsxref("Global_Objects/Date", "Date")}}.</p> - -<div>{{js_property_attributes(0, 0, 1)}}</div> - -<h2 id="Description" name="Description">Descripció</h2> - -<p>Les instàncies de JavaScript de {{jsxref("Global_Objects/Date", "Date")}} hereten de<code> Date.prototype</code>. L'objecte prototipus del constructor pot modificar-se per a afectar a les propietats i mètodes heretats per les instàncies de {{jsxref("Global_Objects/Date", "Date")}}.</p> - -<p>Per a compatibilitat amb càlculs amb milenis (en altres paraules, per a tindre en compte l'any 2000), sempre s'hauria d'especificar l'any sencer, per exemple, 1998, en comptes de 98. Per a ajudar a proveïr l'any sencer JavaScript inclou els mètodes {{jsxref("Date.prototype.getFullYear()", "getFullYear()")}}, {{jsxref("Date.prototype.setFullYear()", "setFullYear()")}}, {{jsxref("Date.prototype.getUTCFullYear()", "getUTCFullYear()")}} i {{jsxref("Date.prototype.setUTCFullYear()", "setUTCFullYear()")}}.</p> - -<h2 id="Properties" name="Properties">Propietats</h2> - -<dl> - <dt><code>Date.prototype.constructor</code></dt> - <dd>Retorna la funció que va crear la instància. És a dir, per defecte el constructor {{jsxref("Global_Objects/Date", "Date")}}.</dd> -</dl> - -<div>{{jsOverrides("Object", "properties", "constructor")}}</div> - -<h2 id="Methods" name="Methods">Mètodes</h2> - -<h3 id="Getter">Getter</h3> - -<dl> - <dt>{{jsxref("Date.prototype.getDate()")}}</dt> - <dd>Retorna el dia del mes (1-31) per a la data especificada, en temps local.</dd> - <dt>{{jsxref("Date.prototype.getDay()")}}</dt> - <dd>Retorna el dia de la setmana (0-6) per a la data especificada, en temps local.</dd> - <dt>{{jsxref("Date.prototype.getFullYear()")}}</dt> - <dd>Retorna l'any (4 digits per a anys de 4 digits) per a la data especificada, en temps local.</dd> - <dt>{{jsxref("Date.prototype.getHours()")}}</dt> - <dd>Retorna l'hora (0-23) per a la data especificada, en temps local.</dd> - <dt>{{jsxref("Date.prototype.getMilliseconds()")}}</dt> - <dd>Retorna els milisegons (0-999) per a la data especificada, en temps local.</dd> - <dt>{{jsxref("Date.prototype.getMinutes()")}}</dt> - <dd>Retorna els minuts (0-59) per a la data especificada, en temps local.</dd> - <dt>{{jsxref("Date.prototype.getMonth()")}}</dt> - <dd>Retorna el mes (0-11) per a la data especificada, en temps local.</dd> - <dt>{{jsxref("Date.prototype.getSeconds()")}}</dt> - <dd>Retorna els segons (0-59) per a la data especificada, en temps local.</dd> - <dt>{{jsxref("Date.prototype.getTime()")}}</dt> - <dd>Retorna un valor numèric per a la data especificada que representa la data especificada com al nombre de milisegons que han passat des de l'1 de gener de 1970, 00:00:00 UTC (negatiu per a dates anteriors).</dd> - <dt>{{jsxref("Date.prototype.getTimezoneOffset()")}}</dt> - <dd>Retorna la diferència d'ús horari en minuts del temps local.</dd> - <dt>{{jsxref("Date.prototype.getUTCDate()")}}</dt> - <dd>Retorna el dia del mes (1-31) per a la data especificada en temps universal (UTC).</dd> - <dt>{{jsxref("Date.prototype.getUTCDay()")}}</dt> - <dd>Retorna el dia de la setmana (0-6) per a la data especificada en temps universal (UTC).</dd> - <dt>{{jsxref("Date.prototype.getUTCFullYear()")}}</dt> - <dd>Retorna l'any (4 digits per a anys de 4 digits) per a la data especificada en temps universal (UTC).</dd> - <dt>{{jsxref("Date.prototype.getUTCHours()")}}</dt> - <dd>Retorna l'hora (0-23) per a la data especificada en temps universal (UTC).</dd> - <dt>{{jsxref("Date.prototype.getUTCMilliseconds()")}}</dt> - <dd>Retorna els milisegons (0-999) per a la data especificada en temps universal (UTC).</dd> - <dt>{{jsxref("Date.prototype.getUTCMinutes()")}}</dt> - <dd>Retorna els minuts (0-59) per a la data especificada en temps universal (UTC).</dd> - <dt>{{jsxref("Date.prototype.getUTCMonth()")}}</dt> - <dd>Retorna el mes (0-11) per a la data especificada en temps universal (UTC).</dd> - <dt>{{jsxref("Date.prototype.getUTCSeconds()")}}</dt> - <dd>Retorna els segons (0-59) per a la data especificada en temps universal (UTC).</dd> - <dt>{{jsxref("Date.prototype.getYear()")}} {{deprecated_inline}}</dt> - <dd>Retorna l'any (normalment 2-3 digits) per a la data especificada, en temps local. En comptes d'aquest mètode, utilitzeu {{jsxref("Date.prototype.getFullYear()", "getFullYear()")}}.</dd> -</dl> - -<h3 id="Setter">Setter</h3> - -<dl> - <dt>{{jsxref("Date.prototype.setDate()")}}</dt> - <dd>Assigna el dia del mes per a la data especificada, en temps local.</dd> - <dt>{{jsxref("Date.prototype.setFullYear()")}}</dt> - <dd>Assigna l'any sencer (és a dir, de 4 digits per a un any amb 4 digits) per a la data especificada, en temps local.</dd> - <dt>{{jsxref("Date.prototype.setHours()")}}</dt> - <dd>Assigna l'hora per a la data especificada, en temps local.</dd> - <dt>{{jsxref("Date.prototype.setMilliseconds()")}}</dt> - <dd>Assigna els milisegons per a la data especificada, en temps local.</dd> - <dt>{{jsxref("Date.prototype.setMinutes()")}}</dt> - <dd>Assigna els minuts per a la data especificada, en temps local.</dd> - <dt>{{jsxref("Date.prototype.setMonth()")}}</dt> - <dd>Assigna el mes per a la data especificada, en temps local.</dd> - <dt>{{jsxref("Date.prototype.setSeconds()")}}</dt> - <dd>Assigna els segons per a la data especificada, en temps local.</dd> - <dt>{{jsxref("Date.prototype.setTime()")}}</dt> - <dd>Assigna la data que representarà la instància de l'objecte {{jsxref("Global_Objects/Date", "Date")}} al temps representat pel nombre de milisegons passats des de l'1 de gener de 1970, 00:00:00 UTC. Permet nombres negatius per a temps anteriors a aquesta data.</dd> - <dt>{{jsxref("Date.prototype.setUTCDate()")}}</dt> - <dd>Assigna el dia del mes per a la data especificada en temps universal (UTC).</dd> - <dt>{{jsxref("Date.prototype.setUTCFullYear()")}}</dt> - <dd>Assigna l'any sencer (és a dir, 4 digits per a anys de 4 digits) per a la data especificada en temps universal (UTC).</dd> - <dt>{{jsxref("Date.prototype.setUTCHours()")}}</dt> - <dd>Assigna l'hora per a la data especificada en temps universal (UTC).</dd> - <dt>{{jsxref("Date.prototype.setUTCMilliseconds()")}}</dt> - <dd>Assigna els milisegons per a la data especificada en temps universal (UTC).</dd> - <dt>{{jsxref("Date.prototype.setUTCMinutes()")}}</dt> - <dd>Assigna els minuts per a la data especificada en temps universal (UTC).</dd> - <dt>{{jsxref("Date.prototype.setUTCMonth()")}}</dt> - <dd>Assigna el mes per a la data especificada en temps universal (UTC).</dd> - <dt>{{jsxref("Date.prototype.setUTCSeconds()")}}</dt> - <dd>Assigna els segons per a la data especificada en temps universal (UTC).</dd> - <dt>{{jsxref("Date.prototype.setYear()")}} {{deprecated_inline}}</dt> - <dd>Assigna l'any (normalment 2-3 digits) per a la data especificada en temps local. Utilitzeu {{jsxref("Date.prototype.setFullYear()", "setFullYear()")}} en comptes d'aquest mètode.</dd> -</dl> - -<h3 id="Getters_amb_conversió">Getters amb conversió</h3> - -<dl> - <dt>{{jsxref("Date.prototype.toDateString()")}}</dt> - <dd>Retorna la part part de data de {{jsxref("Global_Objects/Date", "Date")}} com a string inteligible per humans.</dd> - <dt>{{jsxref("Date.prototype.toISOString()")}}</dt> - <dd>Converteix una data a un string seguint el Format Extés del ISO 8601.</dd> - <dt>{{jsxref("Date.prototype.toJSON()")}}</dt> - <dd>Retorna un string que representa l'objecte {{jsxref("Global_Objects/Date", "Date")}} utilitzant {{jsxref("Date.prototype.toISOString()", "toISOString()")}}. Ideat per a ser usat per {{jsxref("JSON.stringify()")}}.</dd> - <dt>{{jsxref("Date.prototype.toGMTString()")}} {{deprecated_inline}}</dt> - <dd>Retorna un string que representa l'objecte {{jsxref("Global_Objects/Date", "Date")}} basat en la zona horària GMT (UT). Utilitzeu {{jsxref("Date.prototype.toUTCString()", "toUTCString()")}} en comptes d'aquest mètode.</dd> - <dt>{{jsxref("Date.prototype.toLocaleDateString()")}}</dt> - <dd>Retorna un string que representa la part de la data amb temps local, basat en la configuració del sistema.</dd> - <dt>{{jsxref("Date.prototype.toLocaleFormat()")}} {{non-standard_inline}}</dt> - <dd>Converteix una data a string tot utilitzant un format string.</dd> - <dt>{{jsxref("Date.prototype.toLocaleString()")}}</dt> - <dd>Retorna un string que representa la data tenint en compte el temps local. Sobreescriu el mètode {{jsxref("Object.prototype.toLocaleString()")}}.</dd> - <dt>{{jsxref("Date.prototype.toLocaleTimeString()")}}</dt> - <dd>Retorna un string que representa la part de temps de la data local basada en la configuració del sistema.</dd> - <dt>{{jsxref("Date.prototype.toSource()")}} {{non-standard_inline}}</dt> - <dd>Retorna un string que representa el codi font per a un objecte {{jsxref("Global_Objects/Date", "Date")}} equivalent; aquest valor pot emprar-se per a crear un nou objecte. Sobreescriu el mètode {{jsxref("Object.prototype.toSource()")}}.</dd> - <dt>{{jsxref("Date.prototype.toString()")}}</dt> - <dd>Retorna un string que representa l'objecte {{jsxref("Global_Objects/Date", "Date")}} especificat. Sobreescriu el mètode {{jsxref("Object.prototype.toString()")}}.</dd> - <dt>{{jsxref("Date.prototype.toTimeString()")}}</dt> - <dd>Retorna la part de temps de l'objecte {{jsxref("Global_Objects/Date", "Date")}} com a string comprensible per humans.</dd> - <dt>{{jsxref("Date.prototype.toUTCString()")}}</dt> - <dd>Converteix una data a un string utilitzant la zona horària UTC.</dd> - <dt>{{jsxref("Date.prototype.valueOf()")}}</dt> - <dd>Retorna el valor primitiu d'un objecte {{jsxref("Global_Objects/Date", "Date")}}. Sobreescriu el mètode {{jsxref("Object.prototype.valueOf()")}}.</dd> -</dl> - -<div>{{jsOverrides("Object", "methods", "getDate", "getDay", "getFullYear", "getHours", "getMilliseconds", "getMinutes", "getMonth", "getSeconds", "getTime", "getTimezoneOffset", "getUTCDate", "getUTCDay", "getUTCFullYear", "getUTCHours", "getUTCMilliseconds", "getUTCMinutes", "getUTCMonth", "getUTCSeconds", "getYear", "setdate", "setFullYear", "setHours", "setMilliseconds", "setMinutes", "setMontth", "setSeconds", "setTime", "setUTCDate", "setUTCFullYear", "setUTCHours", "setUTCMilliseconds", "setUTCMinutes", "setUTCMonth", "setUTCSeconds", "setYear", "toDateString", "toGMTString", "toLocaleDateString", "toLocaleFormat", "toLocaleString", "toLocaleTimeString", "toSource", "toString", "toTimeString", "toUTCString", "valueOf")}}</div> - -<h2 id="Especificacions">Especificacions</h2> - -<table class="standard-table"> - <tbody> - <tr> - <th scope="col">Especificació</th> - <th scope="col">Estat</th> - <th scope="col">Comentaris</th> - </tr> - <tr> - <td>ECMAScript 1a Edició.</td> - <td>Standard</td> - <td>Definició inicial. Implementat a JavaScript 1.1.</td> - </tr> - <tr> - <td>{{SpecName('ES5.1', '#sec-15.9.5', 'Date.prototype')}}</td> - <td>{{Spec2('ES5.1')}}</td> - <td> </td> - </tr> - <tr> - <td>{{SpecName('ES6', '#sec-properties-of-the-date-prototype-object', 'Date.prototype')}}</td> - <td>{{Spec2('ES6')}}</td> - <td> </td> - </tr> - </tbody> -</table> - -<h2 id="Compatibilitat_amb_navegadors">Compatibilitat amb navegadors</h2> - -<div>{{CompatibilityTable}}</div> - -<div id="compat-desktop"> -<table class="compat-table"> - <tbody> - <tr> - <th>Característica</th> - <th>Chrome</th> - <th>Firefox (Gecko)</th> - <th>Internet Explorer</th> - <th>Opera</th> - <th>Safari</th> - </tr> - <tr> - <td>Suport bàsic</td> - <td>{{CompatVersionUnknown}}</td> - <td>{{CompatVersionUnknown}}</td> - <td>{{CompatVersionUnknown}}</td> - <td>{{CompatVersionUnknown}}</td> - <td>{{CompatVersionUnknown}}</td> - </tr> - </tbody> -</table> -</div> - -<div id="compat-mobile"> -<table class="compat-table"> - <tbody> - <tr> - <th>Característica</th> - <th>Android</th> - <th>Chrome for Android</th> - <th>Firefox Mobile (Gecko)</th> - <th>IE Mobile</th> - <th>Opera Mobile</th> - <th>Safari Mobile</th> - </tr> - <tr> - <td>Suport bàsic</td> - <td>{{CompatVersionUnknown}}</td> - <td>{{CompatVersionUnknown}}</td> - <td>{{CompatVersionUnknown}}</td> - <td>{{CompatVersionUnknown}}</td> - <td>{{CompatVersionUnknown}}</td> - <td>{{CompatVersionUnknown}}</td> - </tr> - </tbody> -</table> -</div> diff --git a/files/ca/web/javascript/referencia/objectes_globals/error/prototype/index.html b/files/ca/web/javascript/referencia/objectes_globals/error/prototype/index.html deleted file mode 100644 index 53e22669e9..0000000000 --- a/files/ca/web/javascript/referencia/objectes_globals/error/prototype/index.html +++ /dev/null @@ -1,151 +0,0 @@ ---- -title: Error.prototype -slug: Web/JavaScript/Referencia/Objectes_globals/Error/prototype -translation_of: Web/JavaScript/Reference/Global_Objects/Error -translation_of_original: Web/JavaScript/Reference/Global_Objects/Error/prototype ---- -<div>{{JSRef("Global_Objects", "Error", "EvalError,InternalError,RangeError,ReferenceError,SyntaxError,TypeError,URIError")}}</div> - -<h2 id="Summary" name="Summary">Resum</h2> - -<p>La propietat <code><strong>Error.prototype</strong></code> representa el prototipus per al constructor {{jsxref("Global_Objects/Error", "Error")}}.</p> - -<div>{{js_property_attributes(0, 0, 0)}}</div> - -<h2 id="Description" name="Description">Descripció</h2> - -<p>Totes les instàncies de {{jsxref("Global_Objects/Error", "Error")}} i les instàncies de {{jsxref("Global_Objects/Error", "non-generic errors", "#Error_types", 1)}} heretèn de <code>Error.prototype</code>. Com totes les funcions constructores, es pot utilitzar el prototipus del constructor per a afegir propietats o mètodes a totes les instànces creades amb aquest constructor.</p> - -<h2 id="Properties" name="Properties">Propietats</h2> - -<h3 id="Standard_properties" name="Standard_properties">Propietats standard</h3> - -<dl> - <dt><code>Error.prototype.constructor</code></dt> - <dd>Especifica la funció que ha creat la instància del prototipus.</dd> - <dt>{{jsxref("Error.prototype.message")}}</dt> - <dd>Missatge d'error.</dd> - <dt>{{jsxref("Error.prototype.name")}}</dt> - <dd>Nom de l'error.</dd> -</dl> - -<h3 id="Vendor-specific_extensions" name="Vendor-specific_extensions">Extensions específiques del venedor</h3> - -<div>{{non-standard_header}}</div> - -<h4 id="Microsoft" name="Microsoft">Microsoft</h4> - -<dl> - <dt>{{jsxref("Error.prototype.description")}}</dt> - <dd>Descripció de l'error. Similar a {{jsxref("Error.prototype.message", "message")}}.</dd> - <dt>{{jsxref("Error.prototype.number")}}</dt> - <dd>Nombre de l'error.</dd> -</dl> - -<h4 id="Mozilla" name="Mozilla">Mozilla</h4> - -<dl> - <dt>{{jsxref("Error.prototype.fileName")}}</dt> - <dd>Ruta al fitxer que ha llençat l'error.</dd> - <dt>{{jsxref("Error.prototype.lineNumber")}}</dt> - <dd>Línia del fitxer que ha llençat l'error.</dd> - <dt>{{jsxref("Error.prototype.columnNumber")}}</dt> - <dd>Nombre de columna de la línia que ha llençat l'error.</dd> - <dt>{{jsxref("Error.prototype.stack")}}</dt> - <dd>Conté la traça de l'error.</dd> -</dl> - -<h2 id="Methods" name="Methods">Mètodes</h2> - -<dl> - <dt>{{jsxref("Error.prototype.toSource()")}} {{non-standard_inline}}</dt> - <dd>Retorna un string que conté el codi font de l'objecte {{jsxref("Global_Objects/Error", "Error")}} especificat; es pot emprar aquest valor per a crear un objecte nou. Sobreescriu el mètode {{jsxref("Object.prototype.toSource()")}}.</dd> - <dt>{{jsxref("Error.prototype.toString()")}}</dt> - <dd>Retorna un string que representa l'objecte especificat. Sobreescriu el mètode {{jsxref("Object.prototype.toString()")}}.</dd> -</dl> - -<h2 id="Especificacions">Especificacions</h2> - -<table class="standard-table"> - <tbody> - <tr> - <th scope="col">Especificació</th> - <th scope="col">Estat</th> - <th scope="col">Comentaris</th> - </tr> - <tr> - <td>ECMAScript 1a Edició.</td> - <td>Standard</td> - <td>Definició inicial. Implementat a JavaScript 1.1.</td> - </tr> - <tr> - <td>{{SpecName('ES5.1', '#sec-15.11.3.1', 'Error')}}</td> - <td>{{Spec2('ES5.1')}}</td> - <td> </td> - </tr> - <tr> - <td>{{SpecName('ES6', '#sec-error.prototype', 'Error')}}</td> - <td>{{Spec2('ES6')}}</td> - <td> </td> - </tr> - </tbody> -</table> - -<h2 id="Compatibilitat_amb_navegadors">Compatibilitat amb navegadors</h2> - -<div>{{CompatibilityTable}}</div> - -<div id="compat-desktop"> -<table class="compat-table"> - <tbody> - <tr> - <th>Característica</th> - <th>Chrome</th> - <th>Firefox (Gecko)</th> - <th>Internet Explorer</th> - <th>Opera</th> - <th>Safari</th> - </tr> - <tr> - <td>Suport bàsic</td> - <td>{{CompatVersionUnknown}}</td> - <td>{{CompatVersionUnknown}}</td> - <td>{{CompatVersionUnknown}}</td> - <td>{{CompatVersionUnknown}}</td> - <td>{{CompatVersionUnknown}}</td> - </tr> - </tbody> -</table> -</div> - -<div id="compat-mobile"> -<table class="compat-table"> - <tbody> - <tr> - <th>Característica</th> - <th>Android</th> - <th>Chrome for Android</th> - <th>Firefox Mobile (Gecko)</th> - <th>IE Mobile</th> - <th>Opera Mobile</th> - <th>Safari Mobile</th> - </tr> - <tr> - <td>Suport bàsic</td> - <td>{{CompatVersionUnknown}}</td> - <td>{{CompatVersionUnknown}}</td> - <td>{{CompatVersionUnknown}}</td> - <td>{{CompatVersionUnknown}}</td> - <td>{{CompatVersionUnknown}}</td> - <td>{{CompatVersionUnknown}}</td> - </tr> - </tbody> -</table> -</div> - -<h2 id="See_also" name="See_also">Vegeu també</h2> - -<ul> - <li>{{jsxref("Error")}}</li> - <li>{{jsxref("Object.prototype")}}</li> -</ul> diff --git a/files/ca/web/javascript/referencia/objectes_globals/map/prototype/index.html b/files/ca/web/javascript/referencia/objectes_globals/map/prototype/index.html deleted file mode 100644 index 3a7508f042..0000000000 --- a/files/ca/web/javascript/referencia/objectes_globals/map/prototype/index.html +++ /dev/null @@ -1,126 +0,0 @@ ---- -title: Map.prototype -slug: Web/JavaScript/Referencia/Objectes_globals/Map/prototype -translation_of: Web/JavaScript/Reference/Global_Objects/Map -translation_of_original: Web/JavaScript/Reference/Global_Objects/Map/prototype ---- -<div>{{JSRef}}</div> - -<p>La propietat <code><strong>Map</strong></code><strong><code>.prototype</code></strong> representa el prototipus per al constructor de {{jsxref("Map")}}.</p> - -<div>{{js_property_attributes(0,0,0)}}</div> - -<h2 id="Descripció">Descripció</h2> - -<p>Les instàncies de {{jsxref("Map")}} hereten de {{jsxref("Map.prototype")}}. Es pot utilitzar el prototipus de l'objecte constructor per a afegir propietats o mètodes a totes les instàncies de <code>Map</code>.</p> - -<h2 id="Propietats">Propietats</h2> - -<dl> - <dt><code>Map.prototype.constructor</code></dt> - <dd>Retorna la funció que ha creat el una instància del prototipus. Per defecte és la funció {{jsxref("Map")}}.</dd> - <dt>{{jsxref("Map.prototype.size")}}</dt> - <dd>Retorna el nombre de parells clau-valor que conté l'objecte <code>Map</code>.</dd> -</dl> - -<h2 id="Mètodes">Mètodes</h2> - -<dl> - <dt>{{jsxref("Map.prototype.clear()")}}</dt> - <dd>Elimina tots els parells clau-valor de l'objecte <code>Map</code>.</dd> - <dt>{{jsxref("Map.delete", "Map.prototype.delete(clau)")}}</dt> - <dd>Elimina el valor associat a la clau especificada i retorna el valor que el mètode <code>Map.prototype.has(valor)</code> hagués retornat abans d'eliminar-lo. <code>Map.prototype.has(clau)</code> retornarà <code>false</code> després de cridar aquest mètode.</dd> - <dt>{{jsxref("Map.prototype.entries()")}}</dt> - <dd>Retorna un nou objecte <code>Iterator</code> que conté<strong> un array de <code>[clau, valor]</code></strong> per a cada element dins l'objecte <code>Map</code>, en estricte ordre d'inserció.</dd> - <dt>{{jsxref("Map.forEach", "Map.prototype.forEach(callbackFn[, thisArg])")}}</dt> - <dd>Crida <code>callbackFn</code> per a cada parell clau-valor present a l'objecte <code>Map</code>, recorreguts per ordre d'inserció. Si es proporciona el paràmetre <code>thisArg</code>, aquest s'utilitzarà com a valor de <em>this</em> per a cada crida a <code>callbackFn</code>.</dd> - <dt>{{jsxref("Map.get", "Map.prototype.get(clau)")}}</dt> - <dd>Retorna el valor associat a la clau, o bé <code>undefined</code> si aquesta clau no té cap valor associat.</dd> - <dt>{{jsxref("Map.has", "Map.prototype.has(clau)")}}</dt> - <dd>Retorna un booleà que especifica si la clau té un valor associat en aquest objecte <code>Map</code> o no.</dd> - <dt>{{jsxref("Map.prototype.keys()")}}</dt> - <dd>Retorna un nou objecte <code>Iterator</code> que conté les <strong>claus</strong> de cada element de l'objecte <code>Map</code>, en ordre d'inserció.</dd> - <dt>{{jsxref("Map.set", "Map.prototype.set(clau, valor)")}}</dt> - <dd>Assigna <code>valor</code> a la <code>clau</code> a l'objecte <code>Map</code>. Retorna l'objecte <code>Map</code>.</dd> - <dt>{{jsxref("Map.prototype.values()")}}</dt> - <dd>Retorna un nou objecte <code>Iterator</code> que conté els <code>valors</code> de cada element de l'objecte <code>Map</code>, en ordre d'inserció.</dd> - <dt>{{jsxref("Map.@@iterator", "Map.prototype[@@iterator]()")}}</dt> - <dd>Retorna un nou objecte <code>Iterator</code> que conté <strong>un array de <code>[clau, valor]</code></strong> per a cada element de l'objecte <code>Map</code>, en ordre d'inserció.</dd> -</dl> - -<h2 id="Especificacions">Especificacions</h2> - -<table class="standard-table"> - <tbody> - <tr> - <th scope="col">Especificació</th> - <th scope="col">Estat</th> - <th scope="col">Comentaris</th> - </tr> - <tr> - <td>{{SpecName('ES6', '#sec-map.prototype', 'Map.prototype')}}</td> - <td>{{Spec2('ES6')}}</td> - <td>Definició inicial.</td> - </tr> - </tbody> -</table> - -<h2 id="Compatibilitat_amb_navegadors">Compatibilitat amb navegadors</h2> - -<p>{{CompatibilityTable}}</p> - -<div id="compat-desktop"> -<table class="compat-table"> - <tbody> - <tr> - <th>Característica</th> - <th>Chrome</th> - <th>Firefox (Gecko)</th> - <th>Internet Explorer</th> - <th>Opera</th> - <th>Safari</th> - </tr> - <tr> - <td>Suport bàsic</td> - <td>38</td> - <td>{{ CompatGeckoDesktop("13") }}</td> - <td>11</td> - <td>25</td> - <td>7.1</td> - </tr> - </tbody> -</table> -</div> - -<div id="compat-mobile"> -<table class="compat-table"> - <tbody> - <tr> - <th>Característica</th> - <th>Android</th> - <th>Chrome for Android</th> - <th>Firefox Mobile (Gecko)</th> - <th>IE Mobile</th> - <th>Opera Mobile</th> - <th>Safari Mobile</th> - </tr> - <tr> - <td>Suport bàsic</td> - <td>{{CompatNo}}</td> - <td>38</td> - <td>{{CompatGeckoMobile("13")}}</td> - <td>{{CompatNo}}</td> - <td>{{CompatNo}}</td> - <td> - <p>8</p> - </td> - </tr> - </tbody> -</table> -</div> - -<h2 id="Vegeu_també">Vegeu també</h2> - -<ul> - <li>{{jsxref("Set.prototype")}}</li> -</ul> diff --git a/files/ca/web/javascript/referencia/objectes_globals/number/prototype/index.html b/files/ca/web/javascript/referencia/objectes_globals/number/prototype/index.html deleted file mode 100644 index ae733e56ec..0000000000 --- a/files/ca/web/javascript/referencia/objectes_globals/number/prototype/index.html +++ /dev/null @@ -1,126 +0,0 @@ ---- -title: Number.prototype -slug: Web/JavaScript/Referencia/Objectes_globals/Number/prototype -translation_of: Web/JavaScript/Reference/Global_Objects/Number -translation_of_original: Web/JavaScript/Reference/Global_Objects/Number/prototype ---- -<div>{{JSRef}}</div> - -<p>La propietat <strong><code>Number.prototype</code></strong> representa el prototipus per al constructor {{jsxref("Number")}}.</p> - -<div>{{js_property_attributes(0, 0, 0)}}</div> - -<h2 id="Descripció">Descripció</h2> - -<p>Totes les instàncies de {{jsxref("Number")}} hereten de <code>Number.prototype</code>. L'objecte prototipus del constructor de {{jsxref("Number")}} pot ser modificat per a afectar totes les instàncies de {{jsxref( "Number")}}.</p> - -<h2 id="Propietats">Propietats</h2> - -<dl> - <dt><code>Number.prototype.constructor</code></dt> - <dd>Retorna la funció que ha creat la instància d'aquest objecte. Per defecte aquesta és l'objecte {{jsxref("Number")}}.</dd> -</dl> - -<h2 id="Mètodes">Mètodes</h2> - -<dl> - <dt>{{jsxref("Number.prototype.toExponential()")}}</dt> - <dd>Retorna un string que representa el nombre en notació exponencial.</dd> - <dt>{{jsxref("Number.prototype.toFixed()")}}</dt> - <dd>Retorna un string que representa el nombre en notació de punt fixe.</dd> - <dt>{{jsxref("Number.prototype.toLocaleString()")}}</dt> - <dd>Retorna un string amb una representació d'aquest nombbre sensible a la llengua. Sobreescriu el mètode {{jsxref("Object.prototype.toLocaleString()")}}.</dd> - <dt>{{jsxref("Number.prototype.toPrecision()")}}</dt> - <dd>Retorna un string amb una representació de precisió de punt fixe o notació exponencial del nombre.</dd> - <dt>{{jsxref("Number.prototype.toSource()")}} {{non-standard_inline}}</dt> - <dd>Retorna un objecte literal que representa l'objecte {{jsxref("Number")}} especificat; aquest valor pot ser emprat per a crear un nou objecte. Sobreescriu el mètode {{jsxref("Object.prototype.toSource()")}}.</dd> - <dt>{{jsxref("Number.prototype.toString()")}}</dt> - <dd>Retorna un string que representa l'objecte especificat en el radi (base) especificat. Sobreescriu el mètode {{jsxref("Object.prototype.toString()")}}.</dd> - <dt>{{jsxref("Number.prototype.valueOf()")}}</dt> - <dd>Retorna el valor primitiu de l'objecte especificat. Sobreescriu el mètode {{jsxref("Object.prototype.valueOf()")}}.</dd> -</dl> - -<h2 id="Especificacions">Especificacions</h2> - -<table class="standard-table"> - <tbody> - <tr> - <th scope="col">Especificació</th> - <th scope="col">Estat</th> - <th scope="col">Comentaris</th> - </tr> - <tr> - <td>{{SpecName('ES1')}}</td> - <td>{{Spec2('ES1')}}</td> - <td>Definició inicial. Implementat a JavaScript 1.1.</td> - </tr> - <tr> - <td>{{SpecName('ES5.1', '#sec-15.7.4', 'Number')}}</td> - <td>{{Spec2('ES5.1')}}</td> - <td> </td> - </tr> - <tr> - <td>{{SpecName('ES6', '#sec-properties-of-the-number-prototype-object', 'Number')}}</td> - <td>{{Spec2('ES6')}}</td> - <td> </td> - </tr> - </tbody> -</table> - -<h2 id="Compatibilitat_amb_navegadors">Compatibilitat amb navegadors</h2> - -<div>{{CompatibilityTable}}</div> - -<div id="compat-desktop"> -<table class="compat-table"> - <tbody> - <tr> - <th>Característica</th> - <th>Chrome</th> - <th>Firefox (Gecko)</th> - <th>Internet Explorer</th> - <th>Opera</th> - <th>Safari</th> - </tr> - <tr> - <td>Suport bàsic</td> - <td>{{CompatVersionUnknown}}</td> - <td>{{CompatVersionUnknown}}</td> - <td>{{CompatVersionUnknown}}</td> - <td>{{CompatVersionUnknown}}</td> - <td>{{CompatVersionUnknown}}</td> - </tr> - </tbody> -</table> -</div> - -<div id="compat-mobile"> -<table class="compat-table"> - <tbody> - <tr> - <th>Característica</th> - <th>Android</th> - <th>Chrome for Android</th> - <th>Firefox Mobile (Gecko)</th> - <th>IE Mobile</th> - <th>Opera Mobile</th> - <th>Safari Mobile</th> - </tr> - <tr> - <td>Suport bàsic</td> - <td>{{CompatVersionUnknown}}</td> - <td>{{CompatVersionUnknown}}</td> - <td>{{CompatVersionUnknown}}</td> - <td>{{CompatVersionUnknown}}</td> - <td>{{CompatVersionUnknown}}</td> - <td>{{CompatVersionUnknown}}</td> - </tr> - </tbody> -</table> -</div> - -<h2 id="Vegeu_també">Vegeu també</h2> - -<ul> - <li>{{jsxref("Number")}}</li> -</ul> diff --git a/files/ca/web/javascript/referencia/objectes_globals/set/prototype/index.html b/files/ca/web/javascript/referencia/objectes_globals/set/prototype/index.html deleted file mode 100644 index 9d6f6e90ee..0000000000 --- a/files/ca/web/javascript/referencia/objectes_globals/set/prototype/index.html +++ /dev/null @@ -1,124 +0,0 @@ ---- -title: Set.prototype -slug: Web/JavaScript/Referencia/Objectes_globals/Set/prototype -translation_of: Web/JavaScript/Reference/Global_Objects/Set -translation_of_original: Web/JavaScript/Reference/Global_Objects/Set/prototype ---- -<div>{{JSRef}}</div> - -<p>La propietat <code><strong>Set</strong></code><strong><code>.prototype</code></strong> representa el prototipus per al constructor de {{jsxref("Set")}}.</p> - -<div>{{js_property_attributes(0,0,0)}}</div> - -<h2 id="Descripció">Descripció</h2> - -<p>Les instàncies de {{jsxref("Set")}} hereten de {{jsxref("Set.prototype")}}. Es pot utilitzar el l'objecte prototipus del constructor per a afegir propietats o mètodes a totes les instàncies de <code>Set</code>.</p> - -<h2 id="Propietats">Propietats</h2> - -<dl> - <dt><code>Set.prototype.constructor</code></dt> - <dd>Retorna la funció que ha creat la instància del prototipus. Per defecte es tracta de la funció {{jsxref("Set")}}.</dd> - <dt>{{jsxref("Set.prototype.size")}}</dt> - <dd>Retorna el nombre de valors emmagatzemats dins l'objecte <code>Set</code>.</dd> -</dl> - -<h2 id="Mètodes">Mètodes</h2> - -<dl> - <dt>{{jsxref("Set.add", "Set.prototype.add(valor)")}}</dt> - <dd>Afegeix un nou element a l'objecte <code>Set</code> amb el valor donat. Retorna l'objecte <code>Set</code>.</dd> - <dt>{{jsxref("Set.prototype.clear()")}}</dt> - <dd>Elimina tots els elements de l'objecte <code>Set</code>.</dd> - <dt>{{jsxref("Set.delete", "Set.prototype.delete(valor)")}}</dt> - <dd>Elimina l'element associat a <code>valor</code> i retorna el que el mètode <code>Set.prototype.has(valor)</code> hagués retornat prèviament a aquesta crida. Després d'aquesta crida <code>Set.prototype.has(valor)</code> retornarà <code>false</code>.</dd> - <dt>{{jsxref("Set.prototype.entries()")}}</dt> - <dd>Retorna un nou objecte <code>Iterator</code> que conté <strong>un array de la forma <code>[valor, valor]</code></strong> per a cada element dins l'objecte <code>Set</code>, en ordre d'inserció. El array retornat manté similitud amb el comportament de l'objecte <code>Map</code>, de forma que cada entrada té el mateix valor per a la seva <em>clau</em> i <em>valor</em>.</dd> - <dt>{{jsxref("Set.forEach", "Set.prototype.forEach(callbackFn[, thisArg])")}}</dt> - <dd>Crida <code>callbackFn</code> per a cada valor present a l'objecte <code>Set</code>, recorreguts per ordre d'inserció. Si es proporciona el paràmetre <code>thisArg</code>, aquest s'utilitzarà com a valor de <em>this</em> per a cada crida a <code>callbackFn</code>.</dd> - <dt>{{jsxref("Set.has", "Set.prototype.has(value)")}}</dt> - <dd>Retorna un booleà que especifica si la clau té un valor associat en aquest objecte <code>Set</code> o no.</dd> - <dt>{{jsxref("Set.prototype.keys()")}}</dt> - <dd>Es tracta de la mateixa funció que la funció <strong><code>values()</code></strong> i retorna un nou objecte <code>Iterator</code> que conté els valors per a cada element de l'objecte <code>Set</code>, en ordre d'inserció.</dd> - <dt>{{jsxref("Set.prototype.values()")}}</dt> - <dd>Retorna un nou objecte <code>Iterator</code> que conté els <strong>valors</strong><strong> </strong>de cada element de l'objecte <code>Set</code>, en ordre d'inserció.</dd> - <dt>{{jsxref("Set.prototype.@@iterator()", "Set.prototype[@@iterator]()")}}</dt> - <dd>Retorna un nou objecte <code>Iterator</code> que conté els <strong>valors</strong><strong> </strong>de cada element de l'objecte <code>Set</code>, en ordre d'inserció.</dd> -</dl> - -<h2 id="Especificacions">Especificacions</h2> - -<table class="standard-table"> - <tbody> - <tr> - <th scope="col">Especificació</th> - <th scope="col">Estat</th> - <th scope="col">Comentaris</th> - </tr> - <tr> - <td>{{SpecName('ES6', '#sec-set.prototype', 'Set.prototype')}}</td> - <td>{{Spec2('ES6')}}</td> - <td>Definició inicial.</td> - </tr> - </tbody> -</table> - -<h2 id="Compatibilitat_amb_navegadors">Compatibilitat amb navegadors</h2> - -<p>{{CompatibilityTable}}</p> - -<div id="compat-desktop"> -<table class="compat-table"> - <tbody> - <tr> - <th>Característica</th> - <th>Chrome</th> - <th>Firefox (Gecko)</th> - <th>Internet Explorer</th> - <th>Opera</th> - <th>Safari</th> - </tr> - <tr> - <td>Suport bàsic</td> - <td>38</td> - <td>{{ CompatGeckoDesktop("13") }}</td> - <td>11</td> - <td>25</td> - <td>7.1</td> - </tr> - </tbody> -</table> -</div> - -<div id="compat-mobile"> -<table class="compat-table"> - <tbody> - <tr> - <th>Característica</th> - <th>Android</th> - <th>Chrome for Android</th> - <th>Firefox Mobile (Gecko)</th> - <th>IE Mobile</th> - <th>Opera Mobile</th> - <th>Safari Mobile</th> - </tr> - <tr> - <td>Suport bàsic</td> - <td>{{CompatNo}}</td> - <td>38</td> - <td>{{ CompatGeckoMobile("13") }}</td> - <td>{{CompatNo}}</td> - <td>{{CompatNo}}</td> - <td> - <p>8</p> - </td> - </tr> - </tbody> -</table> -</div> - -<h2 id="Vegeu_també">Vegeu també</h2> - -<ul> - <li>{{jsxref("Map.prototype")}}</li> -</ul> diff --git a/files/ca/web/javascript/referencia/objectes_globals/syntaxerror/prototype/index.html b/files/ca/web/javascript/referencia/objectes_globals/syntaxerror/prototype/index.html deleted file mode 100644 index 35aea642bd..0000000000 --- a/files/ca/web/javascript/referencia/objectes_globals/syntaxerror/prototype/index.html +++ /dev/null @@ -1,122 +0,0 @@ ---- -title: SyntaxError.prototype -slug: Web/JavaScript/Referencia/Objectes_globals/SyntaxError/prototype -translation_of: Web/JavaScript/Reference/Global_Objects/SyntaxError -translation_of_original: Web/JavaScript/Reference/Global_Objects/SyntaxError/prototype ---- -<div>{{JSRef}}</div> - -<p>La propietat <code><strong>SyntaxError.prototype</strong></code> representa el prototip pel constructor {{jsxref("SyntaxError")}}.</p> - -<h2 id="Descripció">Descripció</h2> - -<p>Totes les instàncies {{jsxref("SyntaxError")}} hereten de <code>SyntaxError.prototype</code>. Es pot utilitzar el prototipus per afegir propietats o mètodes a totes les instàncies.</p> - -<h2 id="Propietats">Propietats</h2> - -<dl> - <dt><code>SyntaxError.prototype.constructor</code></dt> - <dd>Especifica la funció que ha creat el prototip d'una instància.</dd> - <dt>{{jsxref("Error.prototype.message", "SyntaxError.prototype.message")}}</dt> - <dd>Missatge d'error. Tot i que l'ECMA-262 especifica que {{jsxref("SyntaxError")}} hauria de proveir la seva pròpia propietat <code>message,</code> en <a href="/en-US/docs/Mozilla/Projects/SpiderMonkey">SpiderMonkey</a>, hereta {{jsxref("Error.prototype.message")}}.</dd> - <dt>{{jsxref("Error.prototype.name", "SyntaxError.prototype.name")}}</dt> - <dd>Nom de l'herror. Heretat de {{jsxref("Error")}}.</dd> - <dt>{{jsxref("Error.prototype.fileName", "SyntaxError.prototype.fileName")}}</dt> - <dd>Ruta a l'arxiu que llança aquest error. Heretat de {{jsxref("Error")}}.</dd> - <dt>{{jsxref("Error.prototype.lineNumber", "SyntaxError.prototype.lineNumber")}}</dt> - <dd>Número de línia en el fitxa que llança aquest error. Heretat de {{jsxref("Error")}}.</dd> - <dt>{{jsxref("Error.prototype.columnNumber", "SyntaxError.prototype.columnNumber")}}</dt> - <dd>Número de columna en línia que llança aquest error. Heretat de {{jsxref("Error")}}.</dd> - <dt>{{jsxref("Error.prototype.stack", "SyntaxError.prototype.stack")}}</dt> - <dd>Traça de l'error. Heretat de {{jsxref("Error")}}.</dd> -</dl> - -<h2 id="Mètodes">Mètodes</h2> - -<p>Tot i que l'objecte prototip {{jsxref("SyntaxError")}} no conté cap mètode per si mateix, instàncies de{{jsxref("SyntaxError")}} heretes alguns mètodes a través de la cadena prototip.</p> - -<h2 id="Especificacions">Especificacions</h2> - -<table class="standard-table"> - <tbody> - <tr> - <th scope="col">Especificació</th> - <th scope="col">Estat</th> - <th scope="col">Comentaris</th> - </tr> - <tr> - <td>{{SpecName('ES3')}}</td> - <td>{{Spec2('ES3')}}</td> - <td>Definició inicial</td> - </tr> - <tr> - <td>{{SpecName('ES5.1', '#sec-15.11.7.6', 'NativeError.prototype')}}</td> - <td>{{Spec2('ES5.1')}}</td> - <td>Definit com a <code><em>NativeError</em>.prototype</code>.</td> - </tr> - <tr> - <td>{{SpecName('ES6', '#sec-nativeerror.prototype', 'NativeError.prototype')}}</td> - <td>{{Spec2('ES6')}}</td> - <td>Definit com a <code><em>NativeError</em>.prototype</code>.</td> - </tr> - </tbody> -</table> - -<h2 id="Compatibilitat_amb_navegadors">Compatibilitat amb navegadors</h2> - -<div>{{CompatibilityTable}}</div> - -<div id="compat-desktop"> -<table class="compat-table"> - <tbody> - <tr> - <th>Característica</th> - <th>Chrome</th> - <th>Firefox (Gecko)</th> - <th>Internet Explorer</th> - <th>Opera</th> - <th>Safari</th> - </tr> - <tr> - <td>Suport bàsic</td> - <td>{{CompatVersionUnknown}}</td> - <td>{{CompatVersionUnknown}}</td> - <td>{{CompatVersionUnknown}}</td> - <td>{{CompatVersionUnknown}}</td> - <td>{{CompatVersionUnknown}}</td> - </tr> - </tbody> -</table> -</div> - -<div id="compat-mobile"> -<table class="compat-table"> - <tbody> - <tr> - <th>Característica</th> - <th>Android</th> - <th>Chrome per Android</th> - <th>Firefox Mobile (Gecko)</th> - <th>IE Mobile</th> - <th>Opera Mobile</th> - <th>Safari Mobile</th> - </tr> - <tr> - <td>Suport bàsic</td> - <td>{{CompatVersionUnknown}}</td> - <td>{{CompatVersionUnknown}}</td> - <td>{{CompatVersionUnknown}}</td> - <td>{{CompatVersionUnknown}}</td> - <td>{{CompatVersionUnknown}}</td> - <td>{{CompatVersionUnknown}}</td> - </tr> - </tbody> -</table> -</div> - -<h2 id="Vegeu_també">Vegeu també</h2> - -<ul> - <li>{{jsxref("Error.prototype")}}</li> - <li>{{jsxref("Function.prototype")}}</li> -</ul> diff --git a/files/ca/web/javascript/referencia/operadors/arithmetic_operators/index.html b/files/ca/web/javascript/referencia/operadors/arithmetic_operators/index.html deleted file mode 100644 index 9b6816c2d6..0000000000 --- a/files/ca/web/javascript/referencia/operadors/arithmetic_operators/index.html +++ /dev/null @@ -1,287 +0,0 @@ ---- -title: Operadors aritmètics -slug: Web/JavaScript/Referencia/Operadors/Arithmetic_Operators -translation_of: Web/JavaScript/Reference/Operators -translation_of_original: Web/JavaScript/Reference/Operators/Arithmetic_Operators ---- -<div> -<div>{{jsSidebar("Operators")}}</div> -</div> - -<h2 id="Summary" name="Summary">Resum</h2> - -<p><strong>Els operadors aritmètics</strong> prenen valors numèrics (poden ser tant literals com ser variables) com a operands seus i retornen un valor numèric únic. Els operadors aritmètics estàndards són la suma (+), la resta (-), la multiplicació (*), i la divisió (/).</p> - -<h2 id="Suma_()"><a name="Addition">Suma (+)</a></h2> - -<p>L'operador <em>Suma</em> produeix la suma dels operands numèrics o de la concatenació de cadenes.</p> - -<h3 id="Sintaxi">Sintaxi</h3> - -<pre class="syntaxbox"><strong>Operador:</strong> x + y -</pre> - -<h3 id="Exemples">Exemples</h3> - -<pre class="brush: js">// Nombre + Nombre -> suma -1 + 2 // 3 - -// Booleà + Nombre -> suma -true + 1 // 2 - -// Booleà + Booleà -> suma -false + false // 0 - -// Nombre + String -> concatenació -5 + "foo" // "5foo" - -// String + Booleà -> concatenació -"foo" + false // "foofalse" - -// String + String -> concatenació -"foo" + "bar" // "foobar" -</pre> - -<h2 id="Resta_(-)"><a name="Subtraction">Resta (-)</a></h2> - -<p>L'operador <em>resta</em> produeix la resta de dos operands, produint la seva diferència.</p> - -<h3 id="Sintaxi_2">Sintaxi</h3> - -<pre class="syntaxbox"><strong>Operador:</strong> x - y -</pre> - -<h3 id="Exemples_2">Exemples</h3> - -<pre class="brush: js">5 - 3 // 2 -3 - 5 // -2 -"foo" - 3 // NaN</pre> - -<h2 id="Divisió_()"><a name="Division">Divisió (/)</a></h2> - -<p>L'operador divisió produeix el quocient dels seus operands on el operand de l'esquerra és el dividend, i l'operand de la dreta és el divisor.</p> - -<h3 id="Sintaxi_3">Sintaxi</h3> - -<pre class="syntaxbox"><strong>Operador:</strong> x / y -</pre> - -<h3 id="Exemples_3">Exemples</h3> - -<pre class="brush: js">1 / 2 // retorna 0.5 a JavaScript -1 / 2 // retorna 0 in Java -// (cap dels nombres és explícitament n nombre de coma flotant) - -1.0 / 2.0 // retorna 0.5 a JavaScript i Java - -2.0 / 0 // retorna Infinity a JavaScript -2.0 / 0.0 // també retorna Infinity -2.0 / -0.0 // retorna -Infinity a JavaScript</pre> - -<h2 id="Multiplicació_(*)"><a name="Multiplication">Multiplicació (*)</a></h2> - -<p>L'operador <em>multiplicació</em> produeix el producte dels operands.</p> - -<h3 id="Sintaxi_4">Sintaxi</h3> - -<pre class="syntaxbox"><strong>Operador:</strong> x * y -</pre> - -<h3 id="Exemples_4">Exemples</h3> - -<pre class="brush: js">2 * 2 // 4 --2 * 2 // -4 -Infinity * 0 // NaN -Infinity * Infinity // Infinity -"foo" * 2 // NaN -</pre> - -<h2 id="Mòdul_()"><a name="Remainder">Mòdul (%)</a></h2> - -<p>L'operador<em> mòdul </em>retorna el mòdul del primer operand amb el segon, això és, <code>var1</code> modulo <code>var2</code> en la sentència prèvia, on <code>var1</code> i <code>var2 </code>són variables. La funció mòdul és la resta entera de dividir <code>var1</code> <code>per var2</code>. <a href="http://wiki.ecmascript.org/doku.php?id=strawman:modulo_operator" title="http://wiki.ecmascript.org/doku.php?id=strawman:modulo_operator">Hi ha una proposta per a implementar un operador mòdul real en una futura versió de l'ECMAScript.</a></p> - -<h3 id="Sintaxi_5">Sintaxi</h3> - -<pre class="syntaxbox"><strong>Operador:</strong> var1 % var2 -</pre> - -<h3 id="Exemples_5">Exemples</h3> - -<pre class="brush: js">12 % 5 // 2 --1 % 2 // -1 -NaN % 2 // NaN -</pre> - -<h2 id="Increment_()"><a name="Increment">Increment (++)</a></h2> - -<p>L'operador <em>increment</em> incrementa (afegeix un) al seu operand i retorna un valor.</p> - -<ul> - <li>Emprat com a sufix, és a dir, amb l'operador després de l'operand (per exemple: x++), retorna el valor de l'operand abans d'incrementar-lo.</li> - <li>Emprat com a prefix, és a dir, amb l'operador precedint l'operand (per exemple: ++x), retorna el valor de l'operand després d'incrementar-lo.</li> -</ul> - -<h3 id="Sintaxi_6">Sintaxi</h3> - -<pre class="syntaxbox"><strong>Operador:</strong> x++ or ++x -</pre> - -<h3 id="Exemples_6">Exemples</h3> - -<pre class="brush: js">// Sufix -var x = 3; -y = x++; // y = 3, x = 4 - -// Prefix -var a = 2; -b = ++a; // a = 3, b = 3 -</pre> - -<h2 id="Decrement_(--)"><a name="Decrement">Decrement (--)</a></h2> - -<p>L'operador <em>decrement</em> decrementa (resta un) al seu operand i retorna el seu valor.</p> - -<ul> - <li>Emprat com a sufix, és a dir, amb l'operador després de l'operand (per exemple: x--), retorna el valor de l'operand abans de decrementar-lo.</li> - <li>Emprat com a prefix, és a dir, amb l'operador precedint l'operand (per exemple: --x), retorna el valor de l'operand després de decrementar-lo.</li> -</ul> - -<h3 id="Sintaxi_7">Sintaxi</h3> - -<pre class="syntaxbox"><strong>Operador:</strong> x-- or --x -</pre> - -<h3 id="Exemples_7">Exemples</h3> - -<pre class="brush: js">// Sufix -var x = 3; -y = x--; // y = 3, x = 2 - -// Prefix -var a = 2; -b = --a; // a = 1, b = 1 -</pre> - -<h2 id="Negació_unària_(-)"><a name="Unary_negation">Negació unària (-)</a></h2> - -<p>L'operador de negació unària precedeix el seu operand i el nega.</p> - -<h3 id="Sintaxi_8">Sintaxi</h3> - -<pre class="syntaxbox"><strong>Operator:</strong> -x -</pre> - -<h3 id="Exemples_8">Exemples</h3> - -<pre class="brush: js">var x = 3; -y = -x; // y = -3, x = 3 -</pre> - -<h2 id="Operador_unari_de_conversió_a_nombre_()"><a name="Unary_plus">Operador unari de conversió a nombre</a> (+)</h2> - -<p>L'operador unari de conversió a nombre precedeix el seu operand i intenta convertir-lo en un nombre si no ho és ja. Tot i que l'operand de negació unària també pot convertir no-nombres, l'operador de conversió és el mètode més ràpid i recomanat per a convertir quelcom a un nombre ja que no realitza cap altra operació al nombre. Pot convertir cadenes de caràcters representant sencers i nombres en coma flotant, així com els valors <code>true</code>, <code>false</code> i <code>null</code>. Quant a nombres sencers, tant la notació decimal com la hexadecimal (denotada amb el prefixe "0x") estàn suportades. Els nombres negatius també estàn suportats (tot i que no per a hexadecimals). Si no pot interpretar un valor determinat l'operador retornarà<a href="/en-US/docs/Web/JavaScript/Reference/Global_Objects/NaN"> NaN</a>.</p> - -<h3 id="Sintaxi_9">Sintaxi</h3> - -<pre class="syntaxbox"><strong>Operador:</strong> +x -</pre> - -<h3 id="Exemples_9">Exemples</h3> - -<pre class="brush: js">+3 // 3 -+"3" // 3 -+true // 1 -+false // 0 -+null // 0 -</pre> - -<h2 id="Especificacions">Especificacions</h2> - -<table class="standard-table"> - <tbody> - <tr> - <th scope="col">Especificació</th> - <th scope="col">Estat</th> - <th scope="col">Comentaris</th> - </tr> - <tr> - <td>ECMAScript 1st Edition.</td> - <td>Standard</td> - <td>Initial definition.</td> - </tr> - <tr> - <td>{{SpecName('ES5.1', '#sec-11.6', 'Additive operators')}}<br> - {{SpecName('ES5.1', '#sec-11.5', 'Multiplicative operators')}}<br> - {{SpecName('ES5.1', '#sec-11.3', 'Postfix expressions')}}<br> - {{SpecName('ES5.1', '#sec-11.4', 'Unary operators')}}</td> - <td>{{Spec2('ES5.1')}}</td> - <td> </td> - </tr> - <tr> - <td>{{SpecName('ES6', '#sec-additive-operators', 'Additive operators')}}<br> - {{SpecName('ES6', '#sec-multiplicative-operators', 'Multiplicative operators')}}<br> - {{SpecName('ES6', '#sec-postfix-expressions', 'Postfix expressions')}}<br> - {{SpecName('ES6', '#sec-unary-operators', 'Unary operators')}}</td> - <td>{{Spec2('ES6')}}</td> - <td> </td> - </tr> - </tbody> -</table> - -<h2 id="Compatibilitat_amb_navegadors">Compatibilitat amb navegadors</h2> - -<p>{{ CompatibilityTable() }}</p> - -<div id="compat-desktop"> -<table class="compat-table"> - <tbody> - <tr> - <th>Característica</th> - <th>Chrome</th> - <th>Firefox (Gecko)</th> - <th>Internet Explorer</th> - <th>Opera</th> - <th>Safari</th> - </tr> - <tr> - <td>Suport bàsic</td> - <td>{{ CompatVersionUnknown() }}</td> - <td>{{ CompatVersionUnknown() }}</td> - <td>{{ CompatVersionUnknown() }}</td> - <td>{{ CompatVersionUnknown() }}</td> - <td>{{ CompatVersionUnknown() }}</td> - </tr> - </tbody> -</table> -</div> - -<div id="compat-mobile"> -<table class="compat-table"> - <tbody> - <tr> - <th>Característica</th> - <th>Android</th> - <th>Chrome per Android</th> - <th>Firefox Mobile (Gecko)</th> - <th>IE Mobile</th> - <th>Opera Mobile</th> - <th>Safari Mobile</th> - </tr> - <tr> - <td>Suport bàsic</td> - <td>{{ CompatVersionUnknown() }}</td> - <td>{{ CompatVersionUnknown() }}</td> - <td>{{ CompatVersionUnknown() }}</td> - <td>{{ CompatVersionUnknown() }}</td> - <td>{{ CompatVersionUnknown() }}</td> - <td>{{ CompatVersionUnknown() }}</td> - </tr> - </tbody> -</table> -</div> - -<h2 id="Vegeu_també">Vegeu també</h2> - -<ul> - <li><a href="/en-US/docs/Web/JavaScript/Reference/Operators/Assignment_Operators">Operadors d'assignació</a></li> -</ul> diff --git a/files/ca/web/javascript/referencia/operadors/bitwise_operators/index.html b/files/ca/web/javascript/referencia/operadors/bitwise_operators/index.html deleted file mode 100644 index f7fbae7b47..0000000000 --- a/files/ca/web/javascript/referencia/operadors/bitwise_operators/index.html +++ /dev/null @@ -1,719 +0,0 @@ ---- -title: Operadors de bits -slug: Web/JavaScript/Referencia/Operadors/Bitwise_Operators -translation_of: Web/JavaScript/Reference/Operators -translation_of_original: Web/JavaScript/Reference/Operators/Bitwise_Operators ---- -<div>{{jsSidebar("Operators")}}</div> - -<h2 id="Summary" name="Summary">Resum</h2> - -<p><strong>Els operadors de bits</strong> tracten els seus operands com una seqüència de 32 bits (uns i zeros), en comptes de operar-los com a <a href="/ca/docs/Web/JavaScript/Reference/Global_Objects/Number">nombres</a> decimals, hexadecimals o octals. Per exemple, la representació binària del és nombre decimal nou (9) 1001. Els operadors de bits treballen amb aquesta representació binària però el resultat que retorna l'operació sempre és un nombre standard de JavaScript.</p> - -<p>La taula que trobareu a continuació és un resum dels operadors de bits que es poden trobar a JavaScript:</p> - -<table class="standard-table"> - <tbody> - <tr> - <th>Operador</th> - <th>Ús</th> - <th>Descripció</th> - </tr> - <tr> - <td><a href="#Bitwise_AND">AND binari</a></td> - <td style="white-space: nowrap;"><code>a & b</code></td> - <td> - <p>Retorna un 1 a les posicions on el bit de <code>a</code> i el bit de <code>b</code> són 1 i un 0 en totes les altres.</p> - </td> - </tr> - <tr> - <td><a href="#Bitwise_OR">OR binari</a></td> - <td style="white-space: nowrap;"><code>a | b</code></td> - <td> - <p>Retorna un 1 a les posicions on al menys la posició de <code>a</code> o la de <code>b</code> són 1.</p> - </td> - </tr> - <tr> - <td><a href="#Bitwise_XOR">XOR binari</a></td> - <td style="white-space: nowrap;"><code>a ^ b</code></td> - <td> - <p>Retorna un 1 a cada posició on <code>a</code> és 1 i <code>b</code> és 0 o bé <code>a</code> és 0 i <code>b</code> és 1.</p> - </td> - </tr> - <tr> - <td><a href="#Bitwise_NOT">NOT binari</a></td> - <td style="white-space: nowrap;"><code>~ a</code></td> - <td>Inverteix els bits de l'operand donat.</td> - </tr> - <tr> - <td><a href="#Left_shift">Desplaçament a l'esquerra</a></td> - <td style="white-space: nowrap;"><code>a << b</code></td> - <td>Desplaça els bits de <code>a</code> <code>b</code> posicions a l'esquerra, tot omplint amb zeros les primeres b posicions.</td> - </tr> - <tr> - <td><a href="#Right_shift">Desplaçament a la dreta conservant el signe</a></td> - <td style="white-space: nowrap;"><code>a >> b</code></td> - <td>Desplaça els bits de <code>a</code> <code>b</code> posicions a la dreta, descartant els bits desplaçats fora.</td> - </tr> - <tr> - <td><a href="#Unsigned_right_shift">Desplaçament a la dreta omplint amb zeros</a></td> - <td style="white-space: nowrap;"><code>a >>> b</code></td> - <td>Desplaça els bits de <code>a</code> <code>b</code> posicions a la dreta, descartant els bits desplaçats fora. Els primers <code>b</code> bits s'omplen amb zeros.</td> - </tr> - </tbody> -</table> - -<h2 id="Enters_de_32_bits_amb_signe">Enters de 32 bits amb signe</h2> - -<p>Els operands de totes les operacions de bits es converteixen a enters amb signe de 32 bits utilitzant el format de complement a 2. Això vol dir que la versió negativa d'un nombre (per exemple 5 vs -5) és exactament la mateixa representació binària però amb els bits invertits (operació de bits NOT del nombre, també coneguda com a complement del nombre) més 1. Per exemple, seguidament es mostra la representació binària de 314:</p> - -<pre>00000000000000000000000100111010 -</pre> - -<p>I a continuació <code>~314</code>, és a dir, el complement de <code>314</code>:</p> - -<pre>11111111111111111111111011000101 -</pre> - -<p>Finalment es mostra <code>-314</code>, és a dir, el complement a dos de <code>314</code>:</p> - -<pre>11111111111111111111111011000110 -</pre> - -<p>El complement a dos garanteix que el bit de més a l'esquerra sempre serà un <code>0</code> quan el nombre és positiu i un <code>1</code> quan el nombre sigui negatiu. Aquest bit és doncs anomentat el <em>bit de signe</em> degut a això.</p> - -<p>El nombre <code>0</code> es representa com a l'enter composat íntegrament de zeros a tots els seus bits.</p> - -<pre>0 (base 10) = 00000000000000000000000000000000 (base 2) -</pre> - -<p>El nombre <code>-1</code> és l'enter composats completament per 1s a tots els seus bits.</p> - -<pre>-1 (base 10) = 11111111111111111111111111111111 (base 2) -</pre> - -<p>El nombre <code>-2147483648</code> (representació hexadecimal: <code>-0x80000000</code>) és l'enter composat per zeros a tots els seus bits a excepciò del bit de més a l'esquerra, que és un 1.</p> - -<pre>-2147483648 (base 10) = 10000000000000000000000000000000 (base 2) -</pre> - -<p>El nombre <code>2147483647</code> (representació hexadecimal: <code>0x7fffffff</code>) és el sencer composat per 1 a tots els seus bits a excepció del de més a l'esquerra.</p> - -<pre>2147483647 (base 10) = 01111111111111111111111111111111 (base 2) -</pre> - -<p>Els nombres <code>-2147483648</code> i <code>2147483647</code> són els enters més petit i més gran respectivament que poden ser representats mitjançant un nombre de 32 bits amb signe.</p> - -<h2 id="Operadors_lògics_de_bits">Operadors lògics de bits</h2> - -<p>Conceptualment els operadors lògics de bits funcionen de la següent forma:</p> - -<ul> - <li>Es converteixen els operans a enters de 32 bits amb signe, expressats com una sèrie de bits (zeros i uns).</li> - <li>Cada bit del primer operand s'emparella amb el corresponent bit del segon operand: el primer bit amb el primer bit, el segon amb el segon, etcètera.</li> - <li>L'operador s'aplica per cada parella de bits, tot construint el resultat bit a bit.</li> -</ul> - -<h3 id="(AND_binari)"><a name="Bitwise_AND">& (AND binari)</a></h3> - -<p>Realitza l'operació AND a cada parella de bits. <code>a</code> AND <code>b</code> esdevindrà 1 només si ambdós <code>a</code> i <code>b</code> són 1. La taula de la veritat per a l'operació AND és la següent:</p> - -<table class="standard-table"> - <tbody> - <tr> - <td class="header">a</td> - <td class="header">b</td> - <td class="header">a AND b</td> - </tr> - <tr> - <td>0</td> - <td>0</td> - <td>0</td> - </tr> - <tr> - <td>0</td> - <td>1</td> - <td>0</td> - </tr> - <tr> - <td>1</td> - <td>0</td> - <td>0</td> - </tr> - <tr> - <td>1</td> - <td>1</td> - <td>1</td> - </tr> - </tbody> -</table> - -<pre> 9 (base 10) = 00000000000000000000000000001001 (base 2) - 14 (base 10) = 00000000000000000000000000001110 (base 2) - -------------------------------- -14 & 9 (base 10) = 00000000000000000000000000001000 (base 2) = 8 (base 10) -</pre> - -<p>Realitzar l'operació AND binària de qualsevol nombre amb el zero retornarà zero. Realitzar l'operació AND binària de qualsevol nombre amb -1 retornarà el mateix nombre.</p> - -<h3 id="(OR_binari)"><a name="Bitwise_OR">| (OR binari)</a></h3> - -<p>Realitza la operació OR a cada parella de bits. <code>a</code> OR <code>b</code> retornarà 1 si qualsevol de <code>a</code> o <code>b</code> és 1. La taula de la veritat per a l'operació OR és:</p> - -<table class="standard-table"> - <tbody> - <tr> - <td class="header">a</td> - <td class="header">b</td> - <td class="header">a OR b</td> - </tr> - <tr> - <td>0</td> - <td>0</td> - <td>0</td> - </tr> - <tr> - <td>0</td> - <td>1</td> - <td>1</td> - </tr> - <tr> - <td>1</td> - <td>0</td> - <td>1</td> - </tr> - <tr> - <td>1</td> - <td>1</td> - <td>1</td> - </tr> - </tbody> -</table> - -<pre> 9 (base 10) = 00000000000000000000000000001001 (base 2) - 14 (base 10) = 00000000000000000000000000001110 (base 2) - -------------------------------- -14 | 9 (base 10) = 00000000000000000000000000001111 (base 2) = 15 (base 10) -</pre> - -<p>Realitzar l'operació OR binària de qualsevol nombre x amb 0 retornarà x. Realitzar l'operació OR binària de qualsevol nombre x amb -1 retornarà ~x</p> - -<h3 id="(XOR_binari)"><a name="Bitwise_XOR">^ (XOR binari)</a></h3> - -<p>Realitza la operació XOR a cada parella de bits. <code>a</code> XOR <code>b</code> retorna 1 si <code>a</code> i <code>b</code> són diferents. La taula de la veritat per a l'operació XOR és la següent:</p> - -<table class="standard-table"> - <tbody> - <tr> - <td class="header">a</td> - <td class="header">b</td> - <td class="header">a XOR b</td> - </tr> - <tr> - <td>0</td> - <td>0</td> - <td>0</td> - </tr> - <tr> - <td>0</td> - <td>1</td> - <td>1</td> - </tr> - <tr> - <td>1</td> - <td>0</td> - <td>1</td> - </tr> - <tr> - <td>1</td> - <td>1</td> - <td>0</td> - </tr> - </tbody> -</table> - -<pre> 9 (base 10) = 00000000000000000000000000001001 (base 2) - 14 (base 10) = 00000000000000000000000000001110 (base 2) - -------------------------------- -14 ^ 9 (base 10) = 00000000000000000000000000000111 (base 2) = 7 (base 10) -</pre> - -<p>Realitzar l'operació XOR binària de qualsevol nombre x amb 0 retornarà x. Realitzar l'operació OR binària de qualsevol nombre x amb -1 retornarà ~x.</p> - -<h3 id="(NOT_binari)"><a name="Bitwise_NOT">~ (NOT binari)</a></h3> - -<p>Realitza una operació NOT a cada bit. NOT <code>a</code> retorna el valor invers (també conegut com el complement a 1) de <code>a</code>. La taula de la veritat per a la operació NOT és:</p> - -<table class="standard-table"> - <tbody> - <tr> - <td class="header">a</td> - <td class="header">NOT a</td> - </tr> - <tr> - <td>0</td> - <td>1</td> - </tr> - <tr> - <td>1</td> - <td>0</td> - </tr> - </tbody> -</table> - -<pre> 9 (base 10) = 00000000000000000000000000001001 (base 2) - -------------------------------- -~9 (base 10) = 11111111111111111111111111110110 (base 2) = -10 (base 10) -</pre> - -<p>Realitzar la operació NOT binària a un nombre x qualsevol retorna -(x + 1). Per exemple, ~5 resulta en -6.</p> - -<p>Exemple amb indexOf:</p> - -<pre class="brush: js">var str = 'rawr'; -var searchFor = 'a'; - -// fora alternativa equivalent a if (-1*str.indexOf('a') <= -1) -if (~str.indexOf(searchFor)) { - // searchFor és dins l'string -} else { - // searchFor no està dins l'string -} - -// valors retornats per (~str.indexOf(searchFor)) -// r == -1 -// a == -2 -// w == -3 -</pre> - -<h2 id="Operadors_binaris_de_desplaçament">Operadors binaris de desplaçament</h2> - -<p>Els operadors binaris de desplaçament accepten dos operands: el primer és el valor que serà transformat a enter de 32 bits i al que se li aplicarà el desplaçament. El segon determina el nombre de posicions que es desplaçarà cada bit. La direcció en la que els bits es desplaçaran es determina per l'operador usat.</p> - -<p>Els operadors de desplaçament converteixen els seus operands a enters de 32 bits en ordre <em>big-endian</em> i retornen un valor amb el mateix tipus que l'operand de l'esquerra. L'operand de la dreta hauria de ser menor de 32, però de no ser així només s'utilitzen els primers 5 bits.</p> - -<h3 id="<<_(Desplaçament_a_l'esquerra)"><a name="Left_shift"><< (Desplaçament a l'esquerra)</a></h3> - -<p>Aquest operador desplaça el primer operand un nombre específic de bits cap a l'esquerra. Els bits de l'esquerra sobrants són descartats. Per a omplir les primeres posicions de la dreta s'utilitzen zeros.</p> - -<p>Exemple<code>: 9 << 2</code> resulta en 36:</p> - -<pre> 9 (base 10): 00000000000000000000000000001001 (base 2) - -------------------------------- -9 << 2 (base 10): 00000000000000000000000000100100 (base 2) = 36 (base 10) -</pre> - -<p>Desplaçar a l'esquerra qualsevol nombre <strong>x</strong> <strong>y</strong> bits resulta en <strong>x * 2^y</strong>.</p> - -<h3 id=">>_(Desplaçament_a_la_dreta_preservant_el_signe)"><a name="Right_shift">>> (Desplaçament a la dreta preservant el signe)</a></h3> - -<p>Aquest operador desplaça el primer operand un nombre específic de bits a la dreta. Els bits sobrants es descarten. Els bits de l'esquerra s'inicialitzen amb el valor inicial del primer bit de l'esquerra. Degut a que el bit de més a l'esquerra tindrà el mateix valor que el bit de més a l'esquerra abans de realitzar el desplaçament, el bit de signe no canvia. És degut a aquesta propietat que es diu que aquest operand preserva el signe.</p> - -<p>Per exemple, <code>9 >> 2</code> resulta en 2:</p> - -<pre> 9 (base 10): 00000000000000000000000000001001 (base 2) - -------------------------------- -9 >> 2 (base 10): 00000000000000000000000000000010 (base 2) = 2 (base 10) -</pre> - -<p>De la mateixa manera, <code>-9 >> 2</code> resulta en -3, ja que el signe es preserva:</p> - -<pre> -9 (base 10): 11111111111111111111111111110111 (base 2) - -------------------------------- --9 >> 2 (base 10): 11111111111111111111111111111101 (base 2) = -3 (base 10) -</pre> - -<h3 id=">>>_(Desplaçament_a_la_dreta_omplint_amb_zeros)"><a name="Unsigned_right_shift">>>> (Desplaçament a la dreta omplint amb zeros)</a></h3> - -<p>Aquest operador desplaça el primer operand un nombre específic de bits cap a la dreta. Els bits sobrants degut al desplaçament són descartats. Els bits de l'esquerra són omplerts utilitzant zeros. Com que el bit de signe sempre acaba sent un zero el resultat sempre és no negatiu.</p> - -<p>Per a nombres no negatius, els operadors de desplaçament a la dreta preservant el signe i omplint amb zeros retornen el mateix resultat. Per exemple, <code>9 >>> 2</code> resulta en 2, tal com <code>9 >> 2</code>:</p> - -<pre> 9 (base 10): 00000000000000000000000000001001 (base 2) - -------------------------------- -9 >>> 2 (base 10): 00000000000000000000000000000010 (base 2) = 2 (base 10) -</pre> - -<p>El resultat varia, però, per a nombres negatius. Per exemple, <code>-9 >>> 2</code> resulta en 1073741821, el qual es diferent de <code>-9 >> 2</code> (que retorna -3):</p> - -<pre> -9 (base 10): 11111111111111111111111111110111 (base 2) - -------------------------------- --9 >>> 2 (base 10): 00111111111111111111111111111101 (base 2) = 1073741821 (base 10) -</pre> - -<h2 id="Exemples">Exemples</h2> - -<h3 id="Exemple_Marques_i_màscares_de_bits">Exemple: Marques i màscares de bits</h3> - -<p>Els operadors lògics de bits s'empren tot sovint per a crear, manipular i llegir seqüències de <em>marques</em>, les quals realitzen uns funció similar a les variables booleanes. El seu avantatge davant les variables booleanes és que les seqüències de marques utilitzen molta menys memòria (per un factor de 32).</p> - -<p>The bitwise logical operators are often used to create, manipulate, and read sequences of <em>flags</em>, which are like binary variables. Variables could be used instead of these sequences, but binary flags take much less memory (by a factor of 32).</p> - -<p>Suposem 4 marques:</p> - -<ul> - <li>Marca A: tenim un problema de formigues</li> - <li>Marca B: tenim un ratpenat</li> - <li>Marca C: tenim un gat</li> - <li>Marca D: tenim un ànec</li> -</ul> - -<p>Aquestes marques són representades per una seqüència de bits: DCBA. Quan una marca està activada, té un valor de 1. Quan una marca no està activa rep un valor de 0. Suposem que una variable anomenada <code>flags</code> (marques en anglès) té el valor binari 0101:</p> - -<pre class="brush: js">var flags = 5; // 0101 en binari -</pre> - -<p>Aquest valor indica:</p> - -<ul> - <li>La marca A està activa, és a dir, és certa (tenim un problema de formigues)</li> - <li>La marca B és falsa (no tenim un murisec)</li> - <li>La marca C és certa (tenim un gat)</li> - <li>La marca D és falsa (no tenim un ànec)</li> -</ul> - -<p>Com que les operacions be bits utilitzen nombres de 32 bits, 0101 és en realitat 00000000000000000000000000000101, però els zeros a l'esquerra es poden obviar ja que no contenen informació útil.</p> - -<p>Una <em>màscara de bits</em> és una seqüència que pot manipular i/o llegir marques. És molt comú definir màscares "primitives" per a cada marca:</p> - -<pre class="brush: js">var FLAG_A = 1; // 0001 -var FLAG_B = 2; // 0010 -var FLAG_C = 4; // 0100 -var FLAG_D = 8; // 1000 -</pre> - -<p>Es fàcil crear noves màscares mitjançant operacions de bits lògiques sobre les màscares primitives. Per exemple, la màscara de bits 1011 es pot crear mitjançant operacions OR sobre FLAG_A, FLAG_B i FLAG_D:</p> - -<pre class="brush: js">var mask = FLAG_A | FLAG_B | FLAG_D; // 0001 | 0010 | 1000 => 1011 -</pre> - -<p>Els valors individuals d'una marca es poden obtindre mitjançant una operació AND de la seqüència de marques amb la màscara primitiva corresponent. La màscara de bits descarta els bits de les marques que no s'escauen. Per exemple, la màscara de bits 0100 es pot emprar per veure si la marca C està activa:</p> - -<pre class="brush: js">// si tenim un gat... -if (flags & FLAG_C) { // 0101 & 0100 => 0100 => true - // ... fer coses -} -</pre> - -<p>Una màscara de bits amb múltiples marques activades funciona com un "or". Per exemple els següents dos blocs de codi són equivalents:</p> - -<pre class="brush: js">// si tenim un ratpenat o un gat... -// (0101 & 0010) || (0101 & 0100) => 0000 || 0100 => true -if ((flags & FLAG_B) || (flags & FLAG_C)) { - // ... fer coses -} -</pre> - -<pre class="brush: js">// si tenim un ratpenat o un gat... -var mask = FLAG_B | FLAG_C; // 0010 | 0100 => 0110 -if (flags & mask) { // 0101 & 0110 => 0100 => true - // ... fer coses -} -</pre> - -<p>Les marques es poden activar mitjançant una operació OR amb la màscara, on cada bit amb el valor 1 activarà la marca corresponent si no està ja activada. Per exemple, la màscara de bits 1100 pot ser emprada per a activar les marques C i D:</p> - -<pre class="brush: js">// si, tenim un gat i un ànec -var mask = FLAG_C | FLAG_D; // 0100 | 1000 => 1100 -flags |= mask; // 0101 | 1100 => 1101 -</pre> - -<p>Les marques es poden desactivar mitjançant una operació AND amb una màscara de bits, on cada bit amb el valor de zero desactivarà la marca corresponent si no està ja desactivada. Aquestes màscares poden generar-se fàcilment mitjançant una operació NOT sobre la màscara primitiva adient. Per exemple, la màscara 1010 pot ser emprada per a desactivar les marques A i C:</p> - -<pre class="brush: js">// no, no tenim un problema amb formigues ni tenim un gat -var mask = ~(FLAG_A | FLAG_C); // ~0101 => 1010 -flags &= mask; // 1101 & 1010 => 1000 -</pre> - -<p>També es podría haver creat la màscara amb <code>~FLAG_A & ~FLAG_C</code> (Llei de De Morgan):</p> - -<pre class="brush: js">// no, no tenim un problema amb formigues ni tenim un gat -var mask = ~FLAG_A & ~FLAG_C; -flags &= mask; // 1101 & 1010 => 1000 -</pre> - -<p>Es pot invertir una màscara (entenem per invertir activar-la si està desactivada i desactivar-la si està activada. És a dir, invertir el seu valor) mitjançant una operació XOR amb una màscara de bits, on cada bit amb el valor 1 invertirà el valor de la marca corresponent. Per exemple, la màscara de bits 0110 pot ser emprada per invertir les marques B i C:</p> - -<pre class="brush: js">// Si no teniem un ratpenat, ara en tenim un -// i si en teniem un, adéu ratpenat -// El mateix amb els gats -var mask = FLAG_B | FLAG_C; -flags = flags ^ mask; // 1100 ^ 0110 => 1010 -</pre> - -<p>Finalment, les marques poden ser invertides mitjançant l'operador NOT:</p> - -<pre class="brush: js">// entrant a l'univers paral·lel -flags = ~flags; // ~1010 => 0101 -</pre> - -<h3 id="Xuletes_per_conversions">Xuletes per conversions</h3> - -<p>Converteix un <code><a href="/en-US/docs/Web/JavaScript/Reference/Global_Objects/String" title="/en-US/docs/JavaScript/Reference/Global_Objects/String">String</a></code> binari a un <code><a href="/en-US/docs/Web/JavaScript/Reference/Global_Objects/Number" title="/en-US/docs/JavaScript/Reference/Global_Objects/Number">Number</a></code> decimal:</p> - -<pre class="brush: js">var sBinString = "1011"; -var nMyNumber = parseInt(sBinString, 2); -alert(nMyNumber); // prints 11, i.e. 1011 -</pre> - -<p>Converteix un <code><a href="/en-US/docs/Web/JavaScript/Reference/Global_Objects/Number" title="/en-US/docs/JavaScript/Reference/Global_Objects/Number">Number</a></code> decimal en un <code><a href="/en-US/docs/Web/JavaScript/Reference/Global_Objects/String" title="/en-US/docs/JavaScript/Reference/Global_Objects/String">String</a></code> binari:</p> - -<pre class="brush: js">var nMyNumber = 11; -var sBinString = nMyNumber.toString(2); -alert(sBinString); // prints 1011, i.e. 11 -</pre> - -<h3 id="Automatització_de_la_creació_de_màscares">Automatització de la creació de màscares</h3> - -<p>El procés de creació de màscares per a valors <code><a href="/en-US/docs/Web/JavaScript/Reference/Global_Objects/Boolean" title="/en-US/docs/JavaScript/Reference/Global_Objects/Boolean">Booleans</a></code> pot ser automatitzat:</p> - -<pre class="brush: js">function createMask () { - var nMask = 0, nFlag = 0, nLen = arguments.length > 32 ? 32 : arguments.length; - for (nFlag; nFlag < nLen; nMask |= arguments[nFlag] << nFlag++); - return nMask; -} -var mask1 = createMask(true, true, false, true); // 11, i.e.: 1011 -var mask2 = createMask(false, false, true); // 4, i.e.: 0100 -var mask3 = createMask(true); // 1, i.e.: 0001 -// etc. - -alert(mask1); // prints 11, i.e.: 1011 -</pre> - -<h3 id="Algorisme_invers_un_array_de_booleans_a_partir_d'una_màscara">Algorisme invers: un array de booleans a partir d'una màscara</h3> - -<p>El codi següent crea un <code><a href="/en-US/docs/Web/JavaScript/Reference/Global_Objects/Array" title="/en-US/docs/JavaScript/Reference/Global_Objects/Array">Array</a></code> de <code><a href="/en-US/docs/Web/JavaScript/Reference/Global_Objects/Boolean" title="/en-US/docs/JavaScript/Reference/Global_Objects/Boolean">Booleans</a></code> a partir d'una màscara:</p> - -<pre class="brush: js">function arrayFromMask (nMask) { - // nMask must be between -2147483648 and 2147483647 - if (nMask > 0x7fffffff || nMask < -0x80000000) { - throw new TypeError("arrayFromMask - out of range"); - } - for (var nShifted = nMask, aFromMask = []; nShifted; - aFromMask.push(Boolean(nShifted & 1)), nShifted >>>= 1); - return aFromMask; -} - -var array1 = arrayFromMask(11); -var array2 = arrayFromMask(4); -var array3 = arrayFromMask(1); - -alert("[" + array1.join(", ") + "]"); -// prints "[true, true, false, true]", i.e.: 11, i.e.: 1011 -</pre> - -<p>Ambdós algorismes poden ser testejats a l'hora...</p> - -<pre class="brush: js">var nTest = 19; // la nostra màscara personal -var nResult = createMask.apply(this, arrayFromMask(nTest)); - -alert(nResult); // 19 -</pre> - -<p>Només amb finalitat didàctica (ja que disposem del mètode<code> <a href="/en-US/docs/Web/JavaScript/Reference/Global_Objects/Number/toString" title="/en-US/docs/JavaScript/Reference/Global_Objects/Number/toString">Number.toString(2)</a></code>), es mostra com és posible modficiar l'algorisme <code>arrayFromMask</code> per a crear un <code><a href="/en-US/docs/Web/JavaScript/Reference/Global_Objects/String" title="/en-US/docs/JavaScript/Reference/Global_Objects/String">String</a></code> que contingui la representació d'un <code><a href="/en-US/docs/Web/JavaScript/Reference/Global_Objects/Number" title="/en-US/docs/JavaScript/Reference/Global_Objects/Number">Number</a></code> en comptes d'un <code><a href="/en-US/docs/Web/JavaScript/Reference/Global_Objects/Array" title="/en-US/docs/JavaScript/Reference/Global_Objects/Array">Array</a></code> de <code><a href="/en-US/docs/Web/JavaScript/Reference/Global_Objects/Boolean" title="/en-US/docs/JavaScript/Reference/Global_Objects/Boolean">Booleans</a></code>:</p> - -<pre class="brush: js">function createBinaryString (nMask) { - // nMask ha d'estar entre -2147483648 i 2147483647 - for (var nFlag = 0, nShifted = nMask, sMask = ""; nFlag < 32; - nFlag++, sMask += String(nShifted >>> 31), nShifted <<= 1); - return sMask; -} - -var string1 = createBinaryString(11); -var string2 = createBinaryString(4); -var string3 = createBinaryString(1); - -alert(string1); -// prints 00000000000000000000000000001011, i.e. 11 -</pre> - -<h2 id="Specifications">Specifications</h2> - -<table class="standard-table"> - <tbody> - <tr> - <th scope="col">Especificació</th> - <th scope="col">Estat</th> - <th scope="col">Comentari</th> - </tr> - <tr> - <td>ECMAScript 1a Edició.</td> - <td>Standard</td> - <td>Definició inicial</td> - </tr> - <tr> - <td>{{SpecName('ES5.1', '#sec-11.4.8', 'Bitwise NOT operator')}}<br> - {{SpecName('ES5.1', '#sec-11.7', 'Bitwise shift operators')}}<br> - {{SpecName('ES5.1', '#sec-11.10', 'Binary bitwise operators')}}</td> - <td>{{Spec2('ES5.1')}}</td> - <td> </td> - </tr> - <tr> - <td>{{SpecName('ES6', '#sec-bitwise-not-operator', 'Bitwise NOT operator')}}<br> - {{SpecName('ES6', '#sec-bitwise-shift-operators', 'Bitwise shift operators')}}<br> - {{SpecName('ES6', '#sec-binary-bitwise-operators', 'Binary bitwise operators')}}</td> - <td>{{Spec2('ES6')}}</td> - <td> </td> - </tr> - </tbody> -</table> - -<h2 id="Compatibilitat_amb_navegadors">Compatibilitat amb navegadors</h2> - -<p>{{ CompatibilityTable() }}</p> - -<div id="compat-desktop"> -<table class="compat-table"> - <tbody> - <tr> - <th>Característiques</th> - <th>Chrome</th> - <th>Firefox (Gecko)</th> - <th>Internet Explorer</th> - <th>Opera</th> - <th>Safari</th> - </tr> - <tr> - <td><a href="#Bitwise_NOT">Bitwise NOT (<code>~</code>)</a></td> - <td>{{ CompatVersionUnknown() }}</td> - <td>{{ CompatVersionUnknown() }}</td> - <td>{{ CompatVersionUnknown() }}</td> - <td>{{ CompatVersionUnknown() }}</td> - <td>{{ CompatVersionUnknown() }}</td> - </tr> - <tr> - <td><a href="#Bitwise_AND">Bitwise AND (<code>&</code>)</a></td> - <td>{{ CompatVersionUnknown() }}</td> - <td>{{ CompatVersionUnknown() }}</td> - <td>{{ CompatVersionUnknown() }}</td> - <td>{{ CompatVersionUnknown() }}</td> - <td>{{ CompatVersionUnknown() }}</td> - </tr> - <tr> - <td><a href="#Bitwise_OR">Bitwise OR (<code>|</code>)</a></td> - <td>{{ CompatVersionUnknown() }}</td> - <td>{{ CompatVersionUnknown() }}</td> - <td>{{ CompatVersionUnknown() }}</td> - <td>{{ CompatVersionUnknown() }}</td> - <td>{{ CompatVersionUnknown() }}</td> - </tr> - <tr> - <td><a href="#Bitwise_XOR">Bitwise XOR (<code>^</code>)</a></td> - <td>{{ CompatVersionUnknown() }}</td> - <td>{{ CompatVersionUnknown() }}</td> - <td>{{ CompatVersionUnknown() }}</td> - <td>{{ CompatVersionUnknown() }}</td> - <td>{{ CompatVersionUnknown() }}</td> - </tr> - <tr> - <td><a href="#Left_shift">Left shift (<code><<</code>)</a></td> - <td>{{ CompatVersionUnknown() }}</td> - <td>{{ CompatVersionUnknown() }}</td> - <td>{{ CompatVersionUnknown() }}</td> - <td>{{ CompatVersionUnknown() }}</td> - <td>{{ CompatVersionUnknown() }}</td> - </tr> - <tr> - <td><a href="#Right_shift">Right shift (<code>>></code>)</a></td> - <td>{{ CompatVersionUnknown() }}</td> - <td>{{ CompatVersionUnknown() }}</td> - <td>{{ CompatVersionUnknown() }}</td> - <td>{{ CompatVersionUnknown() }}</td> - <td>{{ CompatVersionUnknown() }}</td> - </tr> - <tr> - <td><a href="#Unsigned_right_shift">Unsigned right shift (<code>>>></code>)</a></td> - <td>{{ CompatVersionUnknown() }}</td> - <td>{{ CompatVersionUnknown() }}</td> - <td>{{ CompatVersionUnknown() }}</td> - <td>{{ CompatVersionUnknown() }}</td> - <td>{{ CompatVersionUnknown() }}</td> - </tr> - </tbody> -</table> -</div> - -<div id="compat-mobile"> -<table class="compat-table"> - <tbody> - <tr> - <th>Característica</th> - <th>Android</th> - <th>Chrome for Android</th> - <th>Firefox Mobile (Gecko)</th> - <th>IE Mobile</th> - <th>Opera Mobile</th> - <th>Safari Mobile</th> - </tr> - <tr> - <td><a href="#Bitwise_NOT">Bitwise NOT (<code>~</code>)</a></td> - <td>{{ CompatVersionUnknown() }}</td> - <td>{{ CompatVersionUnknown() }}</td> - <td>{{ CompatVersionUnknown() }}</td> - <td>{{ CompatVersionUnknown() }}</td> - <td>{{ CompatVersionUnknown() }}</td> - <td>{{ CompatVersionUnknown() }}</td> - </tr> - <tr> - <td><a href="#Bitwise_AND">Bitwise AND (<code>&</code>)</a></td> - <td>{{ CompatVersionUnknown() }}</td> - <td>{{ CompatVersionUnknown() }}</td> - <td>{{ CompatVersionUnknown() }}</td> - <td>{{ CompatVersionUnknown() }}</td> - <td>{{ CompatVersionUnknown() }}</td> - <td>{{ CompatVersionUnknown() }}</td> - </tr> - <tr> - <td><a href="#Bitwise_OR">Bitwise OR (<code>|</code>)</a></td> - <td>{{ CompatVersionUnknown() }}</td> - <td>{{ CompatVersionUnknown() }}</td> - <td>{{ CompatVersionUnknown() }}</td> - <td>{{ CompatVersionUnknown() }}</td> - <td>{{ CompatVersionUnknown() }}</td> - <td>{{ CompatVersionUnknown() }}</td> - </tr> - <tr> - <td><a href="#Bitwise_XOR">Bitwise XOR (<code>^</code>)</a></td> - <td>{{ CompatVersionUnknown() }}</td> - <td>{{ CompatVersionUnknown() }}</td> - <td>{{ CompatVersionUnknown() }}</td> - <td>{{ CompatVersionUnknown() }}</td> - <td>{{ CompatVersionUnknown() }}</td> - <td>{{ CompatVersionUnknown() }}</td> - </tr> - <tr> - <td><a href="#Left_shift">Left shift (<code><<</code>)</a></td> - <td>{{ CompatVersionUnknown() }}</td> - <td>{{ CompatVersionUnknown() }}</td> - <td>{{ CompatVersionUnknown() }}</td> - <td>{{ CompatVersionUnknown() }}</td> - <td>{{ CompatVersionUnknown() }}</td> - <td>{{ CompatVersionUnknown() }}</td> - </tr> - <tr> - <td><a href="#Right_shift">Right shift (<code>>></code>)</a></td> - <td>{{ CompatVersionUnknown() }}</td> - <td>{{ CompatVersionUnknown() }}</td> - <td>{{ CompatVersionUnknown() }}</td> - <td>{{ CompatVersionUnknown() }}</td> - <td>{{ CompatVersionUnknown() }}</td> - <td>{{ CompatVersionUnknown() }}</td> - </tr> - <tr> - <td><a href="#Unsigned_right_shift">Unsigned right shift (<code>>>></code>)</a></td> - <td>{{ CompatVersionUnknown() }}</td> - <td>{{ CompatVersionUnknown() }}</td> - <td>{{ CompatVersionUnknown() }}</td> - <td>{{ CompatVersionUnknown() }}</td> - <td>{{ CompatVersionUnknown() }}</td> - <td>{{ CompatVersionUnknown() }}</td> - </tr> - </tbody> -</table> -</div> - -<h2 id="See_also" name="See_also">Vegeu també</h2> - -<ul> - <li><a href="/en-US/docs/Web/JavaScript/Reference/Operators/Logical_Operators">Operadors lògics</a></li> -</ul> diff --git a/files/ca/web/javascript/referencia/operadors/logical_operators/index.html b/files/ca/web/javascript/referencia/operadors/logical_operators/index.html deleted file mode 100644 index 591e1fbc4f..0000000000 --- a/files/ca/web/javascript/referencia/operadors/logical_operators/index.html +++ /dev/null @@ -1,302 +0,0 @@ ---- -title: Operadors Lògics -slug: Web/JavaScript/Referencia/Operadors/Logical_Operators -translation_of: Web/JavaScript/Reference/Operators -translation_of_original: Web/JavaScript/Reference/Operators/Logical_Operators ---- -<div> -<div>{{jsSidebar("Operators")}}</div> -</div> - -<h2 id="Summary" name="Summary">Resum</h2> - -<p>Els operadors lògics s'utilitzen normalment amb valors <code><a href="/en-US/docs/Web/JavaScript/Reference/Global_Objects/Boolean">Boolean</a></code> (lògics). En cas de serh-hi presents, retornen un valor booleà. Tot i així, els operadors <code>&&</code> i <code>||</code> retornen el valor d'un dels operands especificats, així que si aquests operadors es fan servir amb valors no booleans, poden retornar un valor no booleà.</p> - -<h2 id="Descripció">Descripció</h2> - -<p>Els operadors lògics es descriuren en la taula següent:</p> - -<table class="fullwidth-table"> - <tbody> - <tr> - <th>Operador</th> - <th>Ús</th> - <th>Descripció</th> - </tr> - <tr> - <td>AND lògic (<code>&&</code>)</td> - <td><code><em>expr1</em> && <em>expr2</em></code></td> - <td>Retorna <code>expr1 </code>si es pot convertir en false; sinó, retorna expr2. Així, quan es fa servir amb valors booleans, <code>&&</code> retorna true si ambdós operands són true; de ser el contrari, retorna false.</td> - </tr> - <tr> - <td>OR lògic(<code>||</code>)</td> - <td><code><em>expr1</em> || <em>expr2</em></code></td> - <td>Retorna <code>expr1</code> si es pot converir en true; de ser al contrari, retorna <code>expr2</code>. Així, quan s'usa amb valors Booleans, <code>||</code> retorna true si l'operand és true; si amdós són false, retorna false.</td> - </tr> - <tr> - <td>NOT lògic (<code>!</code>)</td> - <td><code>!<em>expr</em></code></td> - <td>Retorna false si el seu únic operand pot convertir-se a true; sinó, retorna true.</td> - </tr> - </tbody> -</table> - -<p>Exemples d'expressions que es poden converir a false son aquelles que avaluen <code>null</code>, <code>0</code>, la cadena buida (""), o <code>undefined</code>.</p> - -<p>Tot i que els operadors <code>&&</code> i <code>||</code> es poden fer servir amb operands que no siguin valors Booleans, poden ser considerats operadors Booleans ja que els valors que retornen sempre es poden convertir en valors Booleans.</p> - -<h3 id="Short-Circuit_Evaluation" name="Short-Circuit_Evaluation">Avaluació de tipus curtcircuit</h3> - -<p>Com a expressions lògiques que són, s'avaluen d'esquerra a dreta, they are tested for possible "short-circuit" evaluation fent servir les regles següents:</p> - -<ul> - <li><code>false && (<em>quelcom)</em></code> is short-circuit evaluated to false.</li> - <li><code>true || (<em>quelcom)</em></code> is short-circuit evaluated to true.</li> -</ul> - -<p>Les regles de la lògica garanteixen que aquestes avaluacions són sempre correctes. Fixeu-vos que la part <code><em>quelcom</em></code> d'adalt no s'avalua, així que els efectes secundaris d'això no tindràn efecte. Fixeu-vos també que la part de l'expressió de dalt anomenada <code><em>quelcom </em></code>és una expressió lògica simple (com s'indiquen amb els parèntesis).</p> - -<p>Per exemple, les dues funcions següents són equivalents.</p> - -<pre class="brush: js">function shortCircuitEvaluation() { - doSomething() || doSomethingElse() -} - -function equivalentEvaluation() { - var flag = doSomething(); - if (!flag) { - doSomethingElse(); - } -} -</pre> - -<p>Tot i així, les següents expressions no són equivalents degut a la <a href="/en-US/docs/Web/JavaScript/Reference/Operators/Operator_Precedence">precendència dels operadors</a>, i remarca la importància de requerir que l'operador de la dreta sigui una sola expressió (agrupada, si s'escau, per parèntesi).</p> - -<pre class="brush: js">false && true || true // returns true -false && (true || true) // returns false</pre> - -<h3 id="Logical_AND_.28&&.29" name="Logical_AND_.28&&.29"><a name="Logical_AND">AND lògic (<code>&&</code>)</a></h3> - -<p>El codi següent mostra exemples de l'operador <code>&&</code> (AND lògic).</p> - -<pre class="brush: js">a1 = true && true // t && t returns true -a2 = true && false // t && f returns false -a3 = false && true // f && t returns false -a4 = false && (3 == 4) // f && f returns false -a5 = "Cat" && "Dog" // t && t returns "Dog" -a6 = false && "Cat" // f && t returns false -a7 = "Cat" && false // t && f returns false -</pre> - -<h3 id="OR_lògic_()"><a name="Logical_OR">OR lògic (<code>||</code>)</a></h3> - -<p>El codi següent mostra exemples de l'operador <code>||</code> (OR lògic).</p> - -<pre class="brush: js">o1 = true || true // t || t returns true -o2 = false || true // f || t returns true -o3 = true || false // t || f returns true -o4 = false || (3 == 4) // f || f returns false -o5 = "Cat" || "Dog" // t || t returns "Cat" -o6 = false || "Cat" // f || t returns "Cat" -o7 = "Cat" || false // t || f returns "Cat" -</pre> - -<h3 id="Logical_NOT_.28.21.29" name="Logical_NOT_.28.21.29"><a name="Logical_NOT">NOT lògic (<code>!</code>)</a></h3> - -<p>El codi següent mostra exemples de l'operador <code>!</code> (NOT lògic).</p> - -<pre class="brush: js">n1 = !true // !t returns false -n2 = !false // !f returns true -n3 = !"Cat" // !t returns false -</pre> - -<h3 id="Regles_de_conversió">Regles de conversió</h3> - -<h4 id="Convertir_AND_a_OR">Convertir AND a OR</h4> - -<p>L'operació següent que inclou Booleans:</p> - -<pre class="brush: js">bCondition1 && bCondition2</pre> - -<p>sempre és igual a:</p> - -<pre class="brush: js">!(!bCondition1 || !bCondition2)</pre> - -<h4 id="Convertir_OR_a_AND">Convertir OR a AND</h4> - -<p>L'operació següent que inclou Booleans:</p> - -<pre class="brush: js">bCondition1 || bCondition2</pre> - -<p>sempre és igual a:</p> - -<pre class="brush: js">!(!bCondition1 && !bCondition2)</pre> - -<h3 id="Desfer-se_de_parèntesis_aniuats">Desfer-se de parèntesis aniuats</h3> - -<p>Com que les expressions lògiques s'avaluen d'esquerra a dreta, sempre és posible esborrar els parèntesi d'expressions complexes mitjançant les regles següents.</p> - -<h4 id="Desfer-se_d'un_AND_aniuat">Desfer-se d'un AND aniuat</h4> - -<p>L'operació següent que inclou Booleans:</p> - -<pre class="brush: js">bCondition1 || (bCondition2 && bCondition3)</pre> - -<p>sempre és igual a:</p> - -<pre class="brush: js">bCondition1 || bCondition2 && bCondition3</pre> - -<h4 id="Desfer-se_d'un_OR_aniuat">Desfer-se d'un OR aniuat</h4> - -<p>L'operació següent que inclou Booleans:</p> - -<pre class="brush: js">bCondition1 && (bCondition2 || bCondition3)</pre> - -<p>sempre és igual a:</p> - -<pre class="brush: js">!(!bCondition1 || !bCondition2 && !bCondition3)</pre> - -<h2 id="Especificacions">Especificacions</h2> - -<table class="standard-table"> - <tbody> - <tr> - <th scope="col">Especificació</th> - <th scope="col">Estat</th> - <th scope="col">Comentari</th> - </tr> - <tr> - <td>1a edició de ECMAScript.</td> - <td>Estàndard</td> - <td>Definició inicial.</td> - </tr> - <tr> - <td>{{SpecName('ES5.1', '#sec-11.4.9', 'Logical NOT Operator')}}<br> - {{SpecName('ES5.1', '#sec-11.11', 'Binary Logical Operators')}}</td> - <td>{{Spec2('ES5.1')}}</td> - <td> </td> - </tr> - <tr> - <td>{{SpecName('ES6', '#sec-logical-not-operator', 'Logical NOT operator')}}<br> - {{SpecName('ES6', '#sec-binary-logical-operators', 'Binary Logical Operators')}}</td> - <td>{{Spec2('ES6')}}</td> - <td> </td> - </tr> - </tbody> -</table> - -<h2 id="Compatibilitat_amb_navegadors">Compatibilitat amb navegadors</h2> - -<p>{{ CompatibilityTable() }}</p> - -<div id="compat-desktop"> -<table class="compat-table"> - <tbody> - <tr> - <th>Característica</th> - <th>Chrome</th> - <th>Firefox (Gecko)</th> - <th>Internet Explorer</th> - <th>Opera</th> - <th>Safari</th> - </tr> - <tr> - <td><a href="#Logical_AND">AND lògic (<code>&&</code>)</a></td> - <td>{{ CompatVersionUnknown() }}</td> - <td>{{ CompatVersionUnknown() }}</td> - <td>{{ CompatVersionUnknown() }}</td> - <td>{{ CompatVersionUnknown() }}</td> - <td>{{ CompatVersionUnknown() }}</td> - </tr> - <tr> - <td><a href="#Logical_OR">OR </a><a href="#Logical_AND">lògic </a><a href="#Logical_OR">(<code>||</code>)</a></td> - <td>{{ CompatVersionUnknown() }}</td> - <td>{{ CompatVersionUnknown() }}</td> - <td>{{ CompatVersionUnknown() }}</td> - <td>{{ CompatVersionUnknown() }}</td> - <td>{{ CompatVersionUnknown() }}</td> - </tr> - <tr> - <td><a href="#Logical_NOT">NOT </a><a href="#Logical_AND">lògic</a><a href="#Logical_NOT"> (<code>!</code>)</a></td> - <td>{{ CompatVersionUnknown() }}</td> - <td>{{ CompatVersionUnknown() }}</td> - <td>{{ CompatVersionUnknown() }}</td> - <td>{{ CompatVersionUnknown() }}</td> - <td>{{ CompatVersionUnknown() }}</td> - </tr> - </tbody> -</table> -</div> - -<div id="compat-mobile"> -<table class="compat-table"> - <tbody> - <tr> - <th>Característica</th> - <th>Android</th> - <th>Chrome per Android</th> - <th>Firefox Mobile (Gecko)</th> - <th>IE Mobile</th> - <th>Opera Mobile</th> - <th>Safari Mobile</th> - </tr> - <tr> - <td><a href="#Logical_AND">AND </a><a href="#Logical_AND">lògic</a><a href="#Logical_AND"> (<code>&&</code>)</a></td> - <td>{{ CompatVersionUnknown() }}</td> - <td>{{ CompatVersionUnknown() }}</td> - <td>{{ CompatVersionUnknown() }}</td> - <td>{{ CompatVersionUnknown() }}</td> - <td>{{ CompatVersionUnknown() }}</td> - <td>{{ CompatVersionUnknown() }}</td> - </tr> - <tr> - <td><a href="#Logical_OR">OR </a><a href="#Logical_AND">lògic </a><a href="#Logical_OR">(<code>||</code>)</a></td> - <td>{{ CompatVersionUnknown() }}</td> - <td>{{ CompatVersionUnknown() }}</td> - <td>{{ CompatVersionUnknown() }}</td> - <td>{{ CompatVersionUnknown() }}</td> - <td>{{ CompatVersionUnknown() }}</td> - <td>{{ CompatVersionUnknown() }}</td> - </tr> - <tr> - <td><a href="#Logical_NOT">NOT </a><a href="#Logical_AND">lògic</a><a href="#Logical_NOT"> (<code>!</code>)</a></td> - <td>{{ CompatVersionUnknown() }}</td> - <td>{{ CompatVersionUnknown() }}</td> - <td>{{ CompatVersionUnknown() }}</td> - <td>{{ CompatVersionUnknown() }}</td> - <td>{{ CompatVersionUnknown() }}</td> - <td>{{ CompatVersionUnknown() }}</td> - </tr> - </tbody> -</table> -</div> - -<h3 id="JavaScript_1.0_and_1.1" name="JavaScript_1.0_and_1.1">Compatibilitat amb versions anteriors: Comportament a JavaScript 1.0 i 1.1</h3> - -<p>Els operadors && i <code>||</code> es comporten de la forma següent:</p> - -<table class="fullwidth-table"> - <tbody> - <tr> - <th>Operador</th> - <th>Ús</th> - <th>Comportament</th> - </tr> - <tr> - <td><code>&&</code></td> - <td><code><em>expr1</em> && <em>expr2</em></code></td> - <td>Si el primer operand (<code>expr1</code>) es pot converitr a false, l'operador <code>&&</code> retorna false en comptes del valor de <code>expr1</code>.</td> - </tr> - <tr> - <td><code>||</code></td> - <td><code><em>expr1</em> || <em>expr2</em></code></td> - <td>Si el primer operand (<code>expr1</code>) es pot converitr a true, l'operador <code>||</code> retorna true en comptes del valor de <code>expr1</code>.</td> - </tr> - </tbody> -</table> - -<h2 id="See_also" name="See_also">Vegeu també</h2> - -<ul> - <li><a href="/en-US/docs/Web/JavaScript/Reference/Operators/Bitwise_Operators">Bitwise operators</a></li> -</ul> |