From cb9e359a51c3249d8f5157db69d43fd413ddeda6 Mon Sep 17 00:00:00 2001 From: Florian Merz Date: Thu, 11 Feb 2021 14:45:12 +0100 Subject: unslug ca: move --- files/ca/web/javascript/reference/about/index.html | 44 ++ .../reference/classes/constructor/index.html | 129 ++++++ .../ca/web/javascript/reference/classes/index.html | 382 ++++++++++++++++ .../javascript/reference/classes/static/index.html | 116 +++++ .../reference/errors/nomes-lectura/index.html | 78 ---- .../reference/errors/read-only/index.html | 78 ++++ .../reference/functions/parameters_rest/index.html | 156 ------- .../reference/functions/rest_parameters/index.html | 156 +++++++ .../global_objects/array/entries/index.html | 105 +++++ .../global_objects/array/every/index.html | 220 ++++++++++ .../reference/global_objects/array/fill/index.html | 173 ++++++++ .../global_objects/array/filter/index.html | 213 +++++++++ .../reference/global_objects/array/find/index.html | 191 ++++++++ .../global_objects/array/findindex/index.html | 173 ++++++++ .../global_objects/array/foreach/index.html | 238 ++++++++++ .../global_objects/array/includes/index.html | 158 +++++++ .../reference/global_objects/array/index.html | 482 +++++++++++++++++++++ .../global_objects/array/indexof/index.html | 235 ++++++++++ .../global_objects/array/isarray/index.html | 135 ++++++ .../reference/global_objects/array/join/index.html | 123 ++++++ .../reference/global_objects/array/keys/index.html | 115 +++++ .../global_objects/array/lastindexof/index.html | 197 +++++++++ .../global_objects/array/length/index.html | 128 ++++++ .../reference/global_objects/array/map/index.html | 317 ++++++++++++++ .../reference/global_objects/array/of/index.html | 120 +++++ .../reference/global_objects/array/pop/index.html | 123 ++++++ .../reference/global_objects/array/push/index.html | 146 +++++++ .../global_objects/array/reduce/index.html | 304 +++++++++++++ .../global_objects/array/reverse/index.html | 119 +++++ .../global_objects/array/shift/index.html | 129 ++++++ .../global_objects/array/slice/index.html | 268 ++++++++++++ .../reference/global_objects/array/some/index.html | 213 +++++++++ .../global_objects/array/splice/index.html | 171 ++++++++ .../reference/global_objects/boolean/index.html | 196 +++++++++ .../global_objects/boolean/tosource/index.html | 98 +++++ .../global_objects/boolean/tostring/index.html | 121 ++++++ .../global_objects/boolean/valueof/index.html | 117 +++++ .../global_objects/dataview/prototype/index.html | 147 ------- .../global_objects/date/getdate/index.html | 119 +++++ .../global_objects/date/getday/index.html | 121 ++++++ .../global_objects/date/getfullyear/index.html | 121 ++++++ .../global_objects/date/gethours/index.html | 120 +++++ .../global_objects/date/getmilliseconds/index.html | 118 +++++ .../global_objects/date/getminutes/index.html | 120 +++++ .../global_objects/date/getmonth/index.html | 120 +++++ .../global_objects/date/getseconds/index.html | 120 +++++ .../global_objects/date/gettime/index.html | 135 ++++++ .../date/gettimezoneoffset/index.html | 109 +++++ .../global_objects/date/getutcdate/index.html | 119 +++++ .../global_objects/date/getutcday/index.html | 119 +++++ .../global_objects/date/getutcfullyear/index.html | 118 +++++ .../global_objects/date/getutchours/index.html | 118 +++++ .../date/getutcmilliseconds/index.html | 116 +++++ .../global_objects/date/getutcminutes/index.html | 116 +++++ .../global_objects/date/getutcmonth/index.html | 116 +++++ .../global_objects/date/getutcseconds/index.html | 118 +++++ .../global_objects/date/getyear/index.html | 162 +++++++ .../reference/global_objects/date/index.html | 250 +++++++++++ .../reference/global_objects/date/now/index.html | 126 ++++++ .../global_objects/date/setdate/index.html | 122 ++++++ .../global_objects/date/setfullyear/index.html | 128 ++++++ .../global_objects/date/sethours/index.html | 129 ++++++ .../global_objects/date/setmilliseconds/index.html | 117 +++++ .../global_objects/date/setminutes/index.html | 127 ++++++ .../global_objects/date/setmonth/index.html | 126 ++++++ .../global_objects/date/setseconds/index.html | 125 ++++++ .../global_objects/date/settime/index.html | 118 +++++ .../global_objects/date/setutcdate/index.html | 119 +++++ .../global_objects/date/setutcfullyear/index.html | 123 ++++++ .../global_objects/date/setutchours/index.html | 125 ++++++ .../date/setutcmilliseconds/index.html | 117 +++++ .../global_objects/date/setutcminutes/index.html | 123 ++++++ .../global_objects/date/setutcmonth/index.html | 121 ++++++ .../global_objects/date/setutcseconds/index.html | 121 ++++++ .../global_objects/date/setyear/index.html | 124 ++++++ .../global_objects/date/todatestring/index.html | 115 +++++ .../global_objects/date/togmtstring/index.html | 115 +++++ .../global_objects/date/toisostring/index.html | 134 ++++++ .../global_objects/date/tojson/index.html | 108 +++++ .../global_objects/date/tostring/index.html | 142 ++++++ .../global_objects/date/totimestring/index.html | 115 +++++ .../reference/global_objects/date/utc/index.html | 142 ++++++ .../global_objects/date/valueof/index.html | 118 +++++ .../global_objects/error/columnnumber/index.html | 83 ++++ .../global_objects/error/filename/index.html | 87 ++++ .../reference/global_objects/error/index.html | 224 ++++++++++ .../global_objects/error/linenumber/index.html | 94 ++++ .../global_objects/error/message/index.html | 110 +++++ .../reference/global_objects/error/name/index.html | 111 +++++ .../global_objects/error/stack/index.html | 161 +++++++ .../global_objects/error/tosource/index.html | 91 ++++ .../global_objects/error/tostring/index.html | 146 +++++++ .../global_objects/evalerror/prototype/index.html | 124 ------ .../javascript/reference/global_objects/index.html | 167 +++++++ .../reference/global_objects/infinity/index.html | 114 +++++ .../reference/global_objects/json/index.html | 242 +++++++++++ .../reference/global_objects/map/clear/index.html | 104 +++++ .../reference/global_objects/map/delete/index.html | 109 +++++ .../global_objects/map/entries/index.html | 104 +++++ .../global_objects/map/foreach/index.html | 136 ++++++ .../reference/global_objects/map/get/index.html | 116 +++++ .../reference/global_objects/map/has/index.html | 114 +++++ .../reference/global_objects/map/index.html | 385 ++++++++++++++++ .../reference/global_objects/map/keys/index.html | 104 +++++ .../reference/global_objects/map/set/index.html | 122 ++++++ .../reference/global_objects/map/size/index.html | 105 +++++ .../reference/global_objects/map/values/index.html | 103 +++++ .../reference/global_objects/math/abs/index.html | 129 ++++++ .../reference/global_objects/math/acos/index.html | 131 ++++++ .../reference/global_objects/math/acosh/index.html | 126 ++++++ .../reference/global_objects/math/asin/index.html | 133 ++++++ .../reference/global_objects/math/asinh/index.html | 125 ++++++ .../reference/global_objects/math/atan/index.html | 127 ++++++ .../reference/global_objects/math/atan2/index.html | 139 ++++++ .../reference/global_objects/math/atanh/index.html | 127 ++++++ .../reference/global_objects/math/cbrt/index.html | 122 ++++++ .../reference/global_objects/math/ceil/index.html | 197 +++++++++ .../reference/global_objects/math/clz32/index.html | 155 +++++++ .../reference/global_objects/math/cos/index.html | 128 ++++++ .../reference/global_objects/math/cosh/index.html | 130 ++++++ .../reference/global_objects/math/e/index.html | 118 +++++ .../reference/global_objects/math/exp/index.html | 123 ++++++ .../reference/global_objects/math/expm1/index.html | 122 ++++++ .../reference/global_objects/math/floor/index.html | 194 +++++++++ .../global_objects/math/fround/index.html | 118 +++++ .../reference/global_objects/math/hypot/index.html | 139 ++++++ .../reference/global_objects/math/imul/index.html | 120 +++++ .../reference/global_objects/math/index.html | 205 +++++++++ .../reference/global_objects/math/ln10/index.html | 118 +++++ .../reference/global_objects/math/ln2/index.html | 118 +++++ .../reference/global_objects/math/log/index.html | 137 ++++++ .../reference/global_objects/math/log10/index.html | 126 ++++++ .../global_objects/math/log10e/index.html | 118 +++++ .../reference/global_objects/math/log1p/index.html | 125 ++++++ .../reference/global_objects/math/log2/index.html | 127 ++++++ .../reference/global_objects/math/log2e/index.html | 118 +++++ .../reference/global_objects/math/max/index.html | 134 ++++++ .../reference/global_objects/math/min/index.html | 140 ++++++ .../reference/global_objects/math/pi/index.html | 116 +++++ .../reference/global_objects/math/pow/index.html | 140 ++++++ .../global_objects/math/random/index.html | 126 ++++++ .../reference/global_objects/math/round/index.html | 207 +++++++++ .../reference/global_objects/math/sign/index.html | 131 ++++++ .../reference/global_objects/math/sin/index.html | 127 ++++++ .../reference/global_objects/math/sinh/index.html | 129 ++++++ .../reference/global_objects/math/sqrt/index.html | 127 ++++++ .../global_objects/math/sqrt1_2/index.html | 117 +++++ .../reference/global_objects/math/sqrt2/index.html | 117 +++++ .../reference/global_objects/math/tan/index.html | 140 ++++++ .../reference/global_objects/math/tanh/index.html | 142 ++++++ .../reference/global_objects/math/trunc/index.html | 129 ++++++ .../reference/global_objects/nan/index.html | 125 ++++++ .../reference/global_objects/null/index.html | 125 ++++++ .../global_objects/number/epsilon/index.html | 102 +++++ .../reference/global_objects/number/index.html | 214 +++++++++ .../global_objects/number/isfinite/index.html | 118 +++++ .../global_objects/number/isinteger/index.html | 118 +++++ .../global_objects/number/isnan/index.html | 129 ++++++ .../global_objects/number/issafeinteger/index.html | 117 +++++ .../number/max_safe_integer/index.html | 100 +++++ .../global_objects/number/max_value/index.html | 118 +++++ .../number/min_safe_integer/index.html | 100 +++++ .../global_objects/number/min_value/index.html | 118 +++++ .../reference/global_objects/number/nan/index.html | 100 +++++ .../number/negative_infinity/index.html | 134 ++++++ .../global_objects/number/parsefloat/index.html | 103 +++++ .../global_objects/number/parseint/index.html | 102 +++++ .../number/positive_infinity/index.html | 137 ++++++ .../global_objects/number/toexponential/index.html | 136 ++++++ .../global_objects/number/tofixed/index.html | 135 ++++++ .../global_objects/number/toprecision/index.html | 134 ++++++ .../global_objects/number/tostring/index.html | 141 ++++++ .../global_objects/object/prototype/index.html | 215 --------- .../reference/global_objects/parsefloat/index.html | 166 +++++++ .../reference/global_objects/set/add/index.html | 119 +++++ .../reference/global_objects/set/clear/index.html | 105 +++++ .../reference/global_objects/set/delete/index.html | 112 +++++ .../global_objects/set/entries/index.html | 104 +++++ .../reference/global_objects/set/has/index.html | 114 +++++ .../reference/global_objects/set/index.html | 380 ++++++++++++++++ .../reference/global_objects/set/values/index.html | 106 +++++ .../global_objects/string/anchor/index.html | 118 +++++ .../reference/global_objects/string/big/index.html | 114 +++++ .../global_objects/string/blink/index.html | 110 +++++ .../global_objects/string/bold/index.html | 106 +++++ .../global_objects/string/charat/index.html | 283 ++++++++++++ .../global_objects/string/concat/index.html | 125 ++++++ .../global_objects/string/endswith/index.html | 133 ++++++ .../global_objects/string/fixed/index.html | 103 +++++ .../global_objects/string/fontcolor/index.html | 122 ++++++ .../global_objects/string/fontsize/index.html | 121 ++++++ .../global_objects/string/fromcharcode/index.html | 126 ++++++ .../reference/global_objects/string/index.html | 340 +++++++++++++++ .../global_objects/string/indexof/index.html | 190 ++++++++ .../global_objects/string/italics/index.html | 104 +++++ .../global_objects/string/length/index.html | 121 ++++++ .../global_objects/string/link/index.html | 119 +++++ .../global_objects/string/normalize/index.html | 154 +++++++ .../global_objects/string/small/index.html | 110 +++++ .../global_objects/string/startswith/index.html | 128 ++++++ .../reference/global_objects/string/sub/index.html | 109 +++++ .../global_objects/string/substr/index.html | 156 +++++++ .../reference/global_objects/string/sup/index.html | 107 +++++ .../string/tolocalelowercase/index.html | 110 +++++ .../string/tolocaleuppercase/index.html | 110 +++++ .../global_objects/string/tolowercase/index.html | 111 +++++ .../global_objects/string/tostring/index.html | 113 +++++ .../global_objects/string/touppercase/index.html | 110 +++++ .../global_objects/string/trim/index.html | 123 ++++++ .../global_objects/string/trimend/index.html | 94 ++++ .../global_objects/string/trimstart/index.html | 94 ++++ .../global_objects/syntaxerror/index.html | 166 +++++++ .../reference/global_objects/undefined/index.html | 174 ++++++++ .../global_objects/weakmap/prototype/index.html | 133 ------ .../global_objects/weakset/prototype/index.html | 132 ------ files/ca/web/javascript/reference/index.html | 46 ++ .../reference/operators/comma_operator/index.html | 129 ++++++ .../operators/conditional_operator/index.html | 170 ++++++++ .../reference/operators/function/index.html | 146 +++++++ .../reference/operators/grouping/index.html | 128 ++++++ .../web/javascript/reference/operators/index.html | 282 ++++++++++++ .../reference/operators/super/index.html | 119 +++++ .../reference/operators/typeof/index.html | 240 ++++++++++ .../javascript/reference/operators/void/index.html | 138 ++++++ .../reference/operators/yield/index.html | 152 +++++++ .../reference/statements/block/index.html | 138 ++++++ .../reference/statements/break/index.html | 154 +++++++ .../reference/statements/continue/index.html | 199 +++++++++ .../reference/statements/debugger/index.html | 116 +++++ .../reference/statements/do...while/index.html | 124 ++++++ .../reference/statements/empty/index.html | 138 ++++++ .../reference/statements/export/index.html | 158 +++++++ .../reference/statements/for...of/index.html | 181 ++++++++ .../javascript/reference/statements/for/index.html | 190 ++++++++ .../reference/statements/function/index.html | 171 ++++++++ .../reference/statements/if...else/index.html | 203 +++++++++ .../web/javascript/reference/statements/index.html | 129 ++++++ .../reference/statements/return/index.html | 183 ++++++++ .../reference/statements/throw/index.html | 228 ++++++++++ .../reference/statements/while/index.html | 131 ++++++ 240 files changed, 33026 insertions(+), 985 deletions(-) create mode 100644 files/ca/web/javascript/reference/about/index.html create mode 100644 files/ca/web/javascript/reference/classes/constructor/index.html create mode 100644 files/ca/web/javascript/reference/classes/index.html create mode 100644 files/ca/web/javascript/reference/classes/static/index.html delete mode 100644 files/ca/web/javascript/reference/errors/nomes-lectura/index.html create mode 100644 files/ca/web/javascript/reference/errors/read-only/index.html delete mode 100644 files/ca/web/javascript/reference/functions/parameters_rest/index.html create mode 100644 files/ca/web/javascript/reference/functions/rest_parameters/index.html create mode 100644 files/ca/web/javascript/reference/global_objects/array/entries/index.html create mode 100644 files/ca/web/javascript/reference/global_objects/array/every/index.html create mode 100644 files/ca/web/javascript/reference/global_objects/array/fill/index.html create mode 100644 files/ca/web/javascript/reference/global_objects/array/filter/index.html create mode 100644 files/ca/web/javascript/reference/global_objects/array/find/index.html create mode 100644 files/ca/web/javascript/reference/global_objects/array/findindex/index.html create mode 100644 files/ca/web/javascript/reference/global_objects/array/foreach/index.html create mode 100644 files/ca/web/javascript/reference/global_objects/array/includes/index.html create mode 100644 files/ca/web/javascript/reference/global_objects/array/index.html create mode 100644 files/ca/web/javascript/reference/global_objects/array/indexof/index.html create mode 100644 files/ca/web/javascript/reference/global_objects/array/isarray/index.html create mode 100644 files/ca/web/javascript/reference/global_objects/array/join/index.html create mode 100644 files/ca/web/javascript/reference/global_objects/array/keys/index.html create mode 100644 files/ca/web/javascript/reference/global_objects/array/lastindexof/index.html create mode 100644 files/ca/web/javascript/reference/global_objects/array/length/index.html create mode 100644 files/ca/web/javascript/reference/global_objects/array/map/index.html create mode 100644 files/ca/web/javascript/reference/global_objects/array/of/index.html create mode 100644 files/ca/web/javascript/reference/global_objects/array/pop/index.html create mode 100644 files/ca/web/javascript/reference/global_objects/array/push/index.html create mode 100644 files/ca/web/javascript/reference/global_objects/array/reduce/index.html create mode 100644 files/ca/web/javascript/reference/global_objects/array/reverse/index.html create mode 100644 files/ca/web/javascript/reference/global_objects/array/shift/index.html create mode 100644 files/ca/web/javascript/reference/global_objects/array/slice/index.html create mode 100644 files/ca/web/javascript/reference/global_objects/array/some/index.html create mode 100644 files/ca/web/javascript/reference/global_objects/array/splice/index.html create mode 100644 files/ca/web/javascript/reference/global_objects/boolean/index.html create mode 100644 files/ca/web/javascript/reference/global_objects/boolean/tosource/index.html create mode 100644 files/ca/web/javascript/reference/global_objects/boolean/tostring/index.html create mode 100644 files/ca/web/javascript/reference/global_objects/boolean/valueof/index.html delete mode 100644 files/ca/web/javascript/reference/global_objects/dataview/prototype/index.html create mode 100644 files/ca/web/javascript/reference/global_objects/date/getdate/index.html create mode 100644 files/ca/web/javascript/reference/global_objects/date/getday/index.html create mode 100644 files/ca/web/javascript/reference/global_objects/date/getfullyear/index.html create mode 100644 files/ca/web/javascript/reference/global_objects/date/gethours/index.html create mode 100644 files/ca/web/javascript/reference/global_objects/date/getmilliseconds/index.html create mode 100644 files/ca/web/javascript/reference/global_objects/date/getminutes/index.html create mode 100644 files/ca/web/javascript/reference/global_objects/date/getmonth/index.html create mode 100644 files/ca/web/javascript/reference/global_objects/date/getseconds/index.html create mode 100644 files/ca/web/javascript/reference/global_objects/date/gettime/index.html create mode 100644 files/ca/web/javascript/reference/global_objects/date/gettimezoneoffset/index.html create mode 100644 files/ca/web/javascript/reference/global_objects/date/getutcdate/index.html create mode 100644 files/ca/web/javascript/reference/global_objects/date/getutcday/index.html create mode 100644 files/ca/web/javascript/reference/global_objects/date/getutcfullyear/index.html create mode 100644 files/ca/web/javascript/reference/global_objects/date/getutchours/index.html create mode 100644 files/ca/web/javascript/reference/global_objects/date/getutcmilliseconds/index.html create mode 100644 files/ca/web/javascript/reference/global_objects/date/getutcminutes/index.html create mode 100644 files/ca/web/javascript/reference/global_objects/date/getutcmonth/index.html create mode 100644 files/ca/web/javascript/reference/global_objects/date/getutcseconds/index.html create mode 100644 files/ca/web/javascript/reference/global_objects/date/getyear/index.html create mode 100644 files/ca/web/javascript/reference/global_objects/date/index.html create mode 100644 files/ca/web/javascript/reference/global_objects/date/now/index.html create mode 100644 files/ca/web/javascript/reference/global_objects/date/setdate/index.html create mode 100644 files/ca/web/javascript/reference/global_objects/date/setfullyear/index.html create mode 100644 files/ca/web/javascript/reference/global_objects/date/sethours/index.html create mode 100644 files/ca/web/javascript/reference/global_objects/date/setmilliseconds/index.html create mode 100644 files/ca/web/javascript/reference/global_objects/date/setminutes/index.html create mode 100644 files/ca/web/javascript/reference/global_objects/date/setmonth/index.html create mode 100644 files/ca/web/javascript/reference/global_objects/date/setseconds/index.html create mode 100644 files/ca/web/javascript/reference/global_objects/date/settime/index.html create mode 100644 files/ca/web/javascript/reference/global_objects/date/setutcdate/index.html create mode 100644 files/ca/web/javascript/reference/global_objects/date/setutcfullyear/index.html create mode 100644 files/ca/web/javascript/reference/global_objects/date/setutchours/index.html create mode 100644 files/ca/web/javascript/reference/global_objects/date/setutcmilliseconds/index.html create mode 100644 files/ca/web/javascript/reference/global_objects/date/setutcminutes/index.html create mode 100644 files/ca/web/javascript/reference/global_objects/date/setutcmonth/index.html create mode 100644 files/ca/web/javascript/reference/global_objects/date/setutcseconds/index.html create mode 100644 files/ca/web/javascript/reference/global_objects/date/setyear/index.html create mode 100644 files/ca/web/javascript/reference/global_objects/date/todatestring/index.html create mode 100644 files/ca/web/javascript/reference/global_objects/date/togmtstring/index.html create mode 100644 files/ca/web/javascript/reference/global_objects/date/toisostring/index.html create mode 100644 files/ca/web/javascript/reference/global_objects/date/tojson/index.html create mode 100644 files/ca/web/javascript/reference/global_objects/date/tostring/index.html create mode 100644 files/ca/web/javascript/reference/global_objects/date/totimestring/index.html create mode 100644 files/ca/web/javascript/reference/global_objects/date/utc/index.html create mode 100644 files/ca/web/javascript/reference/global_objects/date/valueof/index.html create mode 100644 files/ca/web/javascript/reference/global_objects/error/columnnumber/index.html create mode 100644 files/ca/web/javascript/reference/global_objects/error/filename/index.html create mode 100644 files/ca/web/javascript/reference/global_objects/error/index.html create mode 100644 files/ca/web/javascript/reference/global_objects/error/linenumber/index.html create mode 100644 files/ca/web/javascript/reference/global_objects/error/message/index.html create mode 100644 files/ca/web/javascript/reference/global_objects/error/name/index.html create mode 100644 files/ca/web/javascript/reference/global_objects/error/stack/index.html create mode 100644 files/ca/web/javascript/reference/global_objects/error/tosource/index.html create mode 100644 files/ca/web/javascript/reference/global_objects/error/tostring/index.html delete mode 100644 files/ca/web/javascript/reference/global_objects/evalerror/prototype/index.html create mode 100644 files/ca/web/javascript/reference/global_objects/index.html create mode 100644 files/ca/web/javascript/reference/global_objects/infinity/index.html create mode 100644 files/ca/web/javascript/reference/global_objects/json/index.html create mode 100644 files/ca/web/javascript/reference/global_objects/map/clear/index.html create mode 100644 files/ca/web/javascript/reference/global_objects/map/delete/index.html create mode 100644 files/ca/web/javascript/reference/global_objects/map/entries/index.html create mode 100644 files/ca/web/javascript/reference/global_objects/map/foreach/index.html create mode 100644 files/ca/web/javascript/reference/global_objects/map/get/index.html create mode 100644 files/ca/web/javascript/reference/global_objects/map/has/index.html create mode 100644 files/ca/web/javascript/reference/global_objects/map/index.html create mode 100644 files/ca/web/javascript/reference/global_objects/map/keys/index.html create mode 100644 files/ca/web/javascript/reference/global_objects/map/set/index.html create mode 100644 files/ca/web/javascript/reference/global_objects/map/size/index.html create mode 100644 files/ca/web/javascript/reference/global_objects/map/values/index.html create mode 100644 files/ca/web/javascript/reference/global_objects/math/abs/index.html create mode 100644 files/ca/web/javascript/reference/global_objects/math/acos/index.html create mode 100644 files/ca/web/javascript/reference/global_objects/math/acosh/index.html create mode 100644 files/ca/web/javascript/reference/global_objects/math/asin/index.html create mode 100644 files/ca/web/javascript/reference/global_objects/math/asinh/index.html create mode 100644 files/ca/web/javascript/reference/global_objects/math/atan/index.html create mode 100644 files/ca/web/javascript/reference/global_objects/math/atan2/index.html create mode 100644 files/ca/web/javascript/reference/global_objects/math/atanh/index.html create mode 100644 files/ca/web/javascript/reference/global_objects/math/cbrt/index.html create mode 100644 files/ca/web/javascript/reference/global_objects/math/ceil/index.html create mode 100644 files/ca/web/javascript/reference/global_objects/math/clz32/index.html create mode 100644 files/ca/web/javascript/reference/global_objects/math/cos/index.html create mode 100644 files/ca/web/javascript/reference/global_objects/math/cosh/index.html create mode 100644 files/ca/web/javascript/reference/global_objects/math/e/index.html create mode 100644 files/ca/web/javascript/reference/global_objects/math/exp/index.html create mode 100644 files/ca/web/javascript/reference/global_objects/math/expm1/index.html create mode 100644 files/ca/web/javascript/reference/global_objects/math/floor/index.html create mode 100644 files/ca/web/javascript/reference/global_objects/math/fround/index.html create mode 100644 files/ca/web/javascript/reference/global_objects/math/hypot/index.html create mode 100644 files/ca/web/javascript/reference/global_objects/math/imul/index.html create mode 100644 files/ca/web/javascript/reference/global_objects/math/index.html create mode 100644 files/ca/web/javascript/reference/global_objects/math/ln10/index.html create mode 100644 files/ca/web/javascript/reference/global_objects/math/ln2/index.html create mode 100644 files/ca/web/javascript/reference/global_objects/math/log/index.html create mode 100644 files/ca/web/javascript/reference/global_objects/math/log10/index.html create mode 100644 files/ca/web/javascript/reference/global_objects/math/log10e/index.html create mode 100644 files/ca/web/javascript/reference/global_objects/math/log1p/index.html create mode 100644 files/ca/web/javascript/reference/global_objects/math/log2/index.html create mode 100644 files/ca/web/javascript/reference/global_objects/math/log2e/index.html create mode 100644 files/ca/web/javascript/reference/global_objects/math/max/index.html create mode 100644 files/ca/web/javascript/reference/global_objects/math/min/index.html create mode 100644 files/ca/web/javascript/reference/global_objects/math/pi/index.html create mode 100644 files/ca/web/javascript/reference/global_objects/math/pow/index.html create mode 100644 files/ca/web/javascript/reference/global_objects/math/random/index.html create mode 100644 files/ca/web/javascript/reference/global_objects/math/round/index.html create mode 100644 files/ca/web/javascript/reference/global_objects/math/sign/index.html create mode 100644 files/ca/web/javascript/reference/global_objects/math/sin/index.html create mode 100644 files/ca/web/javascript/reference/global_objects/math/sinh/index.html create mode 100644 files/ca/web/javascript/reference/global_objects/math/sqrt/index.html create mode 100644 files/ca/web/javascript/reference/global_objects/math/sqrt1_2/index.html create mode 100644 files/ca/web/javascript/reference/global_objects/math/sqrt2/index.html create mode 100644 files/ca/web/javascript/reference/global_objects/math/tan/index.html create mode 100644 files/ca/web/javascript/reference/global_objects/math/tanh/index.html create mode 100644 files/ca/web/javascript/reference/global_objects/math/trunc/index.html create mode 100644 files/ca/web/javascript/reference/global_objects/nan/index.html create mode 100644 files/ca/web/javascript/reference/global_objects/null/index.html create mode 100644 files/ca/web/javascript/reference/global_objects/number/epsilon/index.html create mode 100644 files/ca/web/javascript/reference/global_objects/number/index.html create mode 100644 files/ca/web/javascript/reference/global_objects/number/isfinite/index.html create mode 100644 files/ca/web/javascript/reference/global_objects/number/isinteger/index.html create mode 100644 files/ca/web/javascript/reference/global_objects/number/isnan/index.html create mode 100644 files/ca/web/javascript/reference/global_objects/number/issafeinteger/index.html create mode 100644 files/ca/web/javascript/reference/global_objects/number/max_safe_integer/index.html create mode 100644 files/ca/web/javascript/reference/global_objects/number/max_value/index.html create mode 100644 files/ca/web/javascript/reference/global_objects/number/min_safe_integer/index.html create mode 100644 files/ca/web/javascript/reference/global_objects/number/min_value/index.html create mode 100644 files/ca/web/javascript/reference/global_objects/number/nan/index.html create mode 100644 files/ca/web/javascript/reference/global_objects/number/negative_infinity/index.html create mode 100644 files/ca/web/javascript/reference/global_objects/number/parsefloat/index.html create mode 100644 files/ca/web/javascript/reference/global_objects/number/parseint/index.html create mode 100644 files/ca/web/javascript/reference/global_objects/number/positive_infinity/index.html create mode 100644 files/ca/web/javascript/reference/global_objects/number/toexponential/index.html create mode 100644 files/ca/web/javascript/reference/global_objects/number/tofixed/index.html create mode 100644 files/ca/web/javascript/reference/global_objects/number/toprecision/index.html create mode 100644 files/ca/web/javascript/reference/global_objects/number/tostring/index.html delete mode 100644 files/ca/web/javascript/reference/global_objects/object/prototype/index.html create mode 100644 files/ca/web/javascript/reference/global_objects/parsefloat/index.html create mode 100644 files/ca/web/javascript/reference/global_objects/set/add/index.html create mode 100644 files/ca/web/javascript/reference/global_objects/set/clear/index.html create mode 100644 files/ca/web/javascript/reference/global_objects/set/delete/index.html create mode 100644 files/ca/web/javascript/reference/global_objects/set/entries/index.html create mode 100644 files/ca/web/javascript/reference/global_objects/set/has/index.html create mode 100644 files/ca/web/javascript/reference/global_objects/set/index.html create mode 100644 files/ca/web/javascript/reference/global_objects/set/values/index.html create mode 100644 files/ca/web/javascript/reference/global_objects/string/anchor/index.html create mode 100644 files/ca/web/javascript/reference/global_objects/string/big/index.html create mode 100644 files/ca/web/javascript/reference/global_objects/string/blink/index.html create mode 100644 files/ca/web/javascript/reference/global_objects/string/bold/index.html create mode 100644 files/ca/web/javascript/reference/global_objects/string/charat/index.html create mode 100644 files/ca/web/javascript/reference/global_objects/string/concat/index.html create mode 100644 files/ca/web/javascript/reference/global_objects/string/endswith/index.html create mode 100644 files/ca/web/javascript/reference/global_objects/string/fixed/index.html create mode 100644 files/ca/web/javascript/reference/global_objects/string/fontcolor/index.html create mode 100644 files/ca/web/javascript/reference/global_objects/string/fontsize/index.html create mode 100644 files/ca/web/javascript/reference/global_objects/string/fromcharcode/index.html create mode 100644 files/ca/web/javascript/reference/global_objects/string/index.html create mode 100644 files/ca/web/javascript/reference/global_objects/string/indexof/index.html create mode 100644 files/ca/web/javascript/reference/global_objects/string/italics/index.html create mode 100644 files/ca/web/javascript/reference/global_objects/string/length/index.html create mode 100644 files/ca/web/javascript/reference/global_objects/string/link/index.html create mode 100644 files/ca/web/javascript/reference/global_objects/string/normalize/index.html create mode 100644 files/ca/web/javascript/reference/global_objects/string/small/index.html create mode 100644 files/ca/web/javascript/reference/global_objects/string/startswith/index.html create mode 100644 files/ca/web/javascript/reference/global_objects/string/sub/index.html create mode 100644 files/ca/web/javascript/reference/global_objects/string/substr/index.html create mode 100644 files/ca/web/javascript/reference/global_objects/string/sup/index.html create mode 100644 files/ca/web/javascript/reference/global_objects/string/tolocalelowercase/index.html create mode 100644 files/ca/web/javascript/reference/global_objects/string/tolocaleuppercase/index.html create mode 100644 files/ca/web/javascript/reference/global_objects/string/tolowercase/index.html create mode 100644 files/ca/web/javascript/reference/global_objects/string/tostring/index.html create mode 100644 files/ca/web/javascript/reference/global_objects/string/touppercase/index.html create mode 100644 files/ca/web/javascript/reference/global_objects/string/trim/index.html create mode 100644 files/ca/web/javascript/reference/global_objects/string/trimend/index.html create mode 100644 files/ca/web/javascript/reference/global_objects/string/trimstart/index.html create mode 100644 files/ca/web/javascript/reference/global_objects/syntaxerror/index.html create mode 100644 files/ca/web/javascript/reference/global_objects/undefined/index.html delete mode 100644 files/ca/web/javascript/reference/global_objects/weakmap/prototype/index.html delete mode 100644 files/ca/web/javascript/reference/global_objects/weakset/prototype/index.html create mode 100644 files/ca/web/javascript/reference/index.html create mode 100644 files/ca/web/javascript/reference/operators/comma_operator/index.html create mode 100644 files/ca/web/javascript/reference/operators/conditional_operator/index.html create mode 100644 files/ca/web/javascript/reference/operators/function/index.html create mode 100644 files/ca/web/javascript/reference/operators/grouping/index.html create mode 100644 files/ca/web/javascript/reference/operators/index.html create mode 100644 files/ca/web/javascript/reference/operators/super/index.html create mode 100644 files/ca/web/javascript/reference/operators/typeof/index.html create mode 100644 files/ca/web/javascript/reference/operators/void/index.html create mode 100644 files/ca/web/javascript/reference/operators/yield/index.html create mode 100644 files/ca/web/javascript/reference/statements/block/index.html create mode 100644 files/ca/web/javascript/reference/statements/break/index.html create mode 100644 files/ca/web/javascript/reference/statements/continue/index.html create mode 100644 files/ca/web/javascript/reference/statements/debugger/index.html create mode 100644 files/ca/web/javascript/reference/statements/do...while/index.html create mode 100644 files/ca/web/javascript/reference/statements/empty/index.html create mode 100644 files/ca/web/javascript/reference/statements/export/index.html create mode 100644 files/ca/web/javascript/reference/statements/for...of/index.html create mode 100644 files/ca/web/javascript/reference/statements/for/index.html create mode 100644 files/ca/web/javascript/reference/statements/function/index.html create mode 100644 files/ca/web/javascript/reference/statements/if...else/index.html create mode 100644 files/ca/web/javascript/reference/statements/index.html create mode 100644 files/ca/web/javascript/reference/statements/return/index.html create mode 100644 files/ca/web/javascript/reference/statements/throw/index.html create mode 100644 files/ca/web/javascript/reference/statements/while/index.html (limited to 'files/ca/web/javascript/reference') diff --git a/files/ca/web/javascript/reference/about/index.html b/files/ca/web/javascript/reference/about/index.html new file mode 100644 index 0000000000..b1fa0734b3 --- /dev/null +++ b/files/ca/web/javascript/reference/about/index.html @@ -0,0 +1,44 @@ +--- +title: Sobre aquesta referència +slug: Web/JavaScript/Referencia/Sobre +translation_of: Web/JavaScript/Reference/About +--- +

{{JsSidebar}}

+ +

La referència de JavaScript serveix com a repositori de coneixement del llenguatge. Hom trobarà aquí el llenguatge descrit en detall. Durant el transcurs d'escriure codi en JavaScript, aquestes pàgines seran de gran ajut com a referència (d'aquí el títol). Si el que es pretén és aprendre JavaScript, o el que es necessita ajuda a l'hora d'entendre algunes de les seves capacitats o característiques, trobarà la informació que buaca a la guia de JavaScript.

+ +

El llenguatge de programació JavaScript està pensat per a ser utilitzat sota un entorn més gran, ja sigui un navegador web, scripts de servidor o quelcom similar. Aquesta referència intenta majoriariament ser agnòstica quant a l'entorn i no per tant no està adreçada únicament a un entorn donat pel navegador web.

+ +

On trobar informació sobre JavaScript

+ +

La documentació de les característiques bàsiques de Javascript (ECMAScript pur, majoritàriament) inclou el següent:

+ + + +

Si s'és nou quant a JavaScript, es recomana començar per la guia. Un cop assolits els fonaments, la referència esdevindrà útil per obtindre més detalls sobre objectes individuals i construccions del llenguatge.

+ +

Estructura de la referència

+ +

La referència de JavaScript es composa dels següents capítols:

+ +
+
Objectes bàsics estandard
+
Aquest capítol documenta tots els objectes standard proporcionats per JavaScript, així com els seus mètodes i propietats.
+
Sentències i declaracions
+
Una aplicació en JavaScript consisteix en un conjunt de sentències amb una sintaxi adequada. Una sola sentència pot ocupar més d'una línia. Tanmateix múltimples sentències poden aparèixer en una única línia si estan separades per un punt i coma (;).
+
Funcions
+
Capítol dedicat a les funcions en JavaScript.
+
Històric de versions
+
Aquest capítol mostra les diferències entre les diferents versions de JavaScript.
+
+ +

Més pàgines de referència

+ + diff --git a/files/ca/web/javascript/reference/classes/constructor/index.html b/files/ca/web/javascript/reference/classes/constructor/index.html new file mode 100644 index 0000000000..a0bd6b966f --- /dev/null +++ b/files/ca/web/javascript/reference/classes/constructor/index.html @@ -0,0 +1,129 @@ +--- +title: constructor +slug: Web/JavaScript/Referencia/Classes/constructor +translation_of: Web/JavaScript/Reference/Classes/constructor +--- +
{{jsSidebar("Classes")}}
+ +

Resum

+ +

El mètode constructor és un mètode especial per crear i inicialitzar un objecte creat amb una class.

+ +

Sintaxi

+ +
constructor([arguments]) { ... }
+ +

Descripció

+ +

Només hi pot haver un mètode especial am el nom "constructor" en una classe. Es llançarà un {{jsxref("SyntaxError")}}, si la classe conté més d'un cas d'un mètode constructor.

+ +

Un constructor pot utilitzar la paraula clau super per cridar el constructor de la classe pare.

+ +

Exemples

+ +

Aquest fragment de codi es pren de mostra de classes (demostració en viu).

+ +
class Square extends Polygon {
+  constructor(length) {
+    // Aquí es crida el constructor del pare de la classe amb les longituts
+    // proveïdes per l'amplada i l'alçada del polígon
+    super(length, length);
+    // Nota: En classes derivades, s'ha de cridar super() abans
+    // d'utilitzar 'this'. Obviar això causarà un error de referència.
+    this.name = 'Square';
+  }
+
+  get area() {
+    return this.height * this.width;
+  }
+
+  set area(value) {
+    this.area = value;
+  }
+}
+ +

Especificacions

+ + + + + + + + + + + + + + +
EspecificacióEstatComentaris
{{SpecName('ES6', '#sec-static-semantics-constructormethod', 'Constructor Method')}}{{Spec2('ES6')}}Definició inicial.
+ +

Compatibilitat amb navegadors

+ +

{{CompatibilityTable}}

+ +
+ + + + + + + + + + + + + + + + + + + +
CaracterísticaChromeFirefox (Gecko)Internet ExplorerOperaSafari
Suport bàsic{{CompatChrome(42.0)}} +

Disponible només al canal Nightly  (desde febrer del 2015)

+
{{CompatUnknown}}{{CompatUnknown}}{{CompatUnknown}}
+
+ +
+ + + + + + + + + + + + + + + + + + + + + +
CaracterísticaAndroidChrome per AndroidFirefox Mobile (Gecko)IE MobileOpera MobileSafari Mobile
Suport bàsic{{CompatUnknown}}{{CompatChrome(42.0)}}Disponible només al canal Nightly  (desde febrer del 2015){{CompatUnknown}}{{CompatUnknown}}{{CompatUnknown}}
+
+ +

Notes específiques per Firefox

+ + + +

Vegeu també

+ + diff --git a/files/ca/web/javascript/reference/classes/index.html b/files/ca/web/javascript/reference/classes/index.html new file mode 100644 index 0000000000..23daf7e1ff --- /dev/null +++ b/files/ca/web/javascript/reference/classes/index.html @@ -0,0 +1,382 @@ +--- +title: Classes +slug: Web/JavaScript/Referencia/Classes +tags: + - Classes + - ECMAScript 2015 + - Experimental + - Expérimental(2) + - JavaScript + - NeedsContent + - NeedsTranslation + - Reference + - Référence(2) + - TopicStub +translation_of: Web/JavaScript/Reference/Classes +--- +
{{JsSidebar("Classes")}}
+ +

JavaScript classes, introduced in ECMAScript 2015, are primarily syntactical sugar over JavaScript's existing prototype-based inheritance. The class syntax does not introduce a new object-oriented inheritance model to JavaScript.

+ +

Defining classes

+ +

Classes are in fact "special functions", and just as you can define function expressions and function declarations, the class syntax has two components: class expressions and class declarations.

+ +

Class declarations

+ +

One way to define a class is using a class declaration. To declare a class, you use the class keyword with the name of the class ("Rectangle" here).

+ +
class Rectangle {
+  constructor(height, width) {
+    this.height = height;
+    this.width = width;
+  }
+}
+ +

Hoisting

+ +

An important difference between function declarations and class declarations is that function declarations are {{Glossary("Hoisting", "hoisted")}} and class declarations are not. You first need to declare your class and then access it, otherwise code like the following will throw a {{jsxref("ReferenceError")}}:

+ +
var p = new Rectangle(); // ReferenceError
+
+class Rectangle {}
+
+ +

Class expressions

+ +

A class expression is another way to define a class. Class expressions can be named or unnamed. The name given to a named class expression is local to the class's body. (it can be retrieved through the class's (not an instance's) .name property, though)

+ +
// unnamed
+var Rectangle = class {
+  constructor(height, width) {
+    this.height = height;
+    this.width = width;
+  }
+};
+console.log(Rectangle.name);
+// output: "Rectangle"
+
+// named
+var Rectangle = class Rectangle2 {
+  constructor(height, width) {
+    this.height = height;
+    this.width = width;
+  }
+};
+console.log(Rectangle.name);
+// output: "Rectangle2"
+
+ +

Note: Class expressions also suffer from the same hoisting issues mentioned for Class declarations.

+ +

Class body and method definitions

+ +

The body of a class is the part that is in curly brackets {}. This is where you define class members, such as methods or constructor.

+ +

Strict mode

+ +

The bodies of class declarations and class expressions are executed in strict mode i.e. constructor, static and prototype methods, getter and setter functions are executed in strict mode.

+ +

Constructor

+ +

The constructor method is a special method for creating and initializing an object created with a class. There can only be one special method with the name "constructor" in a class. A {{jsxref("SyntaxError")}} will be thrown if the class contains more than one occurrence of a constructor method.

+ +

A constructor can use the super keyword to call the constructor of the super class.

+ +

Prototype methods

+ +

See also method definitions.

+ +
class Rectangle {
+  constructor(height, width) {
+    this.height = height;
+    this.width = width;
+  }
+  // Getter
+  get area() {
+    return this.calcArea();
+  }
+  // Method
+  calcArea() {
+    return this.height * this.width;
+  }
+}
+
+const square = new Rectangle(10, 10);
+
+console.log(square.area); // 100
+ +

Static methods

+ +

The static keyword defines a static method for a class. Static methods are called without instantiating their class and cannot be called through a class instance. Static methods are often used to create utility functions for an application.

+ +
class Point {
+  constructor(x, y) {
+    this.x = x;
+    this.y = y;
+  }
+
+  static distance(a, b) {
+    const dx = a.x - b.x;
+    const dy = a.y - b.y;
+
+    return Math.hypot(dx, dy);
+  }
+}
+
+const p1 = new Point(5, 5);
+const p2 = new Point(10, 10);
+
+console.log(Point.distance(p1, p2)); // 7.0710678118654755
+ +

Boxing with prototype and static methods

+ +

When a static or prototype method is called without a value for this, the this value will be undefined inside the method. This behavior will be the same even if the "use strict" directive isn't present, because code within the class syntax is always executed in strict mode.

+ +
class Animal {
+  speak() {
+    return this;
+  }
+  static eat() {
+    return this;
+  }
+}
+
+let obj = new Animal();
+obj.speak(); // Animal {}
+let speak = obj.speak;
+speak(); // undefined
+
+Animal.eat() // class Animal
+let eat = Animal.eat;
+eat(); // undefined
+ +

If the above is written using traditional function–based syntax, then autoboxing in method calls will happen in non–strict mode based on the initial this value. If the inital value is undefined, this will be set to the global object.

+ +

Autoboxing will not happen in strict mode, the this value remains as passed.

+ +
function Animal() { }
+
+Animal.prototype.speak = function() {
+  return this;
+}
+
+Animal.eat = function() {
+  return this;
+}
+
+let obj = new Animal();
+let speak = obj.speak;
+speak(); // global object
+
+let eat = Animal.eat;
+eat(); // global object
+
+ +

Instance properties

+ +

Instance properties must be defined inside of class methods:

+ +
class Rectangle {
+  constructor(height, width) {
+    this.height = height;
+    this.width = width;
+  }
+}
+ +

Static class-side properties and prototype data properties must be defined outside of the ClassBody declaration:

+ +
Rectangle.staticWidth = 20;
+Rectangle.prototype.prototypeWidth = 25;
+
+ +

+ +

Sub classing with extends

+ +

The extends keyword is used in class declarations or class expressions to create a class as a child of another class.

+ +
class Animal {
+  constructor(name) {
+    this.name = name;
+  }
+
+  speak() {
+    console.log(this.name + ' makes a noise.');
+  }
+}
+
+class Dog extends Animal {
+  speak() {
+    console.log(this.name + ' barks.');
+  }
+}
+
+var d = new Dog('Mitzie');
+d.speak(); // Mitzie barks.
+
+ +

If there is a constructor present in subclass, it needs to first call super() before using "this".

+ +

One may also extend traditional function-based "classes":

+ +
function Animal (name) {
+  this.name = name;
+}
+
+Animal.prototype.speak = function () {
+  console.log(this.name + ' makes a noise.');
+}
+
+class Dog extends Animal {
+  speak() {
+    console.log(this.name + ' barks.');
+  }
+}
+
+var d = new Dog('Mitzie');
+d.speak(); // Mitzie barks.
+
+ +

Note that classes cannot extend regular (non-constructible) objects. If you want to inherit from a regular object, you can instead use {{jsxref("Object.setPrototypeOf()")}}:

+ +
var Animal = {
+  speak() {
+    console.log(this.name + ' makes a noise.');
+  }
+};
+
+class Dog {
+  constructor(name) {
+    this.name = name;
+  }
+}
+
+// If you do not do this you will get a TypeError when you invoke speak
+Object.setPrototypeOf(Dog.prototype, Animal);
+
+var d = new Dog('Mitzie');
+d.speak(); // Mitzie makes a noise.
+
+ +

Species

+ +

You might want to return {{jsxref("Array")}} objects in your derived array class MyArray. The species pattern lets you override default constructors.

+ +

For example, when using methods such as {{jsxref("Array.map", "map()")}} that returns the default constructor, you want these methods to return a parent Array object, instead of the MyArray object. The {{jsxref("Symbol.species")}} symbol lets you do this:

+ +
class MyArray extends Array {
+  // Overwrite species to the parent Array constructor
+  static get [Symbol.species]() { return Array; }
+}
+
+var a = new MyArray(1,2,3);
+var mapped = a.map(x => x * x);
+
+console.log(mapped instanceof MyArray); // false
+console.log(mapped instanceof Array);   // true
+
+ +

Super class calls with super

+ +

The super keyword is used to call corresponding methods of super class.

+ +
class Cat {
+  constructor(name) {
+    this.name = name;
+  }
+
+  speak() {
+    console.log(this.name + ' makes a noise.');
+  }
+}
+
+class Lion extends Cat {
+  speak() {
+    super.speak();
+    console.log(this.name + ' roars.');
+  }
+}
+
+var l = new Lion('Fuzzy');
+l.speak();
+// Fuzzy makes a noise.
+// Fuzzy roars.
+
+
+ +

Mix-ins

+ +

Abstract subclasses or mix-ins are templates for classes. An ECMAScript class can only have a single superclass, so multiple inheritance from tooling classes, for example, is not possible. The functionality must be provided by the superclass.

+ +

A function with a superclass as input and a subclass extending that superclass as output can be used to implement mix-ins in ECMAScript:

+ +
var calculatorMixin = Base => class extends Base {
+  calc() { }
+};
+
+var randomizerMixin = Base => class extends Base {
+  randomize() { }
+};
+
+ +

A class that uses these mix-ins can then be written like this:

+ +
class Foo { }
+class Bar extends calculatorMixin(randomizerMixin(Foo)) { }
+ +

Specifications

+ + + + + + + + + + + + + + + + + + + + + + + + + + + + + +
SpecificationStatusComment
{{SpecName('ES2015', '#sec-class-definitions', 'Class definitions')}}{{Spec2('ES2015')}}Initial definition.
{{SpecName('ES2016', '#sec-class-definitions', 'Class definitions')}}{{Spec2('ES2016')}}
{{SpecName('ES2017', '#sec-class-definitions', 'Class definitions')}}{{Spec2('ES2017')}}
{{SpecName('ESDraft', '#sec-class-definitions', 'Class definitions')}}{{Spec2('ESDraft')}}
+ +

Browser compatibility

+ + + +

{{Compat("javascript.classes")}}

+ +

Running in Scratchpad

+ +

A class can't be redefined. If you're playing with code in Scratchpad (Firefox menu Tools > Web Developer > Scratchpad) and you 'Run' a definition of a class with the same name twice, you'll get a confusing SyntaxError: redeclaration of let <class-name>.

+ +

To re-run a definition, use Scratchpad's menu Execute > Reload and Run.
+ Please vote for bug #1428672.

+ +

See also

+ + diff --git a/files/ca/web/javascript/reference/classes/static/index.html b/files/ca/web/javascript/reference/classes/static/index.html new file mode 100644 index 0000000000..3255dc1552 --- /dev/null +++ b/files/ca/web/javascript/reference/classes/static/index.html @@ -0,0 +1,116 @@ +--- +title: static +slug: Web/JavaScript/Referencia/Classes/static +translation_of: Web/JavaScript/Reference/Classes/static +--- +
{{jsSidebar("Classes")}}
+ +

La paraula clau static defineix un mètode estàtic per a una classe.

+ +

Sintaxi

+ +
static methodName() { ... }
+ +

Descripció

+ +

Els mètodes estàtics es criden sense realitzar una instantània de la seva classe o instantiating their class nor are they callable when the class is instantiated. Els mètodes estàtics s'utilitzen sovint per crear funcions d'utilitat per una aplicació.

+ +

Exemples

+ +

L'exemple següent mostra diverses coses. Mostra com un mètode estàtic és implementat en una classe i que una classe amb un membre estàtic pot tenir subclasses. Finalment, mostra com es pot i com no es pot cridar un mètode estàtic.

+ +
class Tripple {
+  static tripple(n) {
+    n = n | 1;
+    return n * 3;
+  }
+}
+
+class BiggerTripple extends Tripple {
+  static tripple(n) {
+    return super.tripple(n) * super.tripple(n);
+  }
+}
+
+console.log(Tripple.tripple());
+console.log(Tripple.tripple(6));
+console.log(BiggerTripple.tripple(3));
+var tp = new Tripple();
+console.log(tp.tripple()); //Logs 'tp.tripple is not a function'.
+ +

Especificacions

+ + + + + + + + + + + + + + +
EspecificacióEstatComentaris
{{SpecName('ES6', '#sec-class-definitions', 'Class definitions')}}{{Spec2('ES6')}}Definició inicial.
+ +

Compatibilitat amb navegadors

+ +

{{CompatibilityTable}}

+ +
+ + + + + + + + + + + + + + + + + + + +
CaracterísticaChromeFirefox (Gecko)Internet ExplorerOperaSafari
Suport bàsic{{CompatChrome(42.0)}}Disponible només en el canal Nightly  (desde febrer del 2015){{CompatUnknown}}{{CompatUnknown}}{{CompatUnknown}}
+
+ +
+ + + + + + + + + + + + + + + + + + + + + +
CaracterísticaAndroidChrome per AndroidFirefox Mobile (Gecko)IE MobileOpera MobileSafari Mobile
Suport bàsic{{CompatUnknown}}{{CompatChrome(42.0)}}Disponible només en el canal Nightly  (desde febrer del 2015){{CompatUnknown}}{{CompatUnknown}}{{CompatUnknown}}
+
+ +

Vegeu també

+ + diff --git a/files/ca/web/javascript/reference/errors/nomes-lectura/index.html b/files/ca/web/javascript/reference/errors/nomes-lectura/index.html deleted file mode 100644 index 30c70c40dd..0000000000 --- a/files/ca/web/javascript/reference/errors/nomes-lectura/index.html +++ /dev/null @@ -1,78 +0,0 @@ ---- -title: 'TipusError: "x" es només de lectura' -slug: Web/JavaScript/Reference/Errors/Nomes-Lectura -tags: - - Errors - - JavaScript - - TypeError -translation_of: Web/JavaScript/Reference/Errors/Read-only ---- -
{{jsSidebar("Errors")}}
- -

Missatge

- -
TipusError: "x" es només de lectura (Firefox)
-TipusError: 0 es només de lectura (Firefox)
-TipusError: No es pot fer l'assignació a la propietat 'x' de #<Object> que es només de lectura (Chrome)
-TipusError: No es pot fer l'assignació a la propietat '0' de [object Array] (Chrome)
-
- -

Tipus d'error

- -

{{jsxref("TypeError")}}

- -

Qué ha anat malament?

- -

La variable global o propietat de l'objecte a la qual s'ha volgut fer l'assignació es només de lectura. (Tècnicament, es una propietat de no-escriptura.)

- -

Aquest error succeeix només en codi en mode estricte. En codi en mode no estricte, l'assignació es ignorada de manera silenciosa.

- -

Exemples

- -

Casos invàlids

- -

Propietats de només lectura no son súper comuns, però es poden donar quan es fa servir {{jsxref("Object.defineProperty()")}} o {{jsxref("Object.freeze()")}}.

- -
'use strict';
-var obj = Object.freeze({name: 'Elsa', score: 157});
-obj.score = 0;  // TypeError
-
-'use strict';
-Object.defineProperty(this, 'LUNG_COUNT', {value: 2, writable: false});
-LUNG_COUNT = 3;  // TypeError
-
-'use strict';
-var frozenArray = Object.freeze([0, 1, 2]);
-frozenArray[0]++;  // TypeError
-
- -

També hi ha unes poques propietats de només lectura en la construcció de JavaScript. Potser que hagis provat de redefinir una constant matemàtica.

- -
'use strict';
-Math.PI = 4;  // TypeError
- -

Ho sentim, no pots fer això.

- -

La variable global undefined també es només de lectura, llavors no pots silenciar l'infame error "undefined no es una funció" fent això:

- -
'use strict';
-undefined = function() {};  // TypeError: "undefined" es només de lectura
-
- -

Valid cases

- -
'use strict';
-var obj = Object.freeze({name: 'Score', points: 157});
-obj = {name: obj.name, points: 0};   // reemplaçant-ho amb un nou objecte funciona
-
-'use strict';
-var LUNG_COUNT = 2;  // Una `var` funciona, perque no es de només lectura
-LUNG_COUNT = 3;  // ok (anatòmicament potser, però poc probable)
-
- -

See also

- - diff --git a/files/ca/web/javascript/reference/errors/read-only/index.html b/files/ca/web/javascript/reference/errors/read-only/index.html new file mode 100644 index 0000000000..30c70c40dd --- /dev/null +++ b/files/ca/web/javascript/reference/errors/read-only/index.html @@ -0,0 +1,78 @@ +--- +title: 'TipusError: "x" es només de lectura' +slug: Web/JavaScript/Reference/Errors/Nomes-Lectura +tags: + - Errors + - JavaScript + - TypeError +translation_of: Web/JavaScript/Reference/Errors/Read-only +--- +
{{jsSidebar("Errors")}}
+ +

Missatge

+ +
TipusError: "x" es només de lectura (Firefox)
+TipusError: 0 es només de lectura (Firefox)
+TipusError: No es pot fer l'assignació a la propietat 'x' de #<Object> que es només de lectura (Chrome)
+TipusError: No es pot fer l'assignació a la propietat '0' de [object Array] (Chrome)
+
+ +

Tipus d'error

+ +

{{jsxref("TypeError")}}

+ +

Qué ha anat malament?

+ +

La variable global o propietat de l'objecte a la qual s'ha volgut fer l'assignació es només de lectura. (Tècnicament, es una propietat de no-escriptura.)

+ +

Aquest error succeeix només en codi en mode estricte. En codi en mode no estricte, l'assignació es ignorada de manera silenciosa.

+ +

Exemples

+ +

Casos invàlids

+ +

Propietats de només lectura no son súper comuns, però es poden donar quan es fa servir {{jsxref("Object.defineProperty()")}} o {{jsxref("Object.freeze()")}}.

+ +
'use strict';
+var obj = Object.freeze({name: 'Elsa', score: 157});
+obj.score = 0;  // TypeError
+
+'use strict';
+Object.defineProperty(this, 'LUNG_COUNT', {value: 2, writable: false});
+LUNG_COUNT = 3;  // TypeError
+
+'use strict';
+var frozenArray = Object.freeze([0, 1, 2]);
+frozenArray[0]++;  // TypeError
+
+ +

També hi ha unes poques propietats de només lectura en la construcció de JavaScript. Potser que hagis provat de redefinir una constant matemàtica.

+ +
'use strict';
+Math.PI = 4;  // TypeError
+ +

Ho sentim, no pots fer això.

+ +

La variable global undefined també es només de lectura, llavors no pots silenciar l'infame error "undefined no es una funció" fent això:

+ +
'use strict';
+undefined = function() {};  // TypeError: "undefined" es només de lectura
+
+ +

Valid cases

+ +
'use strict';
+var obj = Object.freeze({name: 'Score', points: 157});
+obj = {name: obj.name, points: 0};   // reemplaçant-ho amb un nou objecte funciona
+
+'use strict';
+var LUNG_COUNT = 2;  // Una `var` funciona, perque no es de només lectura
+LUNG_COUNT = 3;  // ok (anatòmicament potser, però poc probable)
+
+ +

See also

+ + diff --git a/files/ca/web/javascript/reference/functions/parameters_rest/index.html b/files/ca/web/javascript/reference/functions/parameters_rest/index.html deleted file mode 100644 index 68fc5f0bba..0000000000 --- a/files/ca/web/javascript/reference/functions/parameters_rest/index.html +++ /dev/null @@ -1,156 +0,0 @@ ---- -title: Paràmetres rest -slug: Web/JavaScript/Reference/Functions/parameters_rest -translation_of: Web/JavaScript/Reference/Functions/rest_parameters ---- -
{{jsSidebar("Functions")}}
- -

El paràmetre rest ens permet  representar un nombre indefinit d'arguments en forma d 'array.

- -

Syntax

- -
function f(a, b, ...theArgs) {
-  // ...
-}
-
- -

Descripció

- -

Si l'últim argument d'una funció, està prefixat amb l'operador ..., aquest esdevé un array el qual té com a elements des de 0 (inclòs) fins a theArgs.length (no inclòs) els arguments passats a la funció.

- -

A l'exemple de sobre, theArgs aglutina el tercer argument de la funció, ja que el primer està mapejat a a  i el segon està mapejat a b , i tota la resta d'arguments consecutius. 

- -

Diferència entre els paràmetres rest i l'objecte arguments

- -

Existeixen tres diferències principals entre els  paràmetres rest i l'objecte arguments

- - - -

Des d' arguments fins a un array

- -

El paràmetre rest ha estat introduit per tal de reduir la quantitat de codi utilitzat que es introduit per els arguments

- -
// Anteriorment a l' existència del paràmetre rest el s' utilitzava seguent codi
-function f(a, b) {
-  var args = Array.prototype.slice.call(arguments, f.length);
-
-  // …
-}
-
-// equivalent a
-
-function f(a, b, ...args) {
-
-}
-
- -

Desestructurant paràmetres rest

- -

Els paràmetres rest es poden desestructurar, que vol dir que els valors que contenen es poden desenpaquetar en variables diferents i separades. Vegeu Destructuring assignment.

- -
function f(...[a, b, c]) {
-  return a + b + c;
-}
-
-f(1)          // NaN (bi c són undefined)
-f(1, 2, 3)    // 6
-f(1, 2, 3, 4) // 6 (el quart paràmetre no està desetructurat)
- -

Exemples

- -

Com que theArgs és un array, la propietat length en retorna el recompte:

- -
function fun1(...theArgs) {
-  console.log(theArgs.length);
-}
-
-fun1();  // 0
-fun1(5); // 1
-fun1(5, 6, 7); // 3
-
- -

En el seguent exemple el paràmetre rest s' utilitza per aglutinar tots els paràmetres passats a la funcció després del primer en un array. Després cadascun d' ells és multiplicat per el primer paràmetre passat a la funció i es retorna l' array.

- -
function multiply(multiplier, ...theArgs) {
-  return theArgs.map(function(element) {
-    return multiplier * element;
-  });
-}
-
-var arr = multiply(2, 1, 2, 3);
-console.log(arr); // [2, 4, 6]
-
- -

El seguent exemple mostra com els mètodes d' Array es poden utilitzar am paràmetres rest, però no amb l' objecte arguments :

- -
function sortRestArgs(...theArgs) {
-  var sortedArgs = theArgs.sort();
-  return sortedArgs;
-}
-
-console.log(sortRestArgs(5, 3, 7, 1)); // mostra 1, 3, 5, 7
-
-function sortArguments() {
-  var sortedArgs = arguments.sort();
-  return sortedArgs; // aquesta línia mai s' executarà
-}
-
-// genera el TypeError: arguments.sort no és una funció
-console.log(sortArguments(5, 3, 7, 1));
-
- -

Per tal de poder usar els mètodes d' Array amb l' objecte arguments , aquest s' ha de convertir primer en un array.

- -
function sortArguments() {
-  var args = Array.prototype.slice.call(arguments);
-  var sortedArgs = args.sort();
-  return sortedArgs;
-}
-console.log(sortArguments(5, 3, 7, 1)); // shows 1, 3, 5, 7
-
- -

Specifications

- - - - - - - - - - - - - - - - - - - -
SpecificationStatusComment
{{SpecName('ES6', '#sec-function-definitions', 'Function Definitions')}}{{Spec2('ES6')}}Initial definition
{{SpecName('ESDraft', '#sec-function-definitions', 'Function Definitions')}}{{Spec2('ESDraft')}} 
- -

Browser compatibility

- -
- - -

{{Compat("javascript.functions.rest_parameters")}}

-
- -

See also

- - diff --git a/files/ca/web/javascript/reference/functions/rest_parameters/index.html b/files/ca/web/javascript/reference/functions/rest_parameters/index.html new file mode 100644 index 0000000000..68fc5f0bba --- /dev/null +++ b/files/ca/web/javascript/reference/functions/rest_parameters/index.html @@ -0,0 +1,156 @@ +--- +title: Paràmetres rest +slug: Web/JavaScript/Reference/Functions/parameters_rest +translation_of: Web/JavaScript/Reference/Functions/rest_parameters +--- +
{{jsSidebar("Functions")}}
+ +

El paràmetre rest ens permet  representar un nombre indefinit d'arguments en forma d 'array.

+ +

Syntax

+ +
function f(a, b, ...theArgs) {
+  // ...
+}
+
+ +

Descripció

+ +

Si l'últim argument d'una funció, està prefixat amb l'operador ..., aquest esdevé un array el qual té com a elements des de 0 (inclòs) fins a theArgs.length (no inclòs) els arguments passats a la funció.

+ +

A l'exemple de sobre, theArgs aglutina el tercer argument de la funció, ja que el primer està mapejat a a  i el segon està mapejat a b , i tota la resta d'arguments consecutius. 

+ +

Diferència entre els paràmetres rest i l'objecte arguments

+ +

Existeixen tres diferències principals entre els  paràmetres rest i l'objecte arguments

+ + + +

Des d' arguments fins a un array

+ +

El paràmetre rest ha estat introduit per tal de reduir la quantitat de codi utilitzat que es introduit per els arguments

+ +
// Anteriorment a l' existència del paràmetre rest el s' utilitzava seguent codi
+function f(a, b) {
+  var args = Array.prototype.slice.call(arguments, f.length);
+
+  // …
+}
+
+// equivalent a
+
+function f(a, b, ...args) {
+
+}
+
+ +

Desestructurant paràmetres rest

+ +

Els paràmetres rest es poden desestructurar, que vol dir que els valors que contenen es poden desenpaquetar en variables diferents i separades. Vegeu Destructuring assignment.

+ +
function f(...[a, b, c]) {
+  return a + b + c;
+}
+
+f(1)          // NaN (bi c són undefined)
+f(1, 2, 3)    // 6
+f(1, 2, 3, 4) // 6 (el quart paràmetre no està desetructurat)
+ +

Exemples

+ +

Com que theArgs és un array, la propietat length en retorna el recompte:

+ +
function fun1(...theArgs) {
+  console.log(theArgs.length);
+}
+
+fun1();  // 0
+fun1(5); // 1
+fun1(5, 6, 7); // 3
+
+ +

En el seguent exemple el paràmetre rest s' utilitza per aglutinar tots els paràmetres passats a la funcció després del primer en un array. Després cadascun d' ells és multiplicat per el primer paràmetre passat a la funció i es retorna l' array.

+ +
function multiply(multiplier, ...theArgs) {
+  return theArgs.map(function(element) {
+    return multiplier * element;
+  });
+}
+
+var arr = multiply(2, 1, 2, 3);
+console.log(arr); // [2, 4, 6]
+
+ +

El seguent exemple mostra com els mètodes d' Array es poden utilitzar am paràmetres rest, però no amb l' objecte arguments :

+ +
function sortRestArgs(...theArgs) {
+  var sortedArgs = theArgs.sort();
+  return sortedArgs;
+}
+
+console.log(sortRestArgs(5, 3, 7, 1)); // mostra 1, 3, 5, 7
+
+function sortArguments() {
+  var sortedArgs = arguments.sort();
+  return sortedArgs; // aquesta línia mai s' executarà
+}
+
+// genera el TypeError: arguments.sort no és una funció
+console.log(sortArguments(5, 3, 7, 1));
+
+ +

Per tal de poder usar els mètodes d' Array amb l' objecte arguments , aquest s' ha de convertir primer en un array.

+ +
function sortArguments() {
+  var args = Array.prototype.slice.call(arguments);
+  var sortedArgs = args.sort();
+  return sortedArgs;
+}
+console.log(sortArguments(5, 3, 7, 1)); // shows 1, 3, 5, 7
+
+ +

Specifications

+ + + + + + + + + + + + + + + + + + + +
SpecificationStatusComment
{{SpecName('ES6', '#sec-function-definitions', 'Function Definitions')}}{{Spec2('ES6')}}Initial definition
{{SpecName('ESDraft', '#sec-function-definitions', 'Function Definitions')}}{{Spec2('ESDraft')}} 
+ +

Browser compatibility

+ +
+ + +

{{Compat("javascript.functions.rest_parameters")}}

+
+ +

See also

+ + diff --git a/files/ca/web/javascript/reference/global_objects/array/entries/index.html b/files/ca/web/javascript/reference/global_objects/array/entries/index.html new file mode 100644 index 0000000000..8b67c06038 --- /dev/null +++ b/files/ca/web/javascript/reference/global_objects/array/entries/index.html @@ -0,0 +1,105 @@ +--- +title: Array.prototype.entries() +slug: Web/JavaScript/Referencia/Objectes_globals/Array/entries +translation_of: Web/JavaScript/Reference/Global_Objects/Array/entries +--- +
{{JSRef}}
+ +

El mètode entries() retorna un nou objecte Array Iterator que conté els parells clau/valor per a cada posició de l'array.

+ +

Sintaxi

+ +
arr.entries()
+ +

Exemples

+ +
var arr = ['a', 'b', 'c'];
+var eArr = arr.entries();
+
+console.log(eArr.next().value); // [0, 'a']
+console.log(eArr.next().value); // [1, 'b']
+console.log(eArr.next().value); // [2, 'c']
+
+ +

Especificacions

+ + + + + + + + + + + + + + + + + + + +
EspecificacióEstatComentaris
{{SpecName('ES6', '#sec-array.prototype.entries', 'Array.prototype.entries')}}{{Spec2('ES6')}}Definició inicial.
{{SpecName('ESDraft', '#sec-array.prototype.entries', 'Array.prototype.entries')}}{{Spec2('ESDraft')}} 
+ +

Compatibilitat amb navegadors

+ +
{{CompatibilityTable}}
+ +
+ + + + + + + + + + + + + + + + + + + +
CaracterísticaChromeFirefox (Gecko)Internet ExplorerOperaSafari
Suport bàsic{{CompatChrome("38")}}{{CompatGeckoDesktop("28")}}{{CompatNo}}{{CompatOpera("25")}}{{CompatSafari("7.1")}}
+
+ +
+ + + + + + + + + + + + + + + + + + + + + +
CaracterísticaAndroidChrome for AndroidFirefox Mobile (Gecko)IE MobileOpera MobileSafari Mobile
Suport bàsic{{CompatNo}}{{CompatNo}}{{CompatGeckoMobile("28")}}{{CompatNo}}{{CompatNo}}8.0
+
+ +

Vegeu també

+ + diff --git a/files/ca/web/javascript/reference/global_objects/array/every/index.html b/files/ca/web/javascript/reference/global_objects/array/every/index.html new file mode 100644 index 0000000000..ad707b4990 --- /dev/null +++ b/files/ca/web/javascript/reference/global_objects/array/every/index.html @@ -0,0 +1,220 @@ +--- +title: Array.prototype.every() +slug: Web/JavaScript/Referencia/Objectes_globals/Array/every +translation_of: Web/JavaScript/Reference/Global_Objects/Array/every +--- +
{{JSRef}}
+ +

El mètode every() comprova si tots els elements d'un array passen el test implementat per la funció proporcionada.

+ +

Sintaxi

+ +
arr.every(callback[, thisArg])
+ +

Paràmetres

+ +
+
callback
+
Funció utilitzada com a test per a cada element, rep tres arguments: +
+
valorActual
+
L'element de l'array que està sent avaluat.
+
posició
+
La posició que l'element passat al primer paràmetre ocupa dins l'array.
+
array
+
L'array des del que s'ha cridat el mètode every().
+
+
+
thisArg
+
Opcional. Valor que valdrà la variable this quan s'estigui executant la funció callback.
+
+ +

Descripció

+ +

every() executa la funció callback un cop per a cada element present a l'array fins que troba un per al qual callback retorna un valor falsy (és a dir, un valor que esdebé fals si es realitza una conversió de tipus a Boolean). Si es troba aquest element, el mètode every retorna immediatament false. En cas contrari, si callback ha retornat un valor true per a tots els elements, every retornarà true. Només s'invocarà la funció callback en les posicions de l'array que tinguin un valor assignat, és a dir, mai es cridarà per a posicions que han estat esborrades o el valor de les quals no ha estat mai assignat.

+ +

S'invoca callback amb tres arguments: el valor de l'element, la posició de l'element dins l'array, i l'objecte array que es recorrerà.

+ +

Si es proporciona el paràmetre thisArg al mètode every(), aquest es passarà a callback quan s'invoqui, i serà el valor que mostrarà la variable this. En cas contrari, s'utilitzarà el valor undefined com a valor per a this. El valor de this observable en última instància per callback es determinarà d'acord a les regles per a determinar el valor de this observat per una funció.

+ +

every() no mutarà l'array quan sigui cridada.

+ +

El rang d'elements processat per every() és determinat abans de la primera invocació de callback. Els elements que s'afegeixin a l'array després de la crida a every() no seran visitats per callback. Si el valor d'un element encara no visitat canvia, el valor que es passarà a callback serà el valor que tingui aquest element a l'hora de visitar-lo; els elements que s'esborrin no es visitaran.

+ +

every es comporta com un quantificador "for all" en matemàtiques. En concret, per a un array buit retornarà true (s'anomena veritat per buit el fet que tots els elements d'un grup buit satisfacin qualsevol condició donada).

+ +

Exemples

+ +

Comprovar el tamany de tots els elements d'un array

+ +

L'exemple següent comprova si tots els elements d'un array son majors de 10.

+ +
function isBigEnough(element, index, array) {
+  return element >= 10;
+}
+[12, 5, 8, 130, 44].every(isBigEnough);   // false
+[12, 54, 18, 130, 44].every(isBigEnough); // true
+
+ +

Utilitzar funcions flexta

+ +

Les funcions fletxa ofereixen una sintaxi reduïda per a realitzar el mateix test.

+ +
[12, 5, 8, 130, 44].every(elem => elem >= 10); // false
+[12, 54, 18, 130, 44].every(elem => elem >= 10); // true
+ +

Polyfill

+ +

every va ser afegida  al standard ECMA-262 en la cinquena edició; és per això que pot no estar disponible en certes implementacions del standard. Es pot proporcionar la seva funcionalitat inserint l'script següent a l'inici dels vostres scripts, permetent l'ús de every() en implementacions que no la suporten de forma nativa. Aquest algoritme és exactament l'especificat a l'ECMA-262, cinquena edició, assumint que Object i TypeError tenen els valors originals i que callbackfn.call es correspon amb el valor original de {{jsxref("Function.prototype.call")}}.

+ +
if (!Array.prototype.every) {
+  Array.prototype.every = function(callbackfn, thisArg) {
+    'use strict';
+    var T, k;
+
+    if (this == null) {
+      throw new TypeError('this is null or not defined');
+    }
+
+    // 1. Let O be the result of calling ToObject passing the this
+    //    value as the argument.
+    var O = Object(this);
+
+    // 2. Let lenValue be the result of calling the Get internal method
+    //    of O with the argument "length".
+    // 3. Let len be ToUint32(lenValue).
+    var len = O.length >>> 0;
+
+    // 4. If IsCallable(callbackfn) is false, throw a TypeError exception.
+    if (typeof callbackfn !== 'function') {
+      throw new TypeError();
+    }
+
+    // 5. If thisArg was supplied, let T be thisArg; else let T be undefined.
+    if (arguments.length > 1) {
+      T = thisArg;
+    }
+
+    // 6. Let k be 0.
+    k = 0;
+
+    // 7. Repeat, while k < len
+    while (k < len) {
+
+      var kValue;
+
+      // a. Let Pk be ToString(k).
+      //   This is implicit for LHS operands of the in operator
+      // b. Let kPresent be the result of calling the HasProperty internal
+      //    method of O with argument Pk.
+      //   This step can be combined with c
+      // c. If kPresent is true, then
+      if (k in O) {
+
+        // i. Let kValue be the result of calling the Get internal method
+        //    of O with argument Pk.
+        kValue = O[k];
+
+        // ii. Let testResult be the result of calling the Call internal method
+        //     of callbackfn with T as the this value and argument list
+        //     containing kValue, k, and O.
+        var testResult = callbackfn.call(T, kValue, k, O);
+
+        // iii. If ToBoolean(testResult) is false, return false.
+        if (!testResult) {
+          return false;
+        }
+      }
+      k++;
+    }
+    return true;
+  };
+}
+
+ +

Especificacions

+ + + + + + + + + + + + + + + + + + + + + + + + +
EspecificaicóEstatComentaris
{{SpecName('ES5.1', '#sec-15.4.4.16', 'Array.prototype.every')}}{{Spec2('ES5.1')}}Definició inicial. Implemnetat a JavaScript 1.6.
{{SpecName('ES6', '#sec-array.prototype.every', 'Array.prototype.every')}}{{Spec2('ES6')}} 
{{SpecName('ESDraft', '#sec-array.prototype.every', 'Array.prototype.every')}}{{Spec2('ESDraft')}} 
+ +

Compatibilitat amb navegadors

+ +
{{CompatibilityTable}}
+ +
+ + + + + + + + + + + + + + + + + + + +
CaracterísticaChromeFirefox (Gecko)Internet ExplorerOperaSafari
Suport bàsic{{CompatVersionUnknown}}{{CompatGeckoDesktop("1.8")}}{{CompatIE("9")}}{{CompatVersionUnknown}}{{CompatVersionUnknown}}
+
+ +
+ + + + + + + + + + + + + + + + + + + + + +
CaracterísticaAndroidChrome for AndroidFirefox Mobile (Gecko)IE MobileOpera MobileSafari Mobile
Suport bàsic{{CompatVersionUnknown}}{{CompatVersionUnknown}}{{CompatGeckoMobile("1.8")}}{{CompatVersionUnknown}}{{CompatVersionUnknown}}{{CompatVersionUnknown}}
+
+ +

Vegeu també

+ + diff --git a/files/ca/web/javascript/reference/global_objects/array/fill/index.html b/files/ca/web/javascript/reference/global_objects/array/fill/index.html new file mode 100644 index 0000000000..e1952a8407 --- /dev/null +++ b/files/ca/web/javascript/reference/global_objects/array/fill/index.html @@ -0,0 +1,173 @@ +--- +title: Array.prototype.fill() +slug: Web/JavaScript/Referencia/Objectes_globals/Array/fill +translation_of: Web/JavaScript/Reference/Global_Objects/Array/fill +--- +
{{JSRef}}
+ +

El mètode fill() omple tots els elements d'un array a partir d'una posició inicial fins a una posició final amb un valor estàtic predeterminat.

+ +

Sintaxi

+ +
arr.fill(valor[, posInicial = 0[, posFinal = this.length]])
+ +

Paràmetres

+ +
+
valor
+
Valor amb el que s'omplirà l'array.
+
posInicial
+
Opcional. Posició inicial.
+
posFinal
+
Opcional. Posició final.
+
+ +

Descripció

+ +

L'interval d'elements a omplir és [posInicial, posFinal) (inici inclusiu, final exclusiu).

+ +

El mètode fill accepta fins a tres arguments: valor, posInicialposFinal.

+ +

Els arguments posInicial i posFinal són opcionals i si no s'especifiquen prenen per defecte els valors 0 i la propietat length de l'objecte this, respectivament.

+ +

Si posInicial és negatiu, es considera com a length+start on length és la mida de l'array. Si posFinal és negatiu es considera com a length+end.

+ +

La funció fill és genèrica intencionalment i no requereix que el valor this sigui un objecte de tipus Array.

+ +

El mètode fill és mutable, ja que canviarà l'objecte this en si mateix i després el retornarà com a resultat, en comptes de retornar una copia d'aquest.

+ +

Exemples

+ +
[1, 2, 3].fill(4);               // [4, 4, 4]
+[1, 2, 3].fill(4, 1);            // [1, 4, 4]
+[1, 2, 3].fill(4, 1, 2);         // [1, 4, 3]
+[1, 2, 3].fill(4, 1, 1);         // [1, 2, 3]
+[1, 2, 3].fill(4, -3, -2);       // [4, 2, 3]
+[1, 2, 3].fill(4, NaN, NaN);     // [1, 2, 3]
+Array(3).fill(4);                // [4, 4, 4]
+[].fill.call({ length: 3 }, 4);  // {0: 4, 1: 4, 2: 4, length: 3}
+
+ +

Polyfill

+ +
if (!Array.prototype.fill) {
+  Array.prototype.fill = function(value) {
+
+    // Pasos 1-2.
+    if (this == null) {
+      throw new TypeError('this is null or not defined');
+    }
+
+    var O = Object(this);
+
+    // Pasos 3-5.
+    var len = O.length >>> 0;
+
+    // Pasos 6-7.
+    var start = arguments[1];
+    var relativeStart = start >> 0;
+
+    // Pasos 8.
+    var k = relativeStart < 0 ?
+      Math.max(len + relativeStart, 0) :
+      Math.min(relativeStart, len);
+
+    // Pasos 9-10.
+    var end = arguments[2];
+    var relativeEnd = end === undefined ?
+      len : end >> 0;
+
+    // Pasos 11.
+    var final = relativeEnd < 0 ?
+      Math.max(len + relativeEnd, 0) :
+      Math.min(relativeEnd, len);
+
+    // Pasos 12.
+    while (k < final) {
+      O[k] = value;
+      k++;
+    }
+
+    // Pasos 13.
+    return O;
+  };
+}
+
+ +

Especificacions

+ + + + + + + + + + + + + + +
EspecificacióEstatComentaris
{{SpecName('ES6', '#sec-array.prototype.fill', 'Array.prototype.fill')}}{{Spec2('ES6')}}Definició inicial.
+ +

Compatibilitat amb navegadors

+ +
{{CompatibilityTable}}
+ +
+ + + + + + + + + + + + + + + + + + + +
CaracterísticaChromeFirefox (Gecko)Internet ExplorerOperaSafari
Suport bàsic{{CompatChrome("45")}} [1]{{CompatGeckoDesktop("31")}}{{CompatNo}}{{CompatNo}}{{CompatSafari("7.1")}}
+
+ +
+ + + + + + + + + + + + + + + + + + + + + +
CaracterísticaAndroidChrome for AndroidFirefox Mobile (Gecko)IE MobileOpera MobileSafari Mobile
Suport bàsic{{CompatNo}}{{CompatNo}}{{CompatGeckoMobile("31")}}{{CompatNo}}{{CompatNo}}8.0
+
+ +

[1] A partir del Chrome 36, està disponible a través d'una preferència. A chrome://flags, activeu l'entrada “Enable Experimental JavaScript”.

+ +

Vegeu també

+ + diff --git a/files/ca/web/javascript/reference/global_objects/array/filter/index.html b/files/ca/web/javascript/reference/global_objects/array/filter/index.html new file mode 100644 index 0000000000..c1bfec77f3 --- /dev/null +++ b/files/ca/web/javascript/reference/global_objects/array/filter/index.html @@ -0,0 +1,213 @@ +--- +title: Array.prototype.filter() +slug: Web/JavaScript/Referencia/Objectes_globals/Array/filter +translation_of: Web/JavaScript/Reference/Global_Objects/Array/filter +--- +
{{JSRef}}
+ +

El mètode filter() crea un nou array amb tots els elements que passin el test implementat per la funció que passa com a argument.

+ +

Sintaxi

+ +
arr.filter(callback[, thisArg])
+ +

Paràmetres

+ +
+
callback
+
Funció que s'emprarà per a testejar cada element de l'array. Aquesta serà invocada amb els arguments (element, posició, array). Ha de retornar true per als elements que es vulguin conservar i false en qualsevol altre cas.
+
element
+
El element actual que s'esta processant a l'Array.
+
thisArg
+
Opcional. Valor que rebrà this durant l'execució de la funció callback.
+
+ +

Descripció

+ +

filter() crida la funció callback proporcionada un cop per cada element de l'array, i construeix un nou array amb tots els elements per als quals la funció callback retorni el valor true o bé un valor que pugui ser interpretat com a true. Només escridarà la funció callback per a posicions de l'array que tinguin valors assignats; no es cridarà per a posicions que han estat esborrades o que mai hagin tingut assignat un element. Els elements que no passsin el test de callback seràn simplement ignorats i en cap cas seran afegits al nou array.

+ +

S'invoca callback tot passant-li els tres arguments següents:

+ +
    +
  1. el valor de l'element
  2. +
  3. la posició de l'element
  4. +
  5. L'objecte array que s'està recorrent
  6. +
+ +

Si es proporciona el paràmetre thisArg a la crida de filter, aquest es passarà a callback quan s'invoqui per a ser utilitzat com a this dins la funció.  En qualsevol altre cas el valor que rebrà this dins la funció callback serà undefined. El valor de this que serà finalment observable dins de callback és determinat d'acord a les regles habituals per a determinar el valor de this observat dins d'una funció.

+ +

filter() mai modificarà l'array des del qual s'invoca.

+ +

El rang dels elements processats per filter() es determina abans de la primera invocació de callback. Els elements que s'afegeixin a l'array un cop la crida a  filter() hagi començat no seran visibles per a callback. Els elements que es modifiquin o s'esborrin durant aquest periode tindran el valor que els hi pertoqui al moment de cridar la funció callback; els elements que s'hagin eliminat no es visitaran.

+ +

Exemples

+ +

Exemple: Descartar tots els valors petits

+ +

L'exemple següent utilitza filter() per a crear un array filtrat que contindrà tots els elements amb valors menors de 10.

+ +
function esProuGran(valor) {
+  return valor >= 10;
+}
+var filtrat = [12, 5, 8, 130, 44].filter(esProuGran);
+// filtrat val [12, 130, 44]
+
+ +

Exemple: Descartar entrades invàlides de JSON

+ +

L'exemple següent utilitza filter() per a crear un array que no contingui cap entrada de JSON amb una id numèrica no vàlida o amb valor menor que zero.

+ +
var arr = [
+  { id: 15 },
+  { id: -1 },
+  { id: 0 },
+  { id: 3 },
+  { id: 12.2 },
+  { },
+  { id: null },
+  { id: NaN },
+  { id: 'undefined' }
+];
+
+var invalidEntries = 0;
+
+function filterByID(obj) {
+  if ('id' in obj && typeof(obj.id) === 'number' && !isNaN(obj.id)) {
+    return true;
+  } else {
+    invalidEntries++;
+    return false;
+  }
+}
+
+var arrByID = arr.filter(filterByID);
+
+console.log('Array filtrat\n', arrByID);
+// [{ id: 15 }, { id: -1 }, { id: 0 }, { id: 3 }, { id: 12.2 }]
+
+console.log('Nombre d'entrades invàlides = ', invalidEntries);
+// 4
+
+ +

Polyfill

+ +

filter() va ser afegit al standard ECMA-262 a la cinquena edició; degut a això aquesta funció pot no ser present a totes les implementacions del standard. Es pot solucionar aquest problema inserint el codi següent al principi dels scripts, permetent l'ús de filter() en implementacions de l'ECMA-262 que no la incorporin per defecte. Aquest algoritme és exactament l'especificat per l'ECMA-262, 5a edició, i assumeix que fn.call s'evalua al valor original de {{jsxref("Function.prototype.call()")}} i que {{jsxref("Array.prototype.push()")}} te el seu valor original.

+ +
if (!Array.prototype.filter) {
+  Array.prototype.filter = function(fun/*, thisArg*/) {
+    'use strict';
+
+    if (this === void 0 || this === null) {
+      throw new TypeError();
+    }
+
+    var t = Object(this);
+    var len = t.length >>> 0;
+    if (typeof fun !== 'function') {
+      throw new TypeError();
+    }
+
+    var res = [];
+    var thisArg = arguments.length >= 2 ? arguments[1] : void 0;
+    for (var i = 0; i < len; i++) {
+      if (i in t) {
+        var val = t[i];
+
+        // NOTA: Tècnicament hauria de ser Object.defineProperty
+        //       a la posició següent ja que push pot veure's afectat per
+        //       les propietats de Object.prototype i Array.prototype.
+        //       Però aquest mètode és nou i només hi haurà col·lisions
+        //       en casos excepcionals, aixíq ue utilitzem l'alternativa més compatible.
+        if (fun.call(thisArg, val, i, t)) {
+          res.push(val);
+        }
+      }
+    }
+
+    return res;
+  };
+}
+
+ +

Especificacions

+ + + + + + + + + + + + + + + + + + + +
EspecificacióEstatComentaris
{{SpecName('ES5.1', '#sec-15.4.4.20', 'Array.prototype.filter')}}{{Spec2('ES5.1')}}Definició inicial. Implementat a JavaScript 1.6.
{{SpecName('ES6', '#sec-array.prototype.filter', 'Array.prototype.filter')}}{{Spec2('ES6')}} 
+ +

Compatibilitat amb navegadors

+ +
{{CompatibilityTable}}
+ +
+ + + + + + + + + + + + + + + + + + + +
CaracterísticaChromeFirefox (Gecko)Internet ExplorerOperaSafari
Suport bàsic{{CompatVersionUnknown}}{{CompatGeckoDesktop("1.8")}}{{CompatIE("9")}}{{CompatVersionUnknown}}{{CompatVersionUnknown}}
+
+ +
+ + + + + + + + + + + + + + + + + + + + + +
CaracterísticaAndroidChrome for AndroidFirefox Mobile (Gecko)IE MobileOpera MobileSafari Mobile
Suport bàsic{{CompatVersionUnknown}}{{CompatVersionUnknown}}{{CompatGeckoMobile("1.8")}}{{CompatVersionUnknown}}{{CompatVersionUnknown}}{{CompatVersionUnknown}}
+
+ +

Vegeu també

+ + diff --git a/files/ca/web/javascript/reference/global_objects/array/find/index.html b/files/ca/web/javascript/reference/global_objects/array/find/index.html new file mode 100644 index 0000000000..8ee7742c09 --- /dev/null +++ b/files/ca/web/javascript/reference/global_objects/array/find/index.html @@ -0,0 +1,191 @@ +--- +title: Array.prototype.find() +slug: Web/JavaScript/Referencia/Objectes_globals/Array/find +translation_of: Web/JavaScript/Reference/Global_Objects/Array/find +--- +
{{JSRef}}
+ +

El mètode find() retorna un valor valor pertanyent a l'array si un element de l'array satisfà la funció de testeig donada. En cas contrari retornarà {{jsxref("undefined")}}.

+ +

Vegeu també el mètode {{jsxref("Array.findIndex", "findIndex()")}}, que retorna la posició a la qual s'ha trobat l'element que satisfà la funció de testeig, en comptes del seu valor.

+ +

Sintaxi

+ +
arr.find(callback[, thisArg])
+ +

Paràmetres

+ +
+
callback
+
Funció que s'executarà per a cada valor de l'array, rep tres arguments: +
+
element
+
L'element de l'array que s'està processant actualment.
+
posició
+
La posició de l'array que s'està processant actualment.
+
array
+
L'array des del qual s'ha cridat el mètode find.
+
+
+
thisArg
+
Opcional. L'objecte a utilitzar com a this mentre s'executi callback.
+
+ +

Descripció

+ +

El mètode find executa la funció callback un cop per a cada element present a l'array fins que trobi un on callback retorni true. Si es troba aquest element el mètode find retorna el valor de l'element trobat immediatament. En cas contrari find retornarà {{jsxref("undefined")}}. callback només serà invocada per a posicions de l'array que tinguin valors assignats; no serà invoada per a posicions que s'hagin eliminat o que mai hagin tingut assignat un valor.

+ +

La invocaicó de callback té tres arguments: el valor de l'element, la posició de l'element i l'objecte array que està sent recorregut.

+ +

Si es proporciona el paràmetre thisArg al cridar el mètode find, aquest serà utilitzat com a this per a cada invocació del mètode callback. En cas de no ser proporcionat s'utilitzarà {{jsxref("undefined")}}.

+ +

find no mutarà l'array des del que es crida.

+ +

El rang d'elemnets que find processarà es determina abans de la primera invocació a callback. Els elements afegits a l'array després de la crida a find no seran visitats per callback. Si un element existent, no visitat encara, rep un altre valor, el valor percebut per callback serà aquell que tingui l'element al ser visitat; els elements visitats no són visitats.

+ +

Exemples

+ +

Trobar un objecte en un array segons el valor d'una propietat

+ +
var inventory = [
+    {name: 'apples', quantity: 2},
+    {name: 'bananas', quantity: 0},
+    {name: 'cherries', quantity: 5}
+];
+
+function findCherries(fruit) {
+    return fruit.name === 'cherries';
+}
+
+console.log(inventory.find(findCherries)); // { name: 'cherries', quantity: 5 }
+ +

Trobar un nombre primer en un array

+ +

L'exemple següent troba un element dins l'array el valor del qual sigui un nombre primer (o bé retorna {{jsxref("undefined")}} si no n'hi ha cap).

+ +
function isPrime(element, index, array) {
+  var start = 2;
+  while (start <= Math.sqrt(element)) {
+    if (element % start++ < 1) {
+      return false;
+    }
+  }
+  return element > 1;
+}
+
+console.log([4, 6, 8, 12].find(isPrime)); // undefined, no trobat
+console.log([4, 5, 8, 12].find(isPrime)); // 5
+
+ +

Polyfill

+ +

Aquest mètode es va afegira la especificació 2015 de l'ECMAScript i pot no estar disponible encara en algunes implementacions de JavaScript. Tot i així es pot utilitzar el codi següent per a utilitzar-lo en entorns on no estigui disponible:

+ +
if (!Array.prototype.find) {
+  Array.prototype.find = function(predicate) {
+    if (this === null) {
+      throw new TypeError('Array.prototype.find called on null or undefined');
+    }
+    if (typeof predicate !== 'function') {
+      throw new TypeError('predicate must be a function');
+    }
+    var list = Object(this);
+    var length = list.length >>> 0;
+    var thisArg = arguments[1];
+    var value;
+
+    for (var i = 0; i < length; i++) {
+      value = list[i];
+      if (predicate.call(thisArg, value, i, list)) {
+        return value;
+      }
+    }
+    return undefined;
+  };
+}
+
+ +

Especificacions

+ + + + + + + + + + + + + + + + + + + +
EspecificacióEstatComentaris
{{SpecName('ES6', '#sec-array.prototype.find', 'Array.prototype.find')}}{{Spec2('ES6')}}Definició inicial.
{{SpecName('ESDraft', '#sec-array.prototype.find', 'Array.prototype.find')}}{{Spec2('ESDraft')}} 
+ +

Compatibilitat amb navegadors

+ +
{{CompatibilityTable}}
+ +
+ + + + + + + + + + + + + + + + + + + + + +
CaracterísticaChromeFirefox (Gecko)Internet ExplorerEdgeOperaSafari
Suport bàsic{{CompatChrome(45.0)}}{{CompatGeckoDesktop("25.0")}}{{CompatNo}}12{{CompatNo}}{{CompatSafari("7.1")}}
+
+ +
+ + + + + + + + + + + + + + + + + + + + + + + +
CaracterísticaAndroidChrome for AndroidFirefox Mobile (Gecko)IE MobileEdgeOpera MobileSafari Mobile
Suport bàsic{{CompatNo}}{{CompatNo}}{{CompatGeckoMobile("25.0")}}{{CompatNo}}12{{CompatNo}}8.0
+
+ +

Vegeu també

+ + diff --git a/files/ca/web/javascript/reference/global_objects/array/findindex/index.html b/files/ca/web/javascript/reference/global_objects/array/findindex/index.html new file mode 100644 index 0000000000..5b089bdb98 --- /dev/null +++ b/files/ca/web/javascript/reference/global_objects/array/findindex/index.html @@ -0,0 +1,173 @@ +--- +title: Array.prototype.findIndex() +slug: Web/JavaScript/Referencia/Objectes_globals/Array/findIndex +translation_of: Web/JavaScript/Reference/Global_Objects/Array/findIndex +--- +
{{JSRef}}
+ +

El mètode findIndex() retorna una posició de l'array si un element de l'array satisfà la funció de testeig donada. En cas contrari retornarà -1.

+ +

Vegeu també el mètode {{jsxref("Array.find", "find()")}}, que retorna el valor trobat dins l'array en comptes de la posició.

+ +

Sintaxi

+ +
arr.findIndex(callback[, thisArg])
+ +

Parameters

+ +
+
callback
+
Funció que s'executarà per a cada valor de l'array, rep tres arguments: +
+
element
+
L'element de l'array que s'està processant actualment.
+
posició
+
La posició de l'array que s'està processant actualment.
+
array
+
L'array des del qual s'ha cridat el mètode find.
+
+
+
thisArg
+
Opcional. L'objecte a utilitzar com a this mentre s'executi callback.
+
+ +

Descripció

+ +

El mètode findIndex executa la funció callback un cop per a cada element present a l'array fins que trobi un on callback retorni true. Si es troba aquest element el mètode findIndex retorna la posició de l'element trobat immediatament. En cas contrari findIndex retornarà -1. callback només serà invocada per a posicions de l'array que tinguin valors assignats; no serà invoada per a posicions que s'hagin eliminat o que mai hagin tingut assignat un valor.

+ +

La invocaicó de callback té tres arguments: el valor de l'element, la posició de l'element i l'objecte array que està sent recorregut.

+ +

Si es proporciona el paràmetre thisArg al cridar el mètode findIndex, aquest serà utilitzat com a this per a cada invocació del mètode callback. En cas de no ser proporcionat s'utilitzarà {{jsxref("undefined")}}.

+ +

findIndex no mutarà l'array des del que es crida.

+ +

El rang d'elemnets que findIndex processarà es determina abans de la primera invocació a callback. Els elements afegits a l'array després de la crida a findIndex no seran visitats per callback. Si un element existent, no visitat encara, rep un altre valor, el valor percebut per callback serà aquell que tingui l'element al ser visitat; els elements visitats no són visitats.

+ +

Exemples

+ +

Trobar la posició d'un nombre primer dins un array

+ +

L'exemple següent trobarà la posició d'un element de l'array que sigui un nombre primer (o bé retornarà -1 si no n'hi ha cap).

+ +
function isPrime(element, index, array) {
+  var start = 2;
+  while (start <= Math.sqrt(element)) {
+    if (element % start++ < 1) {
+      return false;
+    }
+  }
+  return element > 1;
+}
+
+console.log([4, 6, 8, 12].findIndex(isPrime)); // -1, not found
+console.log([4, 6, 7, 12].findIndex(isPrime)); // 2
+
+ +

Polyfill

+ +

Aquest mètode es va afegir a la especificació 6 de l'ECMAScript i pot no estar disponible encara en algunes implementacions de JavaScript. Tot i així es pot utilitzar el codi següent per a utilitzar-lo en entorns on no estigui disponible:

+ +
if (!Array.prototype.findIndex) {
+  Array.prototype.findIndex = function(predicate) {
+    if (this === null) {
+      throw new TypeError('Array.prototype.findIndex called on null or undefined');
+    }
+    if (typeof predicate !== 'function') {
+      throw new TypeError('predicate must be a function');
+    }
+    var list = Object(this);
+    var length = list.length >>> 0;
+    var thisArg = arguments[1];
+    var value;
+
+    for (var i = 0; i < length; i++) {
+      value = list[i];
+      if (predicate.call(thisArg, value, i, list)) {
+        return i;
+      }
+    }
+    return -1;
+  };
+}
+
+ +

Especificacions

+ + + + + + + + + + + + + + + + + + + +
EspecificacióEstatComentaris
{{SpecName('ES6', '#sec-array.prototype.findIndex', 'Array.prototype.findIndex')}}{{Spec2('ES6')}}Definició inicial.
{{SpecName('ESDraft', '#sec-array.prototype.findIndex', 'Array.prototype.findIndex')}}{{Spec2('ESDraft')}} 
+ +

Compatibilitat amb navegadors

+ +
{{CompatibilityTable}}
+ +
+ + + + + + + + + + + + + + + + + + + +
CaracterísticaChromeFirefox (Gecko)Internet ExplorerOperaSafari
Suport bàsic{{CompatChrome(45.0)}}{{CompatGeckoDesktop("25.0")}}{{CompatNo}}{{CompatNo}}{{CompatSafari("7.1")}}
+
+ +
+ + + + + + + + + + + + + + + + + + + + + +
CaracterísticaAndroidChrome for AndroidFirefox Mobile (Gecko)IE MobileOpera MobileSafari Mobile
Suport bàsic{{CompatNo}}{{CompatNo}}{{CompatGeckoMobile("25.0")}}{{CompatNo}}{{CompatNo}}8.0
+
+ +

Vegeu també

+ + diff --git a/files/ca/web/javascript/reference/global_objects/array/foreach/index.html b/files/ca/web/javascript/reference/global_objects/array/foreach/index.html new file mode 100644 index 0000000000..4d391346eb --- /dev/null +++ b/files/ca/web/javascript/reference/global_objects/array/foreach/index.html @@ -0,0 +1,238 @@ +--- +title: Array.prototype.forEach() +slug: Web/JavaScript/Referencia/Objectes_globals/Array/forEach +translation_of: Web/JavaScript/Reference/Global_Objects/Array/forEach +--- +
{{JSRef}}
+ +

El mètode forEach() executa la funció rebuda un cop per cada element de l'array.

+ +

Sintaxi

+ +
arr.forEach(callback[, thisArg])
+ +

Paràmetres

+ +
+
callback
+
Funció a executar per a cada element. Aquesta funció rebrà tres paràmetres: +
+
valor
+
L'element que s'està processant ara mateix a l'array.
+
posició
+
La posició que l'element actual ocupa dins l'array.
+
array
+
L'array al qual el mètode forEach s'aplica.
+
+
+
thisArg
+
Opcional. Valor que s'utilitzarà com a this a l'hora d'executar la funció callback.
+
+ +

Descripció

+ +

forEach() executa la funció callback rebuda com a argument un cop per cada element present a l'array, en ordre ascendent. No es cridarà la funció per a elements que s'hagin eliminat o que no hagin rebut cap valor (és a dir, arrays disperses).

+ +

S'invocarà callback amb els tres arguments següents:

+ + + +

Si es proporciona el paràmetre thisArg a forEach(), aquest es passarà a callback quan es cridi, i es podrà accedir a ell mitjançant la paraula clau this. En el cas que no es proporcioni el paràmetre this rebrà el valor {{jsxref("undefined")}}. El valor de this que serà observable per callback es determina d'acord a les regles usuals per a determinar el valor de this que una funció veu.

+ +

El rang dels elements processats per forEach() és determinat abans de la primera invocació de callback. Els elements que s'afegeixin a l'array després de la crida a forEach() no seran visitats per la funció callback. En el cas que es canviï el valor dels elements de l'array el valor que es passarà a callback serà el valor que tingui l'element en el moment que es visita. Els elements que s'han eliminat abans de ser visitats no es visitaran.

+ +

forEach() executa la funció callback un cop per cada element de l'array; a diferència de {{jsxref("Array.prototype.map()", "map()")}} i {{jsxref("Array.prototype.reduce()", "reduce()")}}, sempre retorna el valor {{jsxref("undefined")}} i no es pot encadenar. El cas d'ús típic és per executar efectes secundaris al final de la cadena.

+ +
+

Nota: L'única forma d'aturar un bucle forEach() és llençar una excepció. Si es requereix aquesta funcionalitat llavors el mètode .forEach() és l'eina incorrecta i es recomana utilitzar un bucle normal. Si el que es pretén és validar els elements d'un array contra un predicat i es requereix retornar un valor booleà, es recomana utilitzar la funció {{jsxref("Array.prototype.every()", "every()")}} o bé {{jsxref("Array.prototype.some()", "some()")}}.

+
+ +

Exemples

+ +

Imprimir el contingut d'un array

+ +

El codi següent mostra una línia per a cada element de l'array:

+ +
function logArrayElements(element, index, array) {
+  console.log('a[' + index + '] = ' + element);
+}
+
+// Cal destacar l'omissió, no hi ha cap element a la posició 2 així que aquesta no es visita
+[2, 5, , 9].forEach(logArrayElements);
+// Mostra:
+// a[0] = 2
+// a[1] = 5
+// a[3] = 9
+
+ +

Una funció per a copiar objectes

+ +

El codi següent crea una copia de l'objecte donat. Hi ha diverses formes de crear una copia d'un objecte, la forma següent és simplement una d'elles i es presenta per a explicar com funciona Array.prototype.forEach() tot utilitzant les funcions de meta-propietats de l'ECMAScript 5 a Object.*

+ +
function copy(obj) {
+  var copy = Object.create(Object.getPrototypeOf(obj));
+  var propNames = Object.getOwnPropertyNames(obj);
+
+  propNames.forEach(function(name) {
+    var desc = Object.getOwnPropertyDescriptor(obj, name);
+    Object.defineProperty(copy, name, desc);
+  });
+
+  return copy;
+}
+
+var obj1 = { a: 1, b: 2 };
+var obj2 = copy(obj1); // obj2 looks like o1 now
+
+ +

Polyfill

+ +

forEach() va ser afegida l'standard ECMA-262 en la cinquena edició; per aquest motiu aquesta funció pot no estar present en altres implementacions de l'standard. Es pot solventar aquest problema inserint el codi següent a l'inici dels vostres scripts. Això permetrà l'ús de forEach() en implementacions que no el suportin de forma nativa. Aquest algoritme és el mateix que l'especificat a l'ECMA-262, cinquena edició, si assumim que {{jsxref("Object")}} i {{jsxref("TypeError")}} tenen els seus valors originals i que callback.call es resol com al valor original de {{jsxref("Function.prototype.call()")}}.

+ +
// Production steps of ECMA-262, Edition 5, 15.4.4.18
+// Reference: http://es5.github.io/#x15.4.4.18
+if (!Array.prototype.forEach) {
+
+  Array.prototype.forEach = function(callback, thisArg) {
+
+    var T, k;
+
+    if (this == null) {
+      throw new TypeError(' this is null or not defined');
+    }
+
+    // 1. Assignem a O el resultat de cridar ToObject tot passant-li el valor de |this| com a argument.
+    var O = Object(this);
+
+    // 2. lenValue representa el resultat de cridar el mètode intern Get de O amb l'argument "length".
+    // 3. Assignem a len el valor ToUint32(lenValue).
+    var len = O.length >>> 0;
+
+    // 4. Si IsCallable(callback) és false, llençem una excepció TypeError.
+    // Vegeu: http://es5.github.com/#x9.11
+    if (typeof callback !== "function") {
+      throw new TypeError(callback + ' no és una funció');
+    }
+
+    // 5. Si s'ha passat thisArg com a aragument, assignem el seu valor a la variable T, en qualsevol altre cas deixem T com a undefined.
+    if (arguments.length > 1) {
+      T = thisArg;
+    }
+
+    // 6. Assignem 0 a la variable k
+    k = 0;
+
+    // 7. Repetir, mentre k < len
+    while (k < len) {
+
+      var kValue;
+
+      // a. Assignem ToString(k) a Pk.
+      //   Aquest comportament és implícit per a operands al cantó esquerra (de l'anglés LHS o Left-Hand-Side) de l'operador "in"This is implicit for LHS operands of the in operator
+      // b. Assignem el resultat de cridar el mètode intern HasProperty de O amb l'argument Pk a la variable kPresent
+      //   Podem combinar aquest pas amb c
+      // c. Si kPresent és true, llavors...
+      if (k in O) {
+
+        // i. Assignem a kValue el resultat de cridar el mètode intern Get de l'objecte O amb l'argument Pk.
+        kValue = O[k];
+
+        // ii. Cridem el mètode intern "call" del callback tot passant-li T com a valor de "this"
+        // així com una llista d'arguments que conté kValue, k i 0
+        callback.call(T, kValue, k, O);
+      }
+      // d. Incrementem el valor de k en 1.
+      k++;
+    }
+    // 8. retornem undefined
+  };
+}
+
+ +

Especificacions

+ + + + + + + + + + + + + + + + + + + +
EspecificacióEstatComentaris
{{SpecName('ES5.1', '#sec-15.4.4.18', 'Array.prototype.forEach')}}{{Spec2('ES5.1')}}Definició inicial. Implementat a JavaScript 1.6.
{{SpecName('ES6', '#sec-array.prototype.foreach', 'Array.prototype.forEach')}}{{Spec2('ES6')}} 
+ +

Compatibilitat amb navegadors

+ +
{{CompatibilityTable}}
+ +
+ + + + + + + + + + + + + + + + + + + +
CaracterísticaChromeFirefox (Gecko)Internet ExplorerOperaSafari
Suport bàsic{{CompatVersionUnknown}}{{CompatGeckoDesktop("1.8")}}{{CompatIE("9")}}{{CompatVersionUnknown}}{{CompatVersionUnknown}}
+
+ +
+ + + + + + + + + + + + + + + + + + + + + +
CaracterísticaAndroidChrome for AndroidFirefox Mobile (Gecko)IE MobileOpera MobileSafari Mobile
Suport bàsic{{CompatVersionUnknown}}{{CompatVersionUnknown}}{{CompatGeckoMobile("1.8")}}{{CompatVersionUnknown}}{{CompatVersionUnknown}}{{CompatVersionUnknown}}
+
+ +

Vegeu també

+ + diff --git a/files/ca/web/javascript/reference/global_objects/array/includes/index.html b/files/ca/web/javascript/reference/global_objects/array/includes/index.html new file mode 100644 index 0000000000..9f64b0e117 --- /dev/null +++ b/files/ca/web/javascript/reference/global_objects/array/includes/index.html @@ -0,0 +1,158 @@ +--- +title: Array.prototype.includes() +slug: Web/JavaScript/Referencia/Objectes_globals/Array/includes +translation_of: Web/JavaScript/Reference/Global_Objects/Array/includes +--- +
{{JSRef}}
+ +

El mètode includes() determina si un array inclou un element concret, retornant  true o false segons s'escaigui. 

+ +

Sintaxi

+ +
var boolean = array.includes(elementCercat[, desdePosicio])
+ +

Parameters

+ +
+
elementCercat
+
L'element a cercar.
+
desdePosicio
+
Opcional. La posició de l'array a partir de la qual començar la cerca de elementCercat. Un valor negatiu cercarà el nombre absolut donat de posicions contant des del final de l'array. El seu valor per defecte és 0.
+
+ +

Valor retornat

+ +

Un {{jsxref("Boolean")}}.

+ +

Exemples

+ +
[1, 2, 3].includes(2);     // true
+[1, 2, 3].includes(4);     // false
+[1, 2, 3].includes(3, 3);  // false
+[1, 2, 3].includes(3, -1); // true
+[1, 2, NaN].includes(NaN); // true
+
+ +

Polyfill

+ +
if (!Array.prototype.includes) {
+  Array.prototype.includes = function(searchElement /*, fromIndex*/ ) {
+    'use strict';
+    var O = Object(this);
+    var len = parseInt(O.length) || 0;
+    if (len === 0) {
+      return false;
+    }
+    var n = parseInt(arguments[1]) || 0;
+    var k;
+    if (n >= 0) {
+      k = n;
+    } else {
+      k = len + n;
+      if (k < 0) {k = 0;}
+    }
+    var currentElement;
+    while (k < len) {
+      currentElement = O[k];
+      if (searchElement === currentElement ||
+         (searchElement !== searchElement && currentElement !== currentElement)) { // NaN !== NaN
+        return true;
+      }
+      k++;
+    }
+    return false;
+  };
+}
+
+ +

Especificacions

+ + + + + + + + + + + + + + + + + + + +
EspecificacióEstatComentaris
{{SpecName('ES7', '#sec-array.prototype.includes', 'Array.prototype.includes')}}{{Spec2('ES7')}}Definició inicial.
{{SpecName('ESDraft', '#sec-array.prototype.includes', 'Array.prototype.includes')}}{{Spec2('ESDraft')}} 
+ +

Compatibilitat amb navegadors

+ +
{{CompatibilityTable}}
+ +
+ + + + + + + + + + + + + + + + + + + + + +
CaracterísticaChromeFirefox (Gecko)Internet ExplorerEdgeOperaSafari
Suport bàsic +

{{CompatChrome(47)}}

+
43{{CompatNo}}{{CompatNo}}349
+
+ +
+ + + + + + + + + + + + + + + + + + + + + + + +
CaracterísticaAndroidAndroid WebviewFirefox Mobile (Gecko)IE MobileOpera MobileSafari MobileChrome for Android
Suport bàsic{{CompatNo}} +

{{CompatChrome(47)}}

+
43{{CompatNo}}349 +

{{CompatChrome(47)}}

+
+
+ +

Vegeu també

+ + diff --git a/files/ca/web/javascript/reference/global_objects/array/index.html b/files/ca/web/javascript/reference/global_objects/array/index.html new file mode 100644 index 0000000000..da7c400799 --- /dev/null +++ b/files/ca/web/javascript/reference/global_objects/array/index.html @@ -0,0 +1,482 @@ +--- +title: Array +slug: Web/JavaScript/Referencia/Objectes_globals/Array +translation_of: Web/JavaScript/Reference/Global_Objects/Array +--- +
{{JSRef}}
+ +

Resum

+ +

L'objecte de JavaScript Array és un objecte global que s'utilitza per a construir arrays; que són objectes d'al nivell que representen llistes.

+ +

Crear un Array

+ +
var fruites = ["Poma", "Pera"];
+
+console.log(fruites.length);
+// 2
+
+ +

Accedir (mitjançant la posició) a un element d'un Array

+ +
var primer = fruites[0];
+// Poma
+
+var ultim = fruites[fruites.length - 1];
+// Pera
+
+ +

Recòrrer un Array

+ +
fruites.forEach(function (element, index, array) {
+  console.log(element, index);
+});
+// Poma 0
+// Pera 1
+
+ +

Afegir elements al final d'un Array

+ +
var nouTamany = fruites.push("Taronja");
+// ["Poma", "Pera", "Taronja"]
+
+ +

Eliminar l'element del final d'un Array

+ +
var ultim = fruites.pop(); // Elimina Taronja (del final)
+// ["Poma", "Pera"];
+
+ +

Eliminar l'element de l'inici d'un Array

+ +
var primer = fruites.shift(); // elimina Poma del principi del Array
+// ["Pera"];
+
+ +

Afegir un element a l'inici d'un Array

+ +
var nouTamany = fruites.unshift("Maduixa") // Afegir al principi
+// ["Maduixa", "Pera"];
+
+ +

Trobar la posició d'un element del Array

+ +
fruites.push("Mango");
+// ["Maduixa", "Pera", "Mango"]
+
+var pos = fruites.indexOf("Pera");
+// 1
+
+ +

Eliminar un element segons la seva posició

+ +
var elementEliminat = fruites.splice(pos, 1); // així és com s'elimina un element
+// ["Maduixa", "Mango"]
+
+ +

Copiar un Array

+ +
var shallowCopy = fruits.slice(); // així és com es copia
+// ["Maduixa", "Mango"]
+
+ +

Sintaxi

+ +
[element0, element1, ..., elementN]
+new Array(element0, element1[, ...[, elementN]])
+new Array(longitudArray)
+ +
+
elementN
+
S'inicialitza un array de JavaScript amb els elements donats, excepte si només es proporciona un sol argument al constructor Array i aquest argument és un nombre. (Vegeu a sota). Cal destacar que aquest cas especial només s'aplica a arrays de JavaScript creats mitjançant el constructor Array i no a literals array creats a partir de ls sintaxi de claus.
+
longitudArray
+
Si només es passa un sol argument al constructor Array i aquest argument és un nombre entre 0 232-1 (inclòs), aquest retorna un nou array de JavaScript amb la longitud especificada pel nombre passat com a argument. Si l'argument és qualsevol altre nombre es llença l'excepció {{jsxref("Global_Objects/RangeError", "RangeError")}}.
+
+ +

Descripció

+ +

Els arrays són objectes semblants a lliste el prototipus dels quals té mètodes que permeten realitzar operacions de travessa i mutació. Ni a longitud ni el tipus dels elements són fixos en els arrays de JavaScript. Com que el tamany d'un array pot canviar en qualsevol moment no es pot garantir la seva densitat. En general aquestes característiques són convenients; però si en algun cas aquestes característiques no fossin convenients es recomana considerar l'ús de arrays amb tipus.

+ +

Algunes persones creuen que no s'hauria de fer ús de arrays com amb finalitats associatives. En qualsevol cas sempre es pot utilitzar senzillament un {{jsxref("Global_Objects/Object", "objects")}} per a tal fet instead, tot i que fer-ho també té els seus inconvenients. Vegeu el post Diccionaris de JavaScript lleugers amb claus arbitràries per a exemple.

+ +

Accedir als elements d'un array

+ +

Els arrays de JavaScript comencen el compte de posició (índex) amb el zero: és a dir, el primer element d'un array ocupa la posició 0 i l'últim element d'un array es troba a l'índex amb valor del  {{jsxref("Array.length", "tamany")}} de l'array menys 1.

+ +
var arr = ['aquest és el primer element', 'aquest és el segon element'];
+console.log(arr[0]);              // mostra 'aquest és el primer element'
+console.log(arr[1]);              // mostra 'aquest és el segon element'
+console.log(arr[arr.length - 1]); // mostra 'aquest és el segon element'
+
+ +

Els elements d'un array són propietats de l'objecte de la mateixa que toString és una propietat, però intentar accedir un element d'un array de la manera que es mostra a continuació llença un error de sintaxi, ja que el nom de la propietat no és vàlid:

+ +
console.log(arr.0); // error de sintaxi
+
+ +

No hi ha res d'especial sobre els arrays de JavaScript i les propietats que causen aquest comportament. A JavaScript, les propietats que comencen amb un dígit no es poden referenciar amb la notació de punt; per a accedir-hi és necesari utilitzar la notació de claus. Per exemple, per a accedir a la propietat anomenada '3d' d'un objecte, l'única forma d'accedir-hi és mitjançant la notació de claus tal i com es mostra a continuació:

+ +
var anys = [1950, 1960, 1970, 1980, 1990, 2000, 2010];
+console.log(anys.0);   // error de sintaxi
+console.log(anys[0]);  // funciona
+
+ +
renderer.3d.setTexture(model, 'character.png');     // error de sintaxi
+renderer['3d'].setTexture(model, 'character.png');  // funciona
+
+ +

Fixeu-vos que a l'exemple de 3d, '3d' necessita cometes. És possible utilitzar cometes amb les posicions d'un array (per exemple, anys['2'] en comptes de anys[2]), tot i que no és necesari. El 2 a anys[2] és transformat en un string pel motor de JavaScript implícitament mitjançant el mètode toString. Per aquesta raó '2' i '02' es referirien a dues propietats diferents de l'objecte anys i l'exemple següent podría retornar true:

+ +
console.log(anys['2'] != anys['02']);
+
+ +

De la mateixa manera, les propietats d'objectes que utilitzin paraules clau com a nom(!) només es poden accedir mitjançant literals string en notació de claus (però poden accedir-se mitjançant notació de punt com a mínim al firefox 40.0a2):

+ +
var promise = {
+  'var'  : 'text',
+  'array': [1, 2, 3, 4]
+};
+
+console.log(promise['array']);
+
+ +

Relació  entre length i propietats numèriques

+ +

La propietat {{jsxref("Array.length", "length")}} dels arrays de JavaScript està relacionada amb les propietats numèriques. Diversos mètodes pertanyent de forma nativa a l'objecte array (com ara {{jsxref("Array.join", "join")}}, {{jsxref("Array.slice", "slice")}}, {{jsxref("Array.indexOf", "indexOf")}}, etcètera.) tenen en compte el valor de la propietat {{jsxref("Array.length", "length")}} quan són cridats. Altres mètodes, com ara {{jsxref("Array.push", "push")}} o {{jsxref("Array.splice", "splice")}}, també actualitzen el valor de la propietat {{jsxref("Array.length", "length")}}.

+ +
var fruites = [];
+fruites.push('banana', 'poma', 'prèssec');
+
+console.log(fruites.length); // 3
+
+ +

A l'hora d'assignar una propietat a un array de JavaScript, quan la propietat és una posició vàlida i aquesta posició cau fora dels límits que l'array té en aquell moment, el motor ha d'actualitzar la propietat {{jsxref("Array.length", "length")}} de l'array apropiadament:

+ +
fruites[5] = 'mango';
+console.log(fruites[5]); // 'mango'
+console.log(Object.keys(fruites));  // ['0', '1', '2', '5']
+console.log(fruites.length); // 6
+
+ +

Incrementant la longitud amb {{jsxref("Array.length", "length")}}.

+ +
fruites.length = 10;
+console.log(Object.keys(fruites)); // ['0', '1', '2', '5']
+console.log(fruites.length); // 10
+
+ +

Decrementar la propietat {{jsxref("Array.length", "length")}}, per contra, elimina elements.

+ +
fruites.length = 2;
+console.log(Object.keys(fruites)); // ['0', '1']
+console.log(fruites.length); // 2
+
+ +

Aquest comportament s'explica amb més detall a la pàgina de {{jsxref("Array.length")}}.

+ +

Crear un array utilitzant el resultat d'una expressió regular

+ +

El resultats obtinguts a l'aplicar una expressió regular sobre un string poden crear un array de JavaScript. Aquest array tindrà propietats i elements que ofereixen informació sobre les coincidències. Aquest tipus d'arrays és retornat pels mètodes {{jsxref("RegExp.exec")}}, {{jsxref("String.match")}}, i {{jsxref("String.replace")}}. Per a ajudar a entendre aquestes propietats i elements, vegeu l'exemple següent i la taula a continuació:

+ +
// Cerca una d seguida d'una o més b's seguides d'una d
+// Desa les coincidències de b's amb una d a continuació
+// No distingeix entre majúscules i minúscules
+
+var myRe = /d(b+)(d)/i;
+var myArray = myRe.exec('cdbBdbsbz');
+
+ +

Les propietats i elements retornats d'aplicar aquesta expressió regular al string són les següents:

+ + + + + + + + + + + + + + + + + + + + + + + + + + + + + +
Propietat/ElementDescripcióExemple
inputPropietat només de lectura que representa el string original contra el que s'ha aplicat la expressió regular.cdbBdbsbz
indexPropietat només de lectura que representa la posició on s'ha trobat coincidència (considerant zero la primera posició)1
[0]element només de lectura que especifica els últims caràcters que han coincidit.dbBd
[1], ...[n]Elements només de lectura que especifiquen coincidències parcials en parèntesi, si aquests s'inclouen a l'expressió regular. El nombre de possibles coincidències parcials en parèntesi és il·limitat.[1]: bB
+ [2]: d
+ +

Propietats

+ +
+
Array.length
+
La propietat de longitud del constructor de Array. El seu valor és 1.
+
{{jsxref("Array.prototype")}}
+
Permet l'adició de propietats a tots els objectes array.
+
+ +

Mètodes

+ +
+
{{jsxref("Array.from()")}} {{experimental_inline}}
+
Crea una nova instància de Array a partir d'un objecte iterable o un objecte similar a un array.
+
{{jsxref("Array.isArray()")}}
+
Retorna true si una variable és un array. En cas contrari retorna false.
+
{{jsxref("Array.observe()")}} {{experimental_inline}}
+
Observa de forma asíncrona canvis en Arrays, de manera similar al mètode {{jsxref("Object.observe()")}} per a objectes. Proporciona una sequència de canvis ordenats per ordre d'ocurrència.
+
{{jsxref("Array.of()")}} {{experimental_inline}}
+
Crea una nova instància de Array amb un nombre variable d'arguments, sense importar el nombre o tipus d'arguments.
+
+ +

Instàncies de Array

+ +

Totes les instàncies de Array hereten de {{jsxref("Array.prototype")}}. L'objecte prototipus del constructor de Array es pot modificar per a afectar a totes les instàncies de Array a l'hora.

+ +

Propietats

+ +
{{page('/ca/docs/Web/JavaScript/Reference/Global_Objects/Array/prototype', 'Properties')}}
+ +

Mètodes

+ +

Mètodes de mutació

+ +
{{page('ca/docs/Web/JavaScript/Reference/Global_Objects/Array/prototype', 'Mutator_methods')}}
+ +

Mètodes d'accés

+ +
{{page('ca/docs/Web/JavaScript/Reference/Global_Objects/Array/prototype', 'Accessor_methods')}}
+ +

Mètodes d'iteració

+ +
{{page('ca/docs/Web/JavaScript/Reference/Global_Objects/Array/prototype', 'Iteration_methods')}}
+ +

Mètodes genèrics de Array

+ +
+

Els genèrics de Array no formen part de cap standard, estan en desús i poden ser esborrats en el futur. Noteu que no funcionen a tots els navegadors, tot i que hi ha una correcció de compatibilitat disponible a GitHub.

+
+ +

De vegades hom voldria aplicar mètodes de array a strings o altres objectes semblants a arrays (com ara la funció {{jsxref("Functions/arguments", "arguments", "", 1)}}). Per a aconseguir això, es tractaria un string com un array de caràcters (o en tot cas tractar un objecte que no sigui un array com a array). Per exemple, per a comprovar que tots els caràcters d'una variable str són lletres, es faria de la forma següent:

+ +
function isLetter(character) {
+  return character >= 'a' && character <= 'z';
+}
+
+if (Array.prototype.every.call(str, isLetter)) {
+  console.log("El string '" + str + "' només conté lletres!");
+}
+
+ +

Aquesta notació és força molesta i JavaScript 1.6 va introduïr una abreviació genèrica:

+ +
if (Array.every(str, isLetter)) {
+  console.log("El string '" + str + "' només conté lletres!");
+}
+
+ +

{{jsxref("Global_Objects/String", "Generics", "#String_generic_methods", 1)}} també estan disponibles a {{jsxref("Global_Objects/String", "String")}}.

+ +

Aquests no formen actualment part de cap standard ECMAScript (tot i que es pot utilitzar el mètode {{jsxref("Array.from()")}} de l'ECMAScript 6 per a aconseguir el mateix resultat). A continuació es presenta una correcció de compatibilitat per a permetre el seu ús a qualsevol navegador:

+ +
// Asumeix que els extres de Array són presents (també es poden utilitzar funcions Polifyll per a suplir això)
+(function() {
+  'use strict';
+
+  var i,
+    // També es podria construïr l'array de mètodes de la forma següent, però
+    //   el mètode getOwnPropertyNames() no té cap corrector de compatibilitat:
+    // Object.getOwnPropertyNames(Array).filter(function(methodName) {
+    //   return typeof Array[methodName] === 'function'
+    // });
+    methods = [
+      'join', 'reverse', 'sort', 'push', 'pop', 'shift', 'unshift',
+      'splice', 'concat', 'slice', 'indexOf', 'lastIndexOf',
+      'forEach', 'map', 'reduce', 'reduceRight', 'filter',
+      'some', 'every', 'find', 'findIndex', 'entries', 'keys',
+      'values', 'copyWithin', 'includes'
+    ],
+    methodCount = methods.length,
+    assignArrayGeneric = function(methodName) {
+      if (!Array[methodName]) {
+        var method = Array.prototype[methodName];
+        if (typeof method === 'function') {
+          Array[methodName] = function() {
+            return method.call.apply(method, arguments);
+          };
+        }
+      }
+    };
+
+  for (i = 0; i < methodCount; i++) {
+    assignArrayGeneric(methods[i]);
+  }
+}());
+
+ +

Exemples

+ +

Crear un array

+ +

L'exemple següent crea un array, msgArray, amb un tamany de 0, després assigna valors a les posicions msgArray[0] i msgArray[99], canviant automàticament el tamany de l'array a 100.

+ +
var msgArray = [];
+msgArray[0] = 'Hello';
+msgArray[99] = 'world';
+
+if (msgArray.length === 100) {
+  console.log('The length is 100.');
+}
+
+ +

Crear un array de dues dimensions (bidimensional)

+ +

L'exemple següent crea un tauler d'escacs com a array bidimensional de strings. El primer moviement es realitza tot copiant la 'p' de la posició (6,4) a (4,4). La posició anterior esdevé buïda.

+ +
var board = [
+  ['R','N','B','Q','K','B','N','R'],
+  ['P','P','P','P','P','P','P','P'],
+  [' ',' ',' ',' ',' ',' ',' ',' '],
+  [' ',' ',' ',' ',' ',' ',' ',' '],
+  [' ',' ',' ',' ',' ',' ',' ',' '],
+  [' ',' ',' ',' ',' ',' ',' ',' '],
+  ['p','p','p','p','p','p','p','p'],
+  ['r','n','b','q','k','b','n','r'] ];
+
+console.log(board.join('\n') + '\n\n');
+
+// Movem el peó del Rei endevant dues caselles
+board[4][4] = board[6][4];
+board[6][4] = ' ';
+console.log(board.join('\n'));
+
+ +

Aquesta seria la sortida:

+ +
R,N,B,Q,K,B,N,R
+P,P,P,P,P,P,P,P
+ , , , , , , ,
+ , , , , , , ,
+ , , , , , , ,
+ , , , , , , ,
+p,p,p,p,p,p,p,p
+r,n,b,q,k,b,n,r
+
+R,N,B,Q,K,B,N,R
+P,P,P,P,P,P,P,P
+ , , , , , , ,
+ , , , , , , ,
+ , , , ,p, , ,
+ , , , , , , ,
+p,p,p,p, ,p,p,p
+r,n,b,q,k,b,n,r
+
+ +

Especificacions

+ + + + + + + + + + + + + + + + + + + + + + + + +
EspecificacióEstatComentaris
{{SpecName('ES1')}}{{Spec2('ES1')}}Definició inicial.
{{SpecName('ES5.1', '#sec-15.4', 'Array')}}{{Spec2('ES5.1')}}S'afegeixen més mètodes: {{jsxref("Array.isArray")}}, {{jsxref("Array.prototype.indexOf", "indexOf")}}, {{jsxref("Array.prototype.lastIndexOf", "lastIndexOf")}}, {{jsxref("Array.prototype.every", "every")}}, {{jsxref("Array.prototype.some", "some")}}, {{jsxref("Array.prototype.forEach", "forEach")}}, {{jsxref("Array.prototype.map", "map")}}, {{jsxref("Array.prototype.filter", "filter")}}, {{jsxref("Array.prototype.reduce", "reduce")}}, {{jsxref("Array.prototype.reduceRight", "reduceRight")}}
{{SpecName('ES6', '#sec-array-objects', 'Array')}}{{Spec2('ES6')}}S'afegeixen més mètodes: {{jsxref("Array.from")}}, {{jsxref("Array.of")}}, {{jsxref("Array.prototype.find", "find")}}, {{jsxref("Array.prototype.findIndex", "findIndex")}}, {{jsxref("Array.prototype.fill", "fill")}}, {{jsxref("Array.prototype.copyWithin", "copyWithin")}}
+ +

Compatibilitat amb navegadors

+ +
{{CompatibilityTable}}
+ +
+ + + + + + + + + + + + + + + + + + + +
CaracterísticaChromeFirefox (Gecko)Internet ExplorerOperaSafari
Suport bàsic{{CompatVersionUnknown}}{{CompatVersionUnknown}}{{CompatVersionUnknown}}{{CompatVersionUnknown}}{{CompatVersionUnknown}}
+
+ +
+ + + + + + + + + + + + + + + + + + + + + +
CaracterísticaAndroidChrome for AndroidFirefox Mobile (Gecko)IE MobileOpera MobileSafari Mobile
+ + + + + + +
Suport bàsic
+
{{CompatVersionUnknown}}{{CompatVersionUnknown}}{{CompatVersionUnknown}}{{CompatVersionUnknown}}{{CompatVersionUnknown}}{{CompatVersionUnknown}}
+
+ +

Vegeu també

+ + diff --git a/files/ca/web/javascript/reference/global_objects/array/indexof/index.html b/files/ca/web/javascript/reference/global_objects/array/indexof/index.html new file mode 100644 index 0000000000..939571a0c8 --- /dev/null +++ b/files/ca/web/javascript/reference/global_objects/array/indexof/index.html @@ -0,0 +1,235 @@ +--- +title: Array.prototype.indexOf() +slug: Web/JavaScript/Referencia/Objectes_globals/Array/indexOf +translation_of: Web/JavaScript/Reference/Global_Objects/Array/indexOf +--- +
{{JSRef}}
+ +

El mètode indexOf() retorna la primera posició a la qual es troba l'element proporcionat, o bé -1 si l'element no es troba dins l'array.

+ +

Sintaxi

+ +
arr.indexOf(elementAcercar[, posicioInicial = 0])
+ +

Paràmetres

+ +
+
elementAcercar
+
L'element que es cercarà.
+
posicioInicial
+
La posició a la qual començar la cerca. Si la posició és major o igual a la longitud de l'array, es retornarà -1, això implica que no es realitzarà cap cerca a l'array. Si es proporciona un onmbre negatiu, es calcularà la posició des de la qual cercar des del final de l'array. Nota: l'array sempre es cercarà accedint a les posicions en ordre ascendent encara que la posicioInicial sigui negatiu. Si la posició proporcionada és 0 es cercarà en tot l'array. El valor per defecte és 0 (cerca a tot l'array).
+
+ +

Descripció

+ +

indexOf() compara elementAcercar amb els elements de l'array mitjançant la igualtat estricta (el mateix mètode utilitzat per l'operador ===, també anomenat triple-equals).

+ +

Exemples

+ +

Utilitzar indexOf()

+ +

L'exemple següent utilitza indexOf() per a localitzar valors dins un array.

+ +
var array = [2, 9, 9];
+array.indexOf(2);     // 0
+array.indexOf(7);     // -1
+array.indexOf(9, 2);  // 2
+array.indexOf(2, -1); // -1
+array.indexOf(2, -3); // 0
+
+ +

Trobar totes les ocurrències d'un element

+ +
var indices = [];
+var array = ['a', 'b', 'a', 'c', 'a', 'd'];
+var element = 'a';
+var idx = array.indexOf(element);
+while (idx != -1) {
+  indices.push(idx);
+  idx = array.indexOf(element, idx + 1);
+}
+console.log(indices);
+// [0, 2, 4]
+
+ +

Determinar si un element existeix o no a l'array i actualitzar-lo

+ +
function updateVegetablesCollection (veggies, veggie) {
+    if (veggies.indexOf(veggie) === -1) {
+        veggies.push(veggie);
+        console.log('La nova col·lecció de verdures és : ' + veggies);
+    } else if (veggies.indexOf(veggie) > -1) {
+        console.log(veggie + ' ja existeix a la col·lecció de verdures.');
+    }
+}
+
+var veggies = ['potato', 'tomato', 'chillies', 'green-pepper'];
+
+updateVegetablesCollection(veggies, 'spinach');
+//  La nova col·lecció de verdures és : potato,tomato,chillies,green-papper,spinach
+updateVegetablesCollection(veggies, 'spinach');
+// spinach  ja existeix a la col·lecció de verdures.
+
+ +

Polyfill

+ +

indexOf() va ser afegit al standard ECMA-262 a la cinquena versió; degut a això pot no estar present en tots els navegadors. Afegir el següent codi al principi dels vostres escripts us permetrà utilitzar aquesta funció en navegadors on indexOf no sigui suportada de forma nativa. Aquest algoritme és el mateix que l'especificat a la cinquena versió de l'ECMA-262, donat que {{jsxref("Global_Objects/TypeError", "TypeError")}} i {{jsxref("Math.abs()")}} no han estat modificats.

+ +
// Production steps of ECMA-262, Edition 5, 15.4.4.14
+// Reference: http://es5.github.io/#x15.4.4.14
+if (!Array.prototype.indexOf) {
+  Array.prototype.indexOf = function(searchElement, fromIndex) {
+
+    var k;
+
+    // 1. Sigui o el resultat de cridar ToObject passant
+    //    el valor de this com a argument.
+    if (this == null) {
+      throw new TypeError('"this" is null or not defined');
+    }
+
+    var o = Object(this);
+
+    // 2. Sigui lenValue el resultat de cridar el mètode intern Get
+    //    de o amb l'argument "length".
+    // 3. Sigui len ToUint32(lenValue).
+    var len = o.length >>> 0;
+
+    // 4. Si len és 0, retornem -1.
+    if (len === 0) {
+      return -1;
+    }
+
+    // 5. Si s'ha passat l'argument fromIndex n valdrà
+    //    ToInteger(fromIndex); si no n valdrà 0.
+    var n = +fromIndex || 0;
+
+    if (Math.abs(n) === Infinity) {
+      n = 0;
+    }
+
+    // 6. Si n >= len, retornem -1.
+    if (n >= len) {
+      return -1;
+    }
+
+    // 7. Si n >= 0, k valdrà n.
+    // 8. Si no, si n<0, k valdrà len - abs(n).
+    //    Si k és menor que 0, llavors k valdrà 0.
+    k = Math.max(n >= 0 ? n : len - Math.abs(n), 0);
+
+    // 9. Repetir mentre k < len
+    while (k < len) {
+      // a. Sigui Pk ToString(k).
+      //   Això és implícit per a operands a l'esquerra de l'operador in
+      // b. Sigui kPresent el resultat de cridar el mètode intern
+      //    HasProperty de o amb l'argument Pk.
+      //   Aquest pas es pot combinar amb c
+      // c. Si kPresent és cert, llavors
+      //    i.  Sigui elementK el resultat de cridar el mètode intern Get
+      //        de o amb l'argument ToString(k).
+      //   ii.  Sigui same el resultat d'aplicar l'algoritme del
+      //         comparador d'igualtat estricta a
+      //        searchElement i elementK.
+      //  iii.  Si same és cert retornem k.
+      if (k in o && o[k] === searchElement) {
+        return k;
+      }
+      k++;
+    }
+    return -1;
+  };
+}
+
+ +

Especificacions

+ + + + + + + + + + + + + + + + + + + + + + + + +
EspecificacióEstatComentaris
{{SpecName('ES5.1', '#sec-15.4.4.14', 'Array.prototype.indexOf')}}{{Spec2('ES5.1')}}Definició inicial. Implementat a JavaScript 1.6.
{{SpecName('ES6', '#sec-array.prototype.indexof', 'Array.prototype.indexOf')}}{{Spec2('ES6')}} 
{{SpecName('ESDraft', '#sec-array.prototype.indexof', 'Array.prototype.indexOf')}}{{Spec2('ESDraft')}} 
+ +

Compatibilitat amb navegadors

+ +
{{CompatibilityTable}}
+ +
+ + + + + + + + + + + + + + + + + + + +
CaracterísticaChromeFirefox (Gecko)Internet ExplorerOperaSafari
Suport bàsic{{CompatVersionUnknown}}{{CompatGeckoDesktop("1.8")}}{{CompatIE("9")}}{{CompatVersionUnknown}}{{CompatVersionUnknown}}
+
+ +
+ + + + + + + + + + + + + + + + + + + + + +
CaracterísticaAndroidChrome for AndroidFirefox Mobile (Gecko)IE MobileOpera MobileSafari Mobile
Suport bàsic{{CompatVersionUnknown}}{{CompatVersionUnknown}}{{CompatGeckoMobile("1.8")}}{{CompatVersionUnknown}}{{CompatVersionUnknown}}{{CompatVersionUnknown}}
+
+ +

Notes de compatibilitat

+ + + +

Vegeu també

+ + diff --git a/files/ca/web/javascript/reference/global_objects/array/isarray/index.html b/files/ca/web/javascript/reference/global_objects/array/isarray/index.html new file mode 100644 index 0000000000..6393dde86f --- /dev/null +++ b/files/ca/web/javascript/reference/global_objects/array/isarray/index.html @@ -0,0 +1,135 @@ +--- +title: Array.isArray() +slug: Web/JavaScript/Referencia/Objectes_globals/Array/isArray +translation_of: Web/JavaScript/Reference/Global_Objects/Array/isArray +--- +
{{JSRef}}
+ +

El mètode Array.isArray()retorna true si un objecte és un array, o false en cas que no ho sigui.

+ +

Sintaxi

+ +
Array.isArray(obj)
+ +

Paràmetres

+ +
+
obj
+
L'objecte que s'ha de comprovar.
+
+ +

Descripció

+ +

Vegeu l'article “Determinar amb absoluta precisió si un objecte JavaScript és un array o no” per més detalls.

+ +

Exemples

+ +
// totes les crides següents retornen true
+Array.isArray([]);
+Array.isArray([1]);
+Array.isArray(new Array());
+// Fet poc conegut: Array.prototype és un array per si mateix:
+Array.isArray(Array.prototype);
+
+// totes les crides següents retornen false
+Array.isArray();
+Array.isArray({});
+Array.isArray(null);
+Array.isArray(undefined);
+Array.isArray(17);
+Array.isArray('Array');
+Array.isArray(true);
+Array.isArray(false);
+Array.isArray({ __proto__: Array.prototype });
+
+ +

Polyfill

+ +

Executar el codi següent abans de cap altre codi crearà Array.isArray() si no es troba disponible de forma nativa.

+ +
if (!Array.isArray) {
+  Array.isArray = function(arg) {
+    return Object.prototype.toString.call(arg) === '[object Array]';
+  };
+}
+
+ +

Especificacions

+ + + + + + + + + + + + + + + + + + + +
EspecificacióEstatComentaris
{{SpecName('ES5.1', '#sec-15.4.3.2', 'Array.isArray')}}{{Spec2('ES5.1')}}Definició inicial. Implementat en JavaScript 1.8.5.
{{SpecName('ES6', '#sec-array.isarray', 'Array.isArray')}}{{Spec2('ES6')}} 
+ +

Compatibilitat amb navegadors

+ +
{{CompatibilityTable}}
+ +
+ + + + + + + + + + + + + + + + + + + +
CaracterísticaChromeFirefox (Gecko)Internet ExplorerOperaSafari
Suport bàsic{{CompatChrome("5")}}{{CompatGeckoDesktop("2.0")}}{{CompatIE("9")}}{{CompatOpera("10.5")}}{{CompatSafari("5")}}
+
+ +
+ + + + + + + + + + + + + + + + + + + + + +
CaracterísticaAndroidChrome per AndroidFirefox Mobile (Gecko)IE MobileOpera MobileSafari Mobile
Suport bàsic{{CompatVersionUnknown}}{{CompatVersionUnknown}}{{CompatGeckoMobile("2.0")}}{{CompatVersionUnknown}}{{CompatVersionUnknown}}{{CompatVersionUnknown}}
+
+ +

Vegeu també

+ + diff --git a/files/ca/web/javascript/reference/global_objects/array/join/index.html b/files/ca/web/javascript/reference/global_objects/array/join/index.html new file mode 100644 index 0000000000..8d76b4474a --- /dev/null +++ b/files/ca/web/javascript/reference/global_objects/array/join/index.html @@ -0,0 +1,123 @@ +--- +title: Array.prototype.join() +slug: Web/JavaScript/Referencia/Objectes_globals/Array/join +translation_of: Web/JavaScript/Reference/Global_Objects/Array/join +--- +
{{JSRef}}
+ +

El mètode join() ajunta tots els elements d'un array en un string.

+ +

Sintaxi

+ +
str = arr.join([separador = ','])
+ +

Paràmetres

+ +
+
separador
+
Opcional. Expecifica un string que s'utilitzarà per a serparar cada element de l'array. El separador es converteix a string automàticament en cas necesari. Si s'omet, els elements de l'array seran separats per una coma. Si separador és un string buit, s'ajuntaran tots els elements de l'array sense cap caràcter entre ells.
+
+ +

Descripció

+ +

Ajunta les conversions a string de tots els elements de l'array en un sol string. Si un element és undefined o bé null aquest es converteix en una cadena buida.

+ +

Exemples

+ +

Quatre formes diferents d'ajuntar un array

+ +

L'exemple següent crea un array, a, amb tres elements, l'ajunta quatre cops: utilitzant el separador per defect, utilitzant coma i espai, utiltizant el signe més i utilitzant un string buit.

+ +
var a = ['Wind', 'Rain', 'Fire'];
+var myVar1 = a.join();      // assigna 'Wind,Rain,Fire' a myVar1
+var myVar2 = a.join(', ');  // assigna 'Wind, Rain, Fire' a myVar2
+var myVar3 = a.join(' + '); // assigna 'Wind + Rain + Fire' a myVar3
+var myVar4 = a.join('');    // assigna 'WindRainFire' a myVar4
+
+ +

Especificacions

+ + + + + + + + + + + + + + + + + + + + + + + + +
EspecificacióEstatComentaris
{{SpecName('ES1')}}{{Spec2('ES1')}}Definició inicial. Implementat a JavaScript 1.1.
{{SpecName('ES5.1', '#sec-15.4.4.5', 'Array.prototype.join')}}{{Spec2('ES5.1')}} 
{{SpecName('ES6', '#sec-array.prototype.join', 'Array.prototype.join')}}{{Spec2('ES6')}} 
+ +

Compatibilitat amb navegadors

+ +
{{CompatibilityTable}}
+ +
+ + + + + + + + + + + + + + + + + + + +
CaracterísticaChromeFirefox (Gecko)Internet ExplorerOperaSafari
Suport bàsic{{CompatChrome("1.0")}}{{CompatGeckoDesktop("1.7")}}{{CompatIE("5.5")}}{{CompatVersionUnknown}}{{CompatVersionUnknown}}
+
+ +
+ + + + + + + + + + + + + + + + + + + + + +
CaracterísticaAndroidChrome for AndroidFirefox Mobile (Gecko)IE MobileOpera MobileSafari Mobile
Suport bàsic{{CompatVersionUnknown}}{{CompatVersionUnknown}}{{CompatVersionUnknown}}{{CompatVersionUnknown}}{{CompatVersionUnknown}}{{CompatVersionUnknown}}
+
+ +

Vegeu també

+ + diff --git a/files/ca/web/javascript/reference/global_objects/array/keys/index.html b/files/ca/web/javascript/reference/global_objects/array/keys/index.html new file mode 100644 index 0000000000..7d9df8e1f5 --- /dev/null +++ b/files/ca/web/javascript/reference/global_objects/array/keys/index.html @@ -0,0 +1,115 @@ +--- +title: Array.prototype.keys() +slug: Web/JavaScript/Referencia/Objectes_globals/Array/keys +translation_of: Web/JavaScript/Reference/Global_Objects/Array/keys +--- +
{{JSRef}}
+ +

El mètode keys() retorna un nou Array Iterator que conté la clau de cada posició d'un array.

+ +

Sintaxi

+ +
arr.keys()
+ +

Exemples

+ +

Ús bàsic

+ +
var arr = ["a", "b", "c"];
+var iterator = arr.keys();
+
+console.log(iterator.next()); // { value: 0, done: false }
+console.log(iterator.next()); // { value: 1, done: false }
+console.log(iterator.next()); // { value: 2, done: false }
+console.log(iterator.next()); // { value: undefined, done: true }
+
+ +

L'iterador de claus no ignora els forats

+ +
var arr = ["a", , "c"];
+var sparseKeys = Object.keys(arr);
+var denseKeys = [...arr.keys()];
+console.log(sparseKeys); // ['0', '2']
+console.log(denseKeys);  // [0, 1, 2]
+
+ +

Especificacions

+ + + + + + + + + + + + + + + + + + + +
EspecificacióEstatComentaris
{{SpecName('ES6', '#sec-array.prototype.keys', 'Array.prototype.keys')}}{{Spec2('ES6')}}Definició inicial.
{{SpecName('ESDraft', '#sec-array.prototype.keys', 'Array.prototype.keys')}}{{Spec2('ESDraft')}} 
+ +

Compatibilitat amb navegadors

+ +
{{CompatibilityTable}}
+ +
+ + + + + + + + + + + + + + + + + + + +
CaracterísticaChromeFirefox (Gecko)Internet ExplorerOperaSafari
Suport bàsic{{CompatChrome("38")}}{{CompatGeckoDesktop("28")}}{{CompatNo}}{{CompatOpera("25")}}{{CompatSafari("7.1")}}
+
+ +
+ + + + + + + + + + + + + + + + + + + + + +
CaracterísticaAndroidChrome for AndroidFirefox Mobile (Gecko)IE MobileOpera MobileSafari Mobile
Suport bàsic{{CompatNo}}{{CompatNo}}{{CompatGeckoMobile("28")}}{{CompatNo}}{{CompatNo}}8.0
+
+ +

Vegeu també

+ + diff --git a/files/ca/web/javascript/reference/global_objects/array/lastindexof/index.html b/files/ca/web/javascript/reference/global_objects/array/lastindexof/index.html new file mode 100644 index 0000000000..038aa614e5 --- /dev/null +++ b/files/ca/web/javascript/reference/global_objects/array/lastindexof/index.html @@ -0,0 +1,197 @@ +--- +title: Array.prototype.lastIndexOf() +slug: Web/JavaScript/Referencia/Objectes_globals/Array/lastIndexOf +translation_of: Web/JavaScript/Reference/Global_Objects/Array/lastIndexOf +--- +
{{JSRef}}
+ +

 

+ +

El mètode lastIndexOf () retorna l'última posició a la qual es troba l'element proporcionat, o bé -1 si l'element no es troba dins l'array. L'array es recorrerà en ordre invers a partir de la posició pocicioInicial.

+ +

Sintaxi

+ +
arr.lastIndexOf(elementAcercar[, posicioInicial = arr.length - 1])
+ +

Paràmetres

+ +
+
elementAcercar
+
L'element que es cercarà.
+
posicioInicial
+
Opcional. La posició a partir de la qual es començarà a cercar cap enrera. El valor per defecte és el tamany de l'array menys un, és a dir, tota l'array serà cercada. Si la posició proporcionada es major o igual que la longitud de l'array tot l'array serà cercat. Si és negatiu s'utilitzarà com a desplaçament respecte el final de l'array. Nota: l'array sempre es cercarà accedint a les posicions en ordre descendent encara que la posicioInicial sigui negatiu. Si la posició calculada és menor que zero, es retornarà -1, és a dir, l'array no serà cercat.
+
+ +

Descripció

+ +

lastIndexOf compara elementAcercar amb els elements de l'array mitjançant la igualtat estricta (el mateix mètode utilitzat per l'operador ===, també anomenat triple-equals).

+ +

Exemples

+ +

Utilitzar lastIndexOf

+ +

L'exemple següent utilitza lastIndexOf per a localitzar valors dins un array.

+ +
var array = [2, 5, 9, 2];
+array.lastIndexOf(2);     // 3
+array.lastIndexOf(7);     // -1
+array.lastIndexOf(2, 3);  // 3
+array.lastIndexOf(2, 2);  // 0
+array.lastIndexOf(2, -2); // 0
+array.lastIndexOf(2, -1); // 3
+
+ +

Trobar totes les ocurrències d'un element

+ +

L'exemple segïuent utilitza lastIndexOf per a trobar totes les posicions d'un element en un array donat, utilitzant {{jsxref("Array.prototype.push", "push")}} per a afegir-los a u altre array un cop trobats.

+ +
var indices = [];
+var array = ['a', 'b', 'a', 'c', 'a', 'd'];
+var element = 'a';
+var idx = array.lastIndexOf(element);
+while (idx != -1) {
+  indices.push(idx);
+  idx = (idx > 0 ? array.lastIndexOf(element, idx - 1) : -1);
+}
+
+console.log(indices);
+// [4, 2, 0]
+
+ +

Cal destacar que el cas idx == 0 s'ha de tractar de forma separada ja que l'element sempre serà trobat sense importar el valor del paràmetre posicioInicial si és el primer element de l'array. Aquest comportament és diferent del del mètode {{jsxref("Array.prototype.indexOf", "indexOf")}}.

+ +

Polyfill

+ +

lastIndexOf va ser afegit al standard ECMA-262 a la cinquena versió; degut a això pot no estar present en tots els navegadors. Afegir el següent codi al principi dels vostres escripts us permetrà utilitzar aquesta funció en navegadors on indexOf no sigui suportada de forma nativa. Aquest algoritme és el mateix que l'especificat a la cinquena versió de l'ECMA-262, donat que {{jsxref("Object")}}, {{jsxref("TypeError")}}, {{jsxref("Number")}}, {{jsxref("Math.floor")}}, {{jsxref("Math.abs")}}, i{{jsxref("Math.min")}} no han estat modificats.

+ +
// Production steps of ECMA-262, Edition 5, 15.4.4.15
+// Reference: http://es5.github.io/#x15.4.4.15
+if (!Array.prototype.lastIndexOf) {
+  Array.prototype.lastIndexOf = function(searchElement /*, fromIndex*/) {
+    'use strict';
+
+    if (this === void 0 || this === null) {
+      throw new TypeError();
+    }
+
+    var n, k,
+      t = Object(this),
+      len = t.length >>> 0;
+    if (len === 0) {
+      return -1;
+    }
+
+    n = len - 1;
+    if (arguments.length > 1) {
+      n = Number(arguments[1]);
+      if (n != n) {
+        n = 0;
+      }
+      else if (n != 0 && n != (1 / 0) && n != -(1 / 0)) {
+        n = (n > 0 || -1) * Math.floor(Math.abs(n));
+      }
+    }
+
+    for (k = n >= 0 ? Math.min(n, len - 1) : len - Math.abs(n); k >= 0; k--) {
+      if (k in t && t[k] === searchElement) {
+        return k;
+      }
+    }
+    return -1;
+  };
+}
+
+ +

Cal destacar que l'implementació aspira  una compatibilitat ambsoluta amb els mètodes lastIndexOf trobats al Firefox i el motor JavaScript SpiderMonkey, incloent diversos casos que són excepcionals. Si es pretén utilitzar-lo en aplicacions quotidianes, és posible calcular from amb codi més senzill si s'ignoren aquests casos.

+ +

Especificacions

+ + + + + + + + + + + + + + + + + + + + + + + + +
EspecificacióEstatComentaris
{{SpecName('ES5.1', '#sec-15.4.4.15', 'Array.prototype.lastIndexOf')}}{{Spec2('ES5.1')}}Definició inicial. Implementat a JavaScript 1.6.
{{SpecName('ES6', '#sec-array.prototype.lastindexof', 'Array.prototype.lastIndexOf')}}{{Spec2('ES6')}} 
{{SpecName('ESDraft', '#sec-array.prototype.lastindexof', 'Array.prototype.lastIndexOf')}}{{Spec2('ESDraft')}} 
+ +

Compatibilitat amb navegadors

+ +
{{CompatibilityTable}}
+ +
+ + + + + + + + + + + + + + + + + + + +
CaracterísticaChromeFirefox (Gecko)Internet ExplorerOperaSafari
Suport bàsic{{CompatVersionUnknown}}{{CompatVersionUnknown}}{{CompatIE("9")}}{{CompatVersionUnknown}}{{CompatVersionUnknown}}
+
+ +
+ + + + + + + + + + + + + + + + + + + + + +
CaracterísticaAndroidChrome for AndroidFirefox Mobile (Gecko)IE MobileOpera MobileSafari Mobile
Suport bàsic{{CompatVersionUnknown}}{{CompatVersionUnknown}}{{CompatVersionUnknown}}{{CompatVersionUnknown}}{{CompatVersionUnknown}}{{CompatVersionUnknown}}
+
+ +

Notes de compatibilitat

+ + + +

Vegeu també

+ + diff --git a/files/ca/web/javascript/reference/global_objects/array/length/index.html b/files/ca/web/javascript/reference/global_objects/array/length/index.html new file mode 100644 index 0000000000..a4954565ff --- /dev/null +++ b/files/ca/web/javascript/reference/global_objects/array/length/index.html @@ -0,0 +1,128 @@ +--- +title: Array.prototype.length +slug: Web/JavaScript/Referencia/Objectes_globals/Array/length +translation_of: Web/JavaScript/Reference/Global_Objects/Array/length +--- +
{{JSRef}}
+ +

La propietat length representa un nombre sencer sense signe de 32 bits que és sempre numèricament major que la última posició de l'array.

+ +
{{js_property_attributes(1, 0, 0)}}
+ +

Sintaxi

+ +
arr.length
+ +

Descripció

+ +

El valor de la propietat length és un sencer amb un signe positiu un valor menor de 2 elevat a 32 (232).

+ +

Es pot establir la propietat length per truncar un array en qualsevol moment. Quan s'exten un array per mitjà de canviar la seva propietat length, el nombre actual d'elements no s'incrementa; per exemple, si s'estableix length a 3 quan en aquell moment és 2, l'array encara conté només 2 elements. Així, la propietat length no necessàriament indica el nombre de valors definits en l'array. Vegeu també Relació entre length i propietats numèriques.

+ +

Exemples

+ +

Recorrer un array

+ +

En l'exemple següent, es recorre l'array numbers comprovant la propietat length. Es duplica el valor de cada element.

+ +
var numbers = [1, 2, 3, 4, 5];
+
+for (var i = 0; i < numbers.length; i++) {
+  numbers[i] *= 2;
+}
+// numbers és ara [2, 4, 6, 8, 10]
+
+ +

Escurçar una array

+ +

L'exemple següent escurça l'array statesUS a una llargària de 50 en cas que la llargària actual sigui major de 50.

+ +
if (statesUS.length > 50) {
+  statesUS.length = 50;
+}
+
+ +

Especificacions

+ + + + + + + + + + + + + + + + + + + + + + + + +
EspecificacióEstatComentaris
{{SpecName('ES1')}}{{Spec2('ES1')}}Definició inicial.
{{SpecName('ES5.1', '#sec-15.4.5.2', 'Array.length')}}{{Spec2('ES5.1')}} 
{{SpecName('ES6', '#sec-properties-of-array-instances-length', 'Array.length')}}{{Spec2('ES6')}} 
+ +

Compatibilitat amb navegadors

+ +
{{CompatibilityTable}}
+ +
+ + + + + + + + + + + + + + + + + + + +
CaracterísticaChromeFirefox (Gecko)Internet ExplorerOperaSafari
Suport bàsic{{CompatVersionUnknown}}{{CompatVersionUnknown}}{{CompatVersionUnknown}}{{CompatVersionUnknown}}{{CompatVersionUnknown}}
+
+ +
+ + + + + + + + + + + + + + + + + + + + + +
CaracterísticaAndroidChrome per AndroidFirefox Mobile (Gecko)IE MobileOpera MobileSafari Mobile
Suport bàsic{{CompatVersionUnknown}}{{CompatVersionUnknown}}{{CompatVersionUnknown}}{{CompatVersionUnknown}}{{CompatVersionUnknown}}{{CompatVersionUnknown}}
+
+ +

Vegeu també

+ + diff --git a/files/ca/web/javascript/reference/global_objects/array/map/index.html b/files/ca/web/javascript/reference/global_objects/array/map/index.html new file mode 100644 index 0000000000..6f0dc1a0d4 --- /dev/null +++ b/files/ca/web/javascript/reference/global_objects/array/map/index.html @@ -0,0 +1,317 @@ +--- +title: Array.prototype.map() +slug: Web/JavaScript/Referencia/Objectes_globals/Array/map +translation_of: Web/JavaScript/Reference/Global_Objects/Array/map +--- +
{{JSRef("Global_Objects", "Array")}}
+ +

Resum

+ +

El mètode map() crea una nova array amb els resultats de la crida a la funció proporcionada un cop per cada element.

+ +

Sintaxi

+ +
arr.map(callback[, thisArg])
+ +

Paràmetres

+ +
+
callback
+
Funció que produeix un element de la nova array, agafant tres arguments:
+
+
+
currentValue
+
El valor actual que és processat en l'array.
+
index
+
L'índex de l'element actual que és processat en l'array.
+
array
+
L'array sobre la qual es crida map.
+
+
+
thisArg
+
Opcional. Valor a usar com a this quan s'executa la funció.
+
+ +

Descripció

+ +

map crida a la funció passada callback un cop per cada element de l'array, en ordre, i construeix un nou array a partir dels resultats. Només s'invoca callback per a posicions de l'array que tinguin valors assignats, incloent undefined. No es crida per a elements no trobats (és a dir, elements que no han rebut mai un valor o bé elements que s'han eliminat).

+ +

S'invoca callback amb tres arguments: el valor de l'element, la posició de l'element a l'array, i l'array que s'està recorrent.

+ +

Si s'ha proporcionat el paràmetre thisArg a l'hora de cridar map, aquest es passarà a la funció callback com a valor per a this dins la funció. En qualsevol altre cas el valor utilitzat com a this serà {{jsxref("Global_Objects/undefined", "undefined")}}. El valor finalment observable des de callback es determinarà d'acord a les regles usuals per a determinar el valor de this dins una funció.

+ +

map no canvia l'array des del que es crida (tot i que callback, si s'invoca, pot fer-ho).

+ +

El rang d'elements processat per map s'estableix abans de la primera invocació de callback. Els elements que s'hagin afegit a l'array després d'haver cridat map no seran visitats per callback. Si es canvient els elements existents, o s'eliminen, el valor passat a callback serà el valor que tinguessin quan es va invocar map; els elements que s'han eliminat no es visitaran.

+ +

Exemples

+ +

Exemple: Generar un array de rels quadrades a partir d'un array de nombres

+ +

El codi següent agafa un array de nombres i crea un nou array que contindrà les rels quadrades dels nombres del primer array.

+ +
var nombres = [1, 4, 9];
+var rels = nombres.map(Math.sqrt);
+// rels ara val [1, 2, 3], nombres encara val [1, 4, 9]
+
+ +

Exemple: Utilitzar map per a canviar el format dels objectes d'un array

+ +

El codi següent agafa un array d'objectes i crea un nou array que conté els nous objectes, que tenen un format diferent.

+ +
var kvArray = [{key:1, value:10}, {key:2, value:20}, {key:3, value: 30}];
+var reformattedArray = kvArray.map(function(obj){
+   var rObj = {};
+   rObj[obj.key] = obj.value;
+   return rObj;
+});
+// reformattedArray ara val [{1:10}, {2:20}, {3:30}],
+// kvArray encara val [{key:1, value:10}, {key:2, value:20}, {key:3, value: 30}]
+
+ +

Exemple: Assignar els nombres d'un array al resultat d'una funció que espera un argument

+ +

El codi següent mostra com funciona map quan s'utilitza una funció que espera un argument. L'argument rebrà automàticament el valor de cada element de l'array mentre map recorre tot l'array original.

+ +
var nombres = [1, 4, 9];
+var dobles = nombres.map(function(num) {
+  return num * 2;
+});
+// dobles ara val [2, 8, 18]. nombres encara val [1, 4, 9]
+
+ +

Exemple: utilitzar map de forma genèrica

+ +

Aquest exemple mostra com utilitzar map en un {{jsxref("Global_Objects/String", "String")}} per a obtindre un array de bytes que representin el valor dels caràcters codificats amb ASCII:

+ +
var map = Array.prototype.map;
+var a = map.call('Hello World', function(x) { return x.charCodeAt(0); });
+// a ara val [72, 101, 108, 108, 111, 32, 87, 111, 114, 108, 100]
+
+ +

Exemple: Utilitzar map de forma genèrica amb querySelectorAll

+ +

Aquest exemple mostra com iterar sobre una col·lecció d'objectes obtinguts mitjançant querySelectorAll. En aquest cas obtenim totes les opcions seleccionades de la web:

+ +
var elems = document.querySelectorAll('select option:checked');
+var values = Array.prototype.map.call(elems, function(obj) {
+  return obj.value;
+});
+
+ +

Exemple: Utilitzar map per a invertir un string

+ +
var str = '12345';
+Array.prototype.map.call(str, function(x) {
+  return x;
+}).reverse().join('');
+
+// Sortida: '54321'
+// Bonus: utilitzeu '===' per a comprovar si l'string original era un palindrom
+
+ +

Exemple: Un cas d'ús delicat

+ +

(inspirat per aquesta entrada de blog)

+ +

És comú utilitzar la funció callback amb un sol argument (l'element corresponent a la volta del bucle de l'array que s'està recorrent). Algunes funcions també solen requerir un sol argument, tot i que també poden acceptar arguements adicionals de forma opcional. Això pot produïr comportaments confussos.

+ +
// Considerem:
+['1', '2', '3'].map(parseInt);
+// Quan hom esperaria [1, 2, 3]
+// El resultat real serà [1, NaN, NaN]
+
+// parseInt s'utilitza normalment amb un argument, però admet dos.
+// El primer és una expressió mentre que el segon és el mòdul.
+// Array.prototype.map passa 3 arguments a la funció callback:
+// l'element, la posició de l'element i l'array
+// parseInt ignorarà el tercer argument, però no el segon,
+// provocant la confussió. Vegeu l'entrada del blog per a més detalls
+
+function returnInt(element) {
+  return parseInt(element, 10);
+}
+
+['1', '2', '3'].map(returnInt); // [1, 2, 3]
+// Actual result is an array of numbers (as expected)
+
+// A simpler way to achieve the above, while avoiding the "gotcha":
+['1', '2', '3'].map(Number); // [1, 2, 3]
+
+ +

Polyfill

+ +

map va ser afegit a l'standard ECMA-262 a la cinquena edició; degut a això aquest pot no estar present en algunes implementacions de l'standard. Es pot solventar aquest problema insertant el codi següent al principi dels scripts que el requereixin, permetent que implementacions on map no està disponible de forma nativa en puguin fer ús. Aquest algoritme és exactament l'especificat per l'ECMA-262, 5a edició, assument que {{jsxref("Global_Objects/Object", "Object")}}, {{jsxref("Global_Objects/TypeError", "TypeError")}}, i {{jsxref("Global_Objects/Array", "Array")}} tenen els seus valors originals i que callback.call s'evalua al valor original de {{jsxref("Function.prototype.call")}}.

+ +
// Production steps of ECMA-262, Edition 5, 15.4.4.19
+// Reference: http://es5.github.io/#x15.4.4.19
+if (!Array.prototype.map) {
+
+  Array.prototype.map = function(callback, thisArg) {
+
+    var T, A, k;
+
+    if (this == null) {
+      throw new TypeError(' this is null or not defined');
+    }
+
+    // 1. Assignem a O el resultat de cridar a ToObject passant-li el valor de |this|
+    //    com a argument.
+    var O = Object(this);
+
+    // 2. lenValue és el resultat de cridar el mètode intern
+    //    Get de O amb l'argument "length".
+    // 3. Assignem a len el valor d'executar ToUint32(lenValue).
+    var len = O.length >>> 0;
+
+    // 4. Si IsCallable(callback) és false, llencem l'excepció TypeError.
+    // Vegeu: http://es5.github.com/#x9.11
+    if (typeof callback !== 'function') {
+      throw new TypeError(callback + ' is not a function');
+    }
+
+    // 5. Si s'ha passat l'argument thisArg, l'assigment a T; en cas contrari T valdrà undefined.
+    if (arguments.length > 1) {
+      T = thisArg;
+    }
+
+    // 6. Assignem a A el nou array creat per l'expressió new Array(len)
+    //    on Array és el constructor standard de JavaScript amb aquest nom i
+    //    len és el valor de len.
+    A = new Array(len);
+
+    // 7. Assignem 0 a k
+    k = 0;
+
+    // 8. Repetim mentre k < len
+    while (k < len) {
+
+      var kValue, mappedValue;
+
+      // a. Assignem ToString(k) a Pk.
+      //   Això és implicit per a operands al cantó esquerra de l'operador in
+      // b. Assignem a kPresent el resultat de cridar el mètode intern HasProperty
+      //    de O amb l'argument Pk.
+      //   Es pot combinar aquest pas amb c
+      // c. Si kPresent és true, llavors
+      if (k in O) {
+
+        // i. Assignem a kValue el resultat de cridar el mètode intern
+        //    Get de O amb l'argument Pk.
+        kValue = O[k];
+
+        // ii. Assignem a mappedValue el resultat de cridar el mètode intern Call
+        //     de callback amb T com a valor de this i una llista d'arguments
+        //     que conté kValue, k, i O.
+        mappedValue = callback.call(T, kValue, k, O);
+
+        // iii. Cridem el mètode intern DefineOwnProperty de A amb els arguments
+        // Pk, Property Descriptor
+        // { Value: mappedValue,
+        //   Writable: true,
+        //   Enumerable: true,
+        //   Configurable: true },
+        // i false.
+
+        // En navegadors que suportin Object.defineProperty, utilitzeu el següent:
+        // Object.defineProperty(A, k, {
+        //   value: mappedValue,
+        //   writable: true,
+        //   enumerable: true,
+        //   configurable: true
+        // });
+
+        // Per a un millor suport de navegadors, utilitzeu el següent:
+        A[k] = mappedValue;
+      }
+      // d. incrementem k en 1.
+      k++;
+    }
+
+    // 9. retornem A
+    return A;
+  };
+}
+
+ +

Especificacions

+ + + + + + + + + + + + + + + + + + + +
EspecificacióEstatComentaris
{{SpecName('ES5.1', '#sec-15.4.4.19', 'Array.prototype.map')}}{{Spec2('ES5.1')}}Definició inicial. Implementat a JavaScript 1.6.
{{SpecName('ES6', '#sec-array.prototype.map', 'Array.prototype.map')}}{{Spec2('ES6')}} 
+ +

Compatibilitat amb navegadors

+ +
{{CompatibilityTable}}
+ +
+ + + + + + + + + + + + + + + + + + + +
CaracterísticaChromeFirefox (Gecko)Internet ExplorerOperaSafari
Suport bàsic{{CompatVersionUnknown}}{{CompatGeckoDesktop("1.8")}}{{CompatIE("9")}}{{CompatVersionUnknown}}{{CompatVersionUnknown}}
+
+ +
+ + + + + + + + + + + + + + + + + + + + + +
CaracterísticaAndroidChrome for AndroidFirefox Mobile (Gecko)IE MobileOpera MobileSafari Mobile
Suport bàsic{{CompatVersionUnknown}}{{CompatVersionUnknown}}{{CompatGeckoMobile("1.8")}}{{CompatVersionUnknown}}{{CompatVersionUnknown}}{{CompatVersionUnknown}}
+
+ +

Vegeu també

+ + diff --git a/files/ca/web/javascript/reference/global_objects/array/of/index.html b/files/ca/web/javascript/reference/global_objects/array/of/index.html new file mode 100644 index 0000000000..efe2d96abd --- /dev/null +++ b/files/ca/web/javascript/reference/global_objects/array/of/index.html @@ -0,0 +1,120 @@ +--- +title: Array.of() +slug: Web/JavaScript/Referencia/Objectes_globals/Array/of +translation_of: Web/JavaScript/Reference/Global_Objects/Array/of +--- +
{{JSRef}}
+ +

El mètode Array.of() crea una nova instància Array amb un nombre variable d'arguments, sense tenir en compte el nombre o el tipus d'arguments.

+ +

La diferència entre Array.of() i el constructor Array es troba en el maneig dels arguments sencers: Array.of(42) crea un array amb un sol element, 42, mentre que Array(42) crea un array amb 42 elements, Cadascun dels quals és undefined.

+ +

Sintaxi

+ +
Array.of(element0[, element1[, ...[, elementN]]])
+ +

Paràmetres

+ +
+
elementN
+
Elements a partir dels quals es crea l'array.
+
+ +

Descripció

+ +

Aquesta funció forma part del ECMAScript 6 estàndard. Per més informació vegeu proposta de l'Array.of i Array.from i Array.of polyfill.

+ +

Exemples

+ +
Array.of(1);         // [1]
+Array.of(1, 2, 3);   // [1, 2, 3]
+Array.of(undefined); // [undefined]
+
+ +

Polyfill

+ +

Executar el codi següent abans que cap altre codi crearà Array.of() en cas que no es trobi disponible de forma nativa.

+ +
if (!Array.of) {
+  Array.of = function() {
+    return Array.prototype.slice.call(arguments);
+  };
+}
+
+ +

Especificacions

+ + + + + + + + + + + + + + +
EspecificacióEstatComentaris
{{SpecName('ES6', '#sec-array.of', 'Array.of')}}{{Spec2('ES6')}}Definició inicial.
+ +

Compatibilitat amb navegadors

+ +
{{CompatibilityTable}}
+ +
+ + + + + + + + + + + + + + + + + + + +
CaracterísticaChromeFirefox (Gecko)Internet ExplorerOperaSafari
Suport bàsic{{CompatChrome(45)}}{{CompatGeckoDesktop("25")}}{{CompatNo}}{{CompatNo}}{{CompatNo}}
+
+ +
+ + + + + + + + + + + + + + + + + + + + + +
CaracterísticaAndroidChrome per AndroidFirefox Mobile (Gecko)IE MobileOpera MobileSafari Mobile
Suport bàsic{{CompatNo}}{{CompatChrome(39)}}{{CompatGeckoMobile("25")}}{{CompatNo}}{{CompatNo}}{{CompatNo}}
+
+ +

Vegeu també

+ + diff --git a/files/ca/web/javascript/reference/global_objects/array/pop/index.html b/files/ca/web/javascript/reference/global_objects/array/pop/index.html new file mode 100644 index 0000000000..7d2ee3189f --- /dev/null +++ b/files/ca/web/javascript/reference/global_objects/array/pop/index.html @@ -0,0 +1,123 @@ +--- +title: Array.prototype.pop() +slug: Web/JavaScript/Referencia/Objectes_globals/Array/pop +translation_of: Web/JavaScript/Reference/Global_Objects/Array/pop +--- +
{{JSRef}}
+ +

El mètode pop() elimina l'últim element d'un array i retorna l'element eliminat.

+ +

Sintaxi

+ +
arr.pop()
+ +

Descripció

+ +

El mètode pop elimina l'últim element d'un array i retorna el seu valor.

+ +

pop és genèric de forma intencionada; aquest mètode pot ser {{jsxref("Function.call", "cridat", "", 1)}} i {{jsxref("Function.apply", "aplicat", "", 1)}} des de/a objectes que semblin arrays. Els objectes que no continguin la propietat length que reflecteixi l'última propietat d'una sèrie de propietats numèriques consecutives, on el nom de la primera propietat sigui el zero, poden comportar-se de forma imprevista.

+ +

Si es crida pop() en un array buit, es retornarà {{jsxref("undefined")}}.

+ +

Exemples

+ +

Esborrar l'últim element d'un array

+ +

El codi següent crea un array anomenat myFish que conté quatre elements, després elimina l'últim element.

+ +
var myFish = ['angel', 'clown', 'mandarin', 'sturgeon'];
+
+console.log(myFish); // ['angel', 'clown', 'mandarin', 'sturgeon']
+
+var popped = myFish.pop();
+
+console.log(myFish); // ['angel', 'clown', 'mandarin' ]
+
+console.log(popped); // 'sturgeon'
+ +

Especificacions

+ + + + + + + + + + + + + + + + + + + + + + + + +
EspecificacióEstatComentaris
{{SpecName('ES3')}}{{Spec2('ES3')}}Definició inicial. Implementat a JavaScript 1.2.
{{SpecName('ES5.1', '#sec-15.4.4.6', 'Array.prototype.pop')}}{{Spec2('ES5.1')}} 
{{SpecName('ES6', '#sec-array.prototype.pop', 'Array.prototype.pop')}}{{Spec2('ES6')}} 
+ +

Compatibilitat amb navegadors

+ +
{{CompatibilityTable}}
+ +
+ + + + + + + + + + + + + + + + + + + +
CaracterísticaChromeFirefox (Gecko)Internet ExplorerOperaSafari
Suport bàsic{{CompatChrome("1.0")}}{{CompatGeckoDesktop("1.7")}}{{CompatIE("5.5")}}{{CompatVersionUnknown}}{{CompatVersionUnknown}}
+
+ +
+ + + + + + + + + + + + + + + + + + + + + +
CaracterísticaAndroidChrome for AndroidFirefox Mobile (Gecko)IE MobileOpera MobileSafari Mobile
Suport bàsic{{CompatVersionUnknown}}{{CompatVersionUnknown}}{{CompatVersionUnknown}}{{CompatVersionUnknown}}{{CompatVersionUnknown}}{{CompatVersionUnknown}}
+
+ +

Vegeu també

+ + diff --git a/files/ca/web/javascript/reference/global_objects/array/push/index.html b/files/ca/web/javascript/reference/global_objects/array/push/index.html new file mode 100644 index 0000000000..5770e5a10c --- /dev/null +++ b/files/ca/web/javascript/reference/global_objects/array/push/index.html @@ -0,0 +1,146 @@ +--- +title: Array.prototype.push() +slug: Web/JavaScript/Referencia/Objectes_globals/Array/push +translation_of: Web/JavaScript/Reference/Global_Objects/Array/push +--- +
{{JSRef}}
+ +

El mètode push() afegeix un o més elements al final d'un array i retorna el nou tamany de l'array.

+ +

Sintaxi

+ +
arr.push(element1, ..., elementN)
+ +

Paràmetres

+ +
+
elementN
+
Els elements que seran afegits al final de l'array.
+
+ +

Valor retornat

+ +

El nou valor de la propietat {{jsxref("Array.length", "length")}} de l'objecte del qual s'ha executat el mètode.

+ +

Descripció

+ +

El mètode push afegeix valors a un array.

+ +

push és genèric de manera intencionada. Es pot utilitzar aquest mètode amb {{jsxref("Function.call", "call()")}} i {{jsxref("Function.apply", "apply()")}} en objectes semblants a arrays. El mètode push depèn de la propietat length per a determinar on insertar els nous valors. Si la propietat length no es pot convertir en un nombre, la posició utilitzada serà la 0. Això inclou la posibilitat que no existeixi la propietat length, en aquest case es crearà automàticament la propietat length.

+ +

Els únics objectes semblants a arrays que inclou el nucli de JavaScript són els {{jsxref("Global_Objects/String", "strings", "", 1)}}, tot i que no admeten la aplicació d'aquest mètode ja que els strings són immutables.

+ +

Exemples

+ +

Afegir elements a un array

+ +

El codi següent crea un array anomenat esports que conté dos elements, llavors l'hi afegeix dos elements més. La variable total acaba revent el valor del nou tamany d e l'array.

+ +
var esports = ['futbol', 'basket'];
+var total = esports.push('badminton', 'natació');
+
+console.log(esports); // ['futbol', 'basket', 'badminton', 'natació']
+console.log(total);  // 4
+
+ +

Unir dos arrays

+ +

Aquest exemple utilitza {{jsxref("Function.apply", "apply()")}} per a afegir tots els elements d'un segon array.

+ +
var verdures = ['ceba', 'patata'];
+var mesVerdures = ['pastanaga', 'rabe'];
+
+// Uneix el segon array al primer
+// Equivalent a verdures.push('pastanaga', 'rabe');
+Array.prototype.push.apply(verdures , mesVerdures);
+
+console.log(verdures); // ['ceba', 'patata', 'pastanaga', 'rabe']
+
+ +

Especificacions

+ + + + + + + + + + + + + + + + + + + + + + + + +
EspecificacióEstatComentaris
{{SpecName('ES3')}}{{Spec2('ES3')}}Definició inicial. Implementat a JavaScript 1.2.
{{SpecName('ES5.1', '#sec-15.4.4.7', 'Array.prototype.push')}}{{Spec2('ES5.1')}} 
{{SpecName('ES6', '#sec-array.prototype.push', 'Array.prototype.push')}}{{Spec2('ES6')}} 
+ +

Compatibilitat amb navegadors

+ +
{{CompatibilityTable}}
+ +
+ + + + + + + + + + + + + + + + + + + +
CaracterísticaChromeFirefox (Gecko)Internet ExplorerOperaSafari
Suport bàsic{{CompatChrome("1.0")}}{{CompatGeckoDesktop("1.7")}}{{CompatIE("5.5")}}{{CompatVersionUnknown}}{{CompatVersionUnknown}}
+
+ +
+ + + + + + + + + + + + + + + + + + + + + +
CaracterísticaAndroidChrome for AndroidFirefox Mobile (Gecko)IE MobileOpera MobileSafari Mobile
Suport bàsic{{CompatVersionUnknown}}{{CompatVersionUnknown}}{{CompatVersionUnknown}}{{CompatVersionUnknown}}{{CompatVersionUnknown}}{{CompatVersionUnknown}}
+
+ +

Vegeu també

+ + diff --git a/files/ca/web/javascript/reference/global_objects/array/reduce/index.html b/files/ca/web/javascript/reference/global_objects/array/reduce/index.html new file mode 100644 index 0000000000..fa6253fd0c --- /dev/null +++ b/files/ca/web/javascript/reference/global_objects/array/reduce/index.html @@ -0,0 +1,304 @@ +--- +title: Array.prototype.reduce() +slug: Web/JavaScript/Referencia/Objectes_globals/Array/Reduce +translation_of: Web/JavaScript/Reference/Global_Objects/Array/Reduce +--- +
{{JSRef}}
+ +

El mètode reduce() aplica una funció sobre un acumulador i cada valor de l'array (de esquerra a dreta) perr a reduir-lo a un sol valor.

+ +

sintaxi

+ +
arr.reduce(callback[, valorInicial])
+ +

Parameters

+ +
+
callback
+
Funció a executar per a cada valor de l'array. Rep quatre arguments: +
+
valorPrevi
+
El valor retornat prèviament en l'última invocació de la funció callback, o bé valorInicial, si s'ha proporcionat (vegeu més abaix).
+
valorActual
+
L'element essent processat actualment a l'array.
+
index
+
La posició de l'element essent processat actualment a l'array.
+
array
+
L'array al qual s'ha cridat el mètode reduce.
+
+
+
valorInicial
+
Opcional. Valor a utilitzar com a primer argument a la primera crida de la funció callback.
+
+ +

Descripció

+ +

reduce executa la funció callback un cop per cada element present a l'array, excloent forats a l'array, i rep quatre arguments:

+ + + +

El primer cop que es crida callback, valorAnterior i valorActual reben el valor de la forma descrita a continuació. Si es proporciona valorInicial a la crida de reduce, valorAnterior rebrà el valor de valorInicial i valorActual serà igual al primer valor de l'array. Si no es proporciona valorInicial, valorAnterior serà igual al primer valor de l'array i valorActual serà igual al segon.

+ +

Si l'array és buit i no s'ha proporcionat valorInicial, es llençarà {{jsxref("Global_Objects/TypeError", "TypeError")}}. Si l'array només té un element (sense importar la seva posició) i no s'ha proporcionat valorInicial, o si valorInicial s'ha proporcionat però l'array és buit, es retornarà aquest únic valor sense realitzar cap crida a callback.

+ +

Suposem que s'ha utilitzar reduce de la forma següent:

+ +
[0, 1, 2, 3, 4].reduce(function(previousValue, currentValue, index, array) {
+  return previousValue + currentValue;
+});
+
+ +

La funció callback es cridarà quatre cops, on els arguments i els valors a retornar es mostren a continuació:

+ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +
 valorAnteriorvalorActualindexarrayvalor retornat
primera crida011[0, 1, 2, 3, 4]1
segons crida122[0, 1, 2, 3, 4]3
tercera crida333[0, 1, 2, 3, 4]6
quarta crida644[0, 1, 2, 3, 4]10
+ +

El valor retornat per reduce serà el de l'última invocació a callback (10).

+ +

Si es proporcionés el valor inicial com a segon argument de reduce, el resultat seria el següent:

+ +
[0, 1, 2, 3, 4].reduce(function(valorAnterior, valorActual, index, array) {
+  return valorAnterior + valorActual;
+}, 10);
+
+ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +
 valorAnteriorvalorActualindexarrayvalor retornat
primera crida1000[0, 1, 2, 3, 4]10
segona crida1011[0, 1, 2, 3, 4]11
tercera crida1122[0, 1, 2, 3, 4]13
quarta crida1333[0, 1, 2, 3, 4]16
cinquena crida1644[0, 1, 2, 3, 4]20
+ +

El valor de la crida final (20) és el retornat per la funció reduce.

+ +

Exemples

+ +

Sumar tots els valors d'un array

+ +
var total = [0, 1, 2, 3].reduce(function(a, b) {
+  return a + b;
+});
+// total == 6
+
+ +

Aplanar un array d'arrays

+ +
var flattened = [[0, 1], [2, 3], [4, 5]].reduce(function(a, b) {
+  return a.concat(b);
+}, []);
+// flattened is [0, 1, 2, 3, 4, 5]
+
+ +

Polyfill

+ +

Array.prototype.reduce va ser afegida a l'standard ECMA-262 a la cinquena edició; degut a això aquesta no estar present a totes les implementacions de l'standard. És possible simular-la en aquests casos mitjançant l'inserció del codi que trobareu a continuació a l'inici dels vostres scripts, tot permetent-vos utilitzar reduce en implementacions que no la suportin de forma nativa.

+ +
// Production steps of ECMA-262, Edition 5, 15.4.4.21
+// Reference: http://es5.github.io/#x15.4.4.21
+if (!Array.prototype.reduce) {
+  Array.prototype.reduce = function(callback /*, initialValue*/) {
+    'use strict';
+    if (this == null) {
+      throw new TypeError('Array.prototype.reduce called on null or undefined');
+    }
+    if (typeof callback !== 'function') {
+      throw new TypeError(callback + ' is not a function');
+    }
+    var t = Object(this), len = t.length >>> 0, k = 0, value;
+    if (arguments.length == 2) {
+      value = arguments[1];
+    } else {
+      while (k < len && !(k in t)) {
+        k++;
+      }
+      if (k >= len) {
+        throw new TypeError('Reduce of empty array with no initial value');
+      }
+      value = t[k++];
+    }
+    for (; k < len; k++) {
+      if (k in t) {
+        value = callback(value, t[k], k, t);
+      }
+    }
+    return value;
+  };
+}
+
+ +

Especificacions

+ + + + + + + + + + + + + + + + + + + +
EspecificacióEstatComentaris
{{SpecName('ES5.1', '#sec-15.4.4.21', 'Array.prototype.reduce')}}{{Spec2('ES5.1')}}Definició inicial. Implementat a JavaScript 1.8.
{{SpecName('ES6', '#sec-array.prototype.reduce', 'Array.prototype.reduce')}}{{Spec2('ES6')}} 
+ +

Compatibilitat amb navegadors

+ +
{{CompatibilityTable}}
+ +
+ + + + + + + + + + + + + + + + + + + +
CaracterísticaChromeFirefox (Gecko)Internet ExplorerOperaSafari
Suport bàsic{{CompatVersionUnknown}}{{CompatGeckoDesktop("1.9")}}{{CompatIE("9")}}{{CompatOpera("10.5")}}{{CompatSafari("4.0")}}
+
+ +
+ + + + + + + + + + + + + + + + + + + + + +
CaracterísticaAndroidChrome for AndroidFirefox Mobile (Gecko)IE MobileOpera MobileSafari Mobile
Suport bàsic{{CompatVersionUnknown}}{{CompatVersionUnknown}}{{CompatVersionUnknown}}{{CompatVersionUnknown}}{{CompatVersionUnknown}}{{CompatVersionUnknown}}
+
+ +

Vegeu també

+ + diff --git a/files/ca/web/javascript/reference/global_objects/array/reverse/index.html b/files/ca/web/javascript/reference/global_objects/array/reverse/index.html new file mode 100644 index 0000000000..2528cabdc5 --- /dev/null +++ b/files/ca/web/javascript/reference/global_objects/array/reverse/index.html @@ -0,0 +1,119 @@ +--- +title: Array.prototype.reverse() +slug: Web/JavaScript/Referencia/Objectes_globals/Array/reverse +translation_of: Web/JavaScript/Reference/Global_Objects/Array/reverse +--- +
{{JSRef}}
+ +

El mètode reverse() inverteix un array. El primer element de l'array es converteix en l'últim element i l'últim element de l'array passa a ésser el primer.

+ +

Sintaxi

+ +
arr.reverse()
+ +

Paràmetres

+ +

Cap.

+ +

Descripció

+ +

El mètode reverse method transposa els elements de l'objecte array cridat en un lloc, mutant l'array, i retorna una referència de l'array.

+ +

Exemples

+ +

Revertir els elements d'un array

+ +

L'exemple següent crea un array myArray, que conté tres elements, després inverteix l'array.

+ +
var myArray = ['one', 'two', 'three'];
+myArray.reverse();
+
+console.log(myArray) // ['three', 'two', 'one']
+
+ +

Especificacions

+ + + + + + + + + + + + + + + + + + + + + + + + +
EspecificacióEstatComentaris
{{SpecName('ES1')}}{{Spec2('ES1')}}Definició inicial. Implementat en JavaScript 1.1.
{{SpecName('ES5.1', '#sec-15.4.4.8', 'Array.prototype.reverse')}}{{Spec2('ES5.1')}} 
{{SpecName('ES6', '#sec-array.prototype.reverse', 'Array.prototype.reverse')}}{{Spec2('ES6')}} 
+ +

Compatibilitat amb navegadors

+ +
{{CompatibilityTable}}
+ +
+ + + + + + + + + + + + + + + + + + + +
CaracterísticaChromeFirefox (Gecko)Internet ExplorerOperaSafari
Suport bàsic{{CompatChrome("1.0")}}{{CompatGeckoDesktop("1.7")}}{{CompatIE("5.5")}}{{CompatVersionUnknown}}{{CompatVersionUnknown}}
+
+ +
+ + + + + + + + + + + + + + + + + + + + + +
CaracterísticaAndroidChrome per AndroidFirefox Mobile (Gecko)IE MobileOpera MobileSafari Mobile
Suport bàsic{{CompatVersionUnknown}}{{CompatVersionUnknown}}{{CompatVersionUnknown}}{{CompatVersionUnknown}}{{CompatVersionUnknown}}{{CompatVersionUnknown}}
+
+ +

Vegeu també

+ + diff --git a/files/ca/web/javascript/reference/global_objects/array/shift/index.html b/files/ca/web/javascript/reference/global_objects/array/shift/index.html new file mode 100644 index 0000000000..7b5fa1b330 --- /dev/null +++ b/files/ca/web/javascript/reference/global_objects/array/shift/index.html @@ -0,0 +1,129 @@ +--- +title: Array.prototype.shift() +slug: Web/JavaScript/Referencia/Objectes_globals/Array/shift +translation_of: Web/JavaScript/Reference/Global_Objects/Array/shift +--- +
{{JSRef}}
+ +

El mètode shift() elimina el primer element d'un array i retorna l'element eliminat. Aquest mètode canvia el tamany de l'array.

+ +

Sintaxi

+ +
arr.shift()
+ +

Descripció

+ +

El mètode shift elimina l'element de l'array situat a la posició zero i mou la resta d'elements a la posició immediatament menor, tot seguit retorna el valor de l'element eliminat. Si la propietat {{jsxref("Array.length", "length")}} de l'array és 0, aquest mètode retornarà {{jsxref("undefined")}}.

+ +

shift és generic de forma intencionada; aquest mètode pot ser {{jsxref("Function.call", "cridat", "", 1)}} o bé {{jsxref("Function.apply", "aplicat", "", 1)}} a objectes que es comportin com a arrays. Els objectes que no continguin una propietat length que reflecteixi l'última propietat numèrica poden tenir un comportament erràtic.

+ +

Exemples

+ +

Eliminar un element d'un array

+ +

El codi següent mostra l'array myFish abans i després d'eliminar el seu primer element. També mostra l'element eliminat:

+ +
var myFish = ['angel', 'clown', 'mandarin', 'surgeon'];
+
+console.log('myFish abans: ' + myFish);
+// "myFish abans: angel,clown,mandarin,surgeon"
+
+var shifted = myFish.shift();
+
+console.log('myFish després: ' + myFish);
+// "myFish després: clown,mandarin,surgeon"
+
+console.log('Element eliminat: ' + shifted);
+// "Element eliminat: angel"
+ +

Especificacions

+ + + + + + + + + + + + + + + + + + + + + + + + + + + + + +
EspecificacióEstatComentaris
{{SpecName('ES3')}}{{Spec2('ES3')}}Definició inicial. Implementat a JavaScript 1.2.
{{SpecName('ES5.1', '#sec-15.4.4.9', 'Array.prototype.shift')}}{{Spec2('ES5.1')}} 
{{SpecName('ES6', '#sec-array.prototype.shift', 'Array.prototype.shift')}}{{Spec2('ES6')}} 
{{SpecName('ESDraft', '#sec-array.prototype.shift', 'Array.prototype.shift')}}{{Spec2('ESDraft')}} 
+ +

Compatibilitat amb navegadors

+ +
{{CompatibilityTable}}
+ +
+ + + + + + + + + + + + + + + + + + + +
CaracterísticaChromeFirefox (Gecko)Internet ExplorerOperaSafari
Suport bàsic{{CompatChrome("1.0")}}{{CompatGeckoDesktop("1.7")}}{{CompatIE("5.5")}}{{CompatVersionUnknown}}{{CompatVersionUnknown}}
+
+ +
+ + + + + + + + + + + + + + + + + + + + + +
CaracterísticaAndroidChrome for AndroidFirefox Mobile (Gecko)IE MobileOpera MobileSafari Mobile
Suport bàsic{{CompatVersionUnknown}}{{CompatVersionUnknown}}{{CompatVersionUnknown}}{{CompatVersionUnknown}}{{CompatVersionUnknown}}{{CompatVersionUnknown}}
+
+ +

Vegeu també

+ + diff --git a/files/ca/web/javascript/reference/global_objects/array/slice/index.html b/files/ca/web/javascript/reference/global_objects/array/slice/index.html new file mode 100644 index 0000000000..d181f94a65 --- /dev/null +++ b/files/ca/web/javascript/reference/global_objects/array/slice/index.html @@ -0,0 +1,268 @@ +--- +title: Array.prototype.slice() +slug: Web/JavaScript/Referencia/Objectes_globals/Array/slice +translation_of: Web/JavaScript/Reference/Global_Objects/Array/slice +--- +
{{JSRef}}
+ +

El mètode slice() retorna una còpia feble d'una porció d'un array en forma d'un nou objecte array.

+ +

Sintaxi

+ +
arr.slice([inici[, fi]])
+ +

Paràmetres

+ +
+
inici
+
La posició (tenint en compte que zero correspon a la primera posició) a partir de la qual començarà l'extracció.
+
Si inici és negatiu, la posició correspondrà a la posicó final de la seqüència menys el valor proporcionat. slice(-2) extreu els últims dos elements de la seqüència.
+
Si inici és undefined, slice començarà a la posició 0.
+
fi
+
La posició (contant des de zero) en la qual finalitzarà l'extracció. slice extraurà fins a aquesta posicó, sense incloure-la.
+
slice(1,4) extrau des del segon element fins al quart element (és a dir, els elements pertanyents a les posicions 1, 2 i 3).
+
Si fi és negatiu, la posició correspondrà a la posicó final de la seqüència menys el valor proporcionat. slice(2,-1) extrau des del tercer element fins al penúltim element de la seqüència.
+
Si s'omet el paràmetre fi, slice extreurà fins al final de la seqüència (arr.length).
+
+ +

Descripció

+ +

slice no altera l'array original. Retorna una copia feble dels elements de l'array original. Els elements de l'array original són copiats a l'array resultat de la forma següent:

+ + + +

Si s'afegeix un nou element a un dels dos arrays, l'altre array no es veu afectat.

+ +

Exemples

+ +

Retornar una part d'un array existent

+ +
var fruits = ['Banana', 'Orange', 'Lemon', 'Apple', 'Mango'];
+var citrus = fruits.slice(1, 3);
+
+// citrus conté ['Orange','Lemon']
+
+ +

Utilitzar slice

+ +

A l'exemple següent slice crea un ou array newCar, a partir de myCar. Ambdos inclouen una referència a l'objecte myHonda. Quan el color de myHonda canvia a lila, ambdos arrays reflecteixen aquest canvi.

+ +
// Ús de slice, creem newCar a partir de myCar.
+var myHonda = { color: 'red', wheels: 4, engine: { cylinders: 4, size: 2.2 } };
+var myCar = [myHonda, 2, 'cherry condition', 'purchased 1997'];
+var newCar = myCar.slice(0, 2);
+
+// Mostrem els valors de myCar, newCar, i el color de myHonda
+//  referenciat a ambdos arrays.
+console.log('myCar = ' + myCar.toSource());
+console.log('newCar = ' + newCar.toSource());
+console.log('myCar[0].color = ' + myCar[0].color);
+console.log('newCar[0].color = ' + newCar[0].color);
+
+// Canviem el color de myHonda.
+myHonda.color = 'purple';
+console.log('The new color of my Honda is ' + myHonda.color);
+
+// Mostrem el color de myHonda referenciat a ambdos arrays.
+console.log('myCar[0].color = ' + myCar[0].color);
+console.log('newCar[0].color = ' + newCar[0].color);
+
+ +

Aquest script mostra:

+ +
myCar = [{color:'red', wheels:4, engine:{cylinders:4, size:2.2}}, 2,
+         'cherry condition', 'purchased 1997']
+newCar = [{color:'red', wheels:4, engine:{cylinders:4, size:2.2}}, 2]
+myCar[0].color = red
+newCar[0].color = red
+The new color of my Honda is purple
+myCar[0].color = purple
+newCar[0].color = purple
+
+ +

Objectes compatibles amb arrays

+ +

El mètode slice també es pot utilitzar per a convertir objectes compatibles amb arrays / col·leccions a un nou Array. Simplement hem de vincular el mètode a l'objecte. L'objecte {{jsxref("Functions/arguments", "arguments")}} dins una funció és un exemple d'objecte 'compatible amb arrays'.

+ +
function list() {
+  return Array.prototype.slice.call(arguments);
+}
+
+var list1 = list(1, 2, 3); // [1, 2, 3]
+
+ +

Podem vincular el mètode a l'objecte mitjançant la funció .call proporcionada per {{jsxref("Function.prototype")}}, també podem reduir-la a [].slice.call(arguments) en comptes de Array.prototype.slice.call. També podem simplificar-ho utilitzant la funció {{jsxref("Function.prototype.bind", "bind")}}.

+ +
var unboundSlice = Array.prototype.slice;
+var slice = Function.prototype.call.bind(unboundSlice);
+
+function list() {
+  return slice(arguments);
+}
+
+var list1 = list(1, 2, 3); // [1, 2, 3]
+
+ +

Oferint un comportament similar entre navegadors

+ +

Tot i que segons la especificació els objectes de l'hoste (com ara els objectes DOM) no requereixen seguir el comportament de Mozilla al ser convertits mitjançant Array.prototype.slice i, de fet les versions de Internet Explorer anteriors a la 9 no ho fan, les versions a partir de la 9 si que suporten l'ús d'aquesta funció de compatibilitat, permetent un comportament fiable entre navegadors. Mentre els altres navegadors moderns continuin oferint aquesta habilitat, tal i com ara fan IE, Mozilla, Chrome, Safari i Opera, els desenvolupadors que llegeixin codi sobre slice (suportat pel DOM) que es recolzi en aquesta funció de compatibilitat no tenen que patir per la semàntica; poden fiar-se de la semàntica descrita per a proporcionar el comportament que ara sembla standard de facto (La funció de compatibilitat també permet que el IE funcioni quan es passa com a segon argument de slice() un valor explícit de {{jsxref("null")}}/{{jsxref("undefined")}} ja que versions anteriors de IE no ho permetien però tots els nous navegadors, incloent IE >= 9, si que ho permeten.)

+ +
/**
+ * Shim for "fixing" IE's lack of support (IE < 9) for applying slice
+ * on host objects like NamedNodeMap, NodeList, and HTMLCollection
+ * (technically, since host objects have been implementation-dependent,
+ * at least before ES6, IE hasn't needed to work this way).
+ * Also works on strings, fixes IE < 9 to allow an explicit undefined
+ * for the 2nd argument (as in Firefox), and prevents errors when
+ * called on other DOM objects.
+ */
+(function () {
+  'use strict';
+  var _slice = Array.prototype.slice;
+
+  try {
+    // Can't be used with DOM elements in IE < 9
+    _slice.call(document.documentElement);
+  } catch (e) { // Fails in IE < 9
+    // This will work for genuine arrays, array-like objects,
+    // NamedNodeMap (attributes, entities, notations),
+    // NodeList (e.g., getElementsByTagName), HTMLCollection (e.g., childNodes),
+    // and will not fail on other DOM objects (as do DOM elements in IE < 9)
+    Array.prototype.slice = function(begin, end) {
+      // IE < 9 gets unhappy with an undefined end argument
+      end = (typeof end !== 'undefined') ? end : this.length;
+
+      // For native Array objects, we use the native slice function
+      if (Object.prototype.toString.call(this) === '[object Array]'){
+        return _slice.call(this, begin, end);
+      }
+
+      // For array like object we handle it ourselves.
+      var i, cloned = [],
+        size, len = this.length;
+
+      // Handle negative value for "begin"
+      var start = begin || 0;
+      start = (start >= 0) ? start : Math.max(0, len + start);
+
+      // Handle negative value for "end"
+      var upTo = (typeof end == 'number') ? Math.min(end, len) : len;
+      if (end < 0) {
+        upTo = len + end;
+      }
+
+      // Actual expected size of the slice
+      size = upTo - start;
+
+      if (size > 0) {
+        cloned = new Array(size);
+        if (this.charAt) {
+          for (i = 0; i < size; i++) {
+            cloned[i] = this.charAt(start + i);
+          }
+        } else {
+          for (i = 0; i < size; i++) {
+            cloned[i] = this[start + i];
+          }
+        }
+      }
+
+      return cloned;
+    };
+  }
+}());
+
+ +

Especificacions

+ + + + + + + + + + + + + + + + + + + + + + + + + + + + + +
EspecificacióEstatComentaris
{{SpecName('ES3')}}{{Spec2('ES3')}}Definició inicial. Implementat a JavaScript 1.2.
{{SpecName('ES5.1', '#sec-15.4.4.10', 'Array.prototype.slice')}}{{Spec2('ES5.1')}} 
{{SpecName('ES6', '#sec-array.prototype.slice', 'Array.prototype.slice')}}{{Spec2('ES6')}} 
{{SpecName('ESDraft', '#sec-array.prototype.slice', 'Array.prototype.slice')}}{{Spec2('ESDraft')}} 
+ +

Compatibilitat amb navegadors

+ +
{{CompatibilityTable}}
+ +
+ + + + + + + + + + + + + + + + + + + +
CaracterísticaChromeFirefox (Gecko)Internet ExplorerOperaSafari
Suport bàsic{{CompatChrome("1.0")}}{{CompatGeckoDesktop("1.7")}}{{CompatVersionUnknown}}{{CompatVersionUnknown}}{{CompatVersionUnknown}}
+
+ +
+ + + + + + + + + + + + + + + + + + + + + +
CaracterísticaAndroidChrome for AndroidFirefox Mobile (Gecko)IE MobileOpera MobileSafari Mobile
Suport bàsic{{CompatVersionUnknown}}{{CompatVersionUnknown}}{{CompatVersionUnknown}}{{CompatVersionUnknown}}{{CompatVersionUnknown}}{{CompatVersionUnknown}}
+
+ +

Vegeu també

+ + diff --git a/files/ca/web/javascript/reference/global_objects/array/some/index.html b/files/ca/web/javascript/reference/global_objects/array/some/index.html new file mode 100644 index 0000000000..7abc1ed76d --- /dev/null +++ b/files/ca/web/javascript/reference/global_objects/array/some/index.html @@ -0,0 +1,213 @@ +--- +title: Array.prototype.some() +slug: Web/JavaScript/Referencia/Objectes_globals/Array/some +translation_of: Web/JavaScript/Reference/Global_Objects/Array/some +--- +
{{JSRef}}
+ +

El mètode some() comprova si un algun element de l'array passa el test implementat per la funció proporcionada com a argument.

+ +

Sintaxi

+ +
arr.some(callback[, thisArg])
+ +

Paràmetres

+ +
+
callback
+
Funció utilitzada com a test per a cada element, rep tres arguments: +
+
valorActual
+
L'element de l'array que està sent avaluat.
+
posició
+
La posició que l'element passat al primer paràmetre ocupa dins l'array.
+
array
+
L'array des del que s'ha cridat el mètode some().
+
+
+
thisArg
+
Opcional. Valor que valdrà la variable this quan s'estigui executant la funció callback.
+
+ +

Valor retornat

+ +

Aquesta funció retorna true si la funció callback retorna true per a almenys un element de l'array; en qualsevol altre cas retorna false.

+ +

Descripció

+ +

some() executa la funció callback un cop per a cada element present a l'array fins que troba un per al qual callback retorna true. Si es troba aquest element, some() retorna true immediatament. En cas contrari some() retornarà false. Només s'invocarà la funció callback en les posicions de l'array que tinguin un valor assignat, és a dir, mai es cridarà per a posicions que han estat esborrades o el valor de les quals no ha estat mai assignat.

+ +

S'invoca callback amb tres arguments: el valor de l'element, la posició de l'element dins l'array, i l'objecte array que es recorrerà.

+ +

Si es proporciona el paràmetre thisArg al mètode some(), aquest es passarà a callback quan s'invoqui, i serà el valor que mostrarà la variable this. En cas contrari, s'utilitzarà el valor {{jsxref("undefined")}} com a valor per a this. El valor de this observable en última instància per callback es determinarà d'acord a les regles per a determinar el valor de this observat per una funció.

+ +

some() no mutarà l'array quan sigui cridada.

+ +

El rang d'elements processat per some() és determinat abans de la primera invocació de callback. Els elements que s'afegeixin a l'array després de la crida a some() no seran visitats per callback. Si el valor d'un element encara no visitat canvia, el valor que es passarà a callback serà el valor que tingui aquest element a l'hora de visitar-lo; els elements que s'esborrin no es visitaran.

+ +

Exemples

+ +

Comprovar el valor dels elements d'un array

+ +

L'exemple següent comprova si el valor d'algun element de l'array es major que 10.

+ +
function isBiggerThan10(element, posicio, array) {
+  return element > 10;
+}
+[2, 5, 8, 1, 4].some(isBiggerThan10);  // false
+[12, 5, 8, 1, 4].some(isBiggerThan10); // true
+
+ +

Comprovar els elements d'un array utilitzant funcions fletxa

+ +

Les funcions fletxa ofereixen una sintaxi reduïda per a realitzar el mateix test.

+ +
[2, 5, 8, 1, 4].some(elem => elem > 10);  // false
+[12, 5, 8, 1, 4].some(elem => elem > 10); // true
+
+ +

Comprovar si existeix un valor en un array

+ +

L'exemple següent retorna cert si existeix un elmeent donat dins un array

+ +
var fruits = ['poma', 'platan', 'mango', 'guava'];
+
+function checkAvailability(arr, val) {
+    return arr.some(function(arrVal) {
+        return val === arrVal;
+    });
+}
+
+checkAvailability(fruits, 'kela'); //false
+checkAvailability(fruits, 'platan'); //true
+ +

Comprovar si existeix un valor amb funcions fletxa

+ +
var fruits = ['poma', 'platan', 'mango', 'guava'];
+
+function checkAvailability(arr, val) {
+    return arr.some(arrVal => val === arrVal);
+}
+
+checkAvailability(fruits, 'kela'); //false
+checkAvailability(fruits, 'platan'); //true
+ +

Polyfill

+ +

some() va ser afegida  al standard ECMA-262 en la cinquena edició; és per això que pot no estar disponible en certes implementacions del standard. Es pot proporcionar la seva funcionalitat inserint l'script següent a l'inici dels vostres scripts, permetent l'ús de some() en implementacions que no la suporten de forma nativa. Aquest algoritme és exactament l'especificat a l'ECMA-262, cinquena edició, assumint que {{jsxref("Object")}} i {{jsxref("TypeError")}} tenen els valors originals i que fun.call es correspon amb el valor original de {{jsxref("Function.prototype.call()")}}.

+ +
// Production steps of ECMA-262, Edition 5, 15.4.4.17
+// Reference: http://es5.github.io/#x15.4.4.17
+if (!Array.prototype.some) {
+  Array.prototype.some = function(fun/*, thisArg*/) {
+    'use strict';
+
+    if (this == null) {
+      throw new TypeError('Array.prototype.some called on null or undefined');
+    }
+
+    if (typeof fun !== 'function') {
+      throw new TypeError();
+    }
+
+    var t = Object(this);
+    var len = t.length >>> 0;
+
+    var thisArg = arguments.length >= 2 ? arguments[1] : void 0;
+    for (var i = 0; i < len; i++) {
+      if (i in t && fun.call(thisArg, t[i], i, t)) {
+        return true;
+      }
+    }
+
+    return false;
+  };
+}
+
+ +

Especificacions

+ + + + + + + + + + + + + + + + + + + + + + + + +
EspecificacióEstatComentaris
{{SpecName('ES5.1', '#sec-15.4.4.17', 'Array.prototype.some')}}{{Spec2('ES5.1')}}Definició inicial. Implementat a JavaScript 1.6.
{{SpecName('ES6', '#sec-array.prototype.some', 'Array.prototype.some')}}{{Spec2('ES6')}}
{{SpecName('ESDraft', '#sec-array.prototype.some', 'Array.prototype.some')}}{{Spec2('ESDraft')}}
+ +

Compatibilitat amb navegadors

+ +
{{CompatibilityTable}}
+ +
+ + + + + + + + + + + + + + + + + + + +
CaracterísticaChromeFirefox (Gecko)Internet ExplorerOperaSafari
Suport bàsic{{CompatVersionUnknown}}{{CompatGeckoDesktop("1.8")}}{{CompatIE("9")}}{{CompatVersionUnknown}}{{CompatVersionUnknown}}
+
+ +
+ + + + + + + + + + + + + + + + + + + + + +
CaracterísticaAndroidChrome for AndroidFirefox Mobile (Gecko)IE MobileOpera MobileSafari Mobile
Suport bàsic{{CompatVersionUnknown}}{{CompatVersionUnknown}}{{CompatGeckoMobile("1.8")}}{{CompatVersionUnknown}}{{CompatVersionUnknown}}{{CompatVersionUnknown}}
+
+ +

Vegeu també

+ + diff --git a/files/ca/web/javascript/reference/global_objects/array/splice/index.html b/files/ca/web/javascript/reference/global_objects/array/splice/index.html new file mode 100644 index 0000000000..c1abada8d9 --- /dev/null +++ b/files/ca/web/javascript/reference/global_objects/array/splice/index.html @@ -0,0 +1,171 @@ +--- +title: Array.prototype.splice() +slug: Web/JavaScript/Referencia/Objectes_globals/Array/splice +translation_of: Web/JavaScript/Reference/Global_Objects/Array/splice +--- +
{{JSRef}}
+ +

El mètode splice() modifica el contingut d'un array eliminant elements ja existents i/o afegint-ne de nous.

+ +

Sintaxi

+ +
array.splice(inici, comptadorEliminar[, item1[, item2[, ...]]])
+
+ +

Paràmetres

+ +
+
inici
+
La posició a partir de la qual es començarà a modificar l'array (considerant 0 com a primera posició). Si s'especifca un nombre major que la longitud de l'array, la posició d'inici real esdevindrà la longitud de l'array. Si s'especifica un nombre negatiu, la posició d'inici serà el valor absolut del nombre especificat contant des del final de l'array.
+
comptadorEliminar
+
Un nombre sencer que indica el nombre d'elements que s'eliminaran. Si comptadorEliminar és 0 no s'eliminarà cap element. En aquest cas s'hauria d'especificar al menys un nou element. Si comptadorEliminar és major que el nombre d'elements de l'array des de la posició inici fins el final de l'array tots els elements des d'inici fins al final de l'array seran eliminats.
+
Si s'omet comptadorEliminar aquest rebrà un valor per defecte igual a (arr.length - inici).
+
item1, item2, ...
+
Els elements que s'afegiran a l'array, començant a la posició inici. Si no s'especifcia cap element, splice() només eliminarà elements de l'array.
+
+ +

Valor retornat

+ +

Un array que conté els elements eliminats. Si només s'ha eliminat un element es retornarà un array amb un sol element. Si no s'ha eliminat cap element retornarà un array buit.

+ +

Descripció

+ +

Si s'especifica un nombre diferent d'elements a eliminar del nombre d'elements a inserir la longitud de l'array canviarà al final de la crida.

+ +

Exemples

+ +

Utilitzar splice()

+ +

L'script seguent ilustra l'ús de splice():

+ +
var myFish = ['angel', 'clown', 'mandarin', 'surgeon'];
+
+// eliminem 0 elements a partir de la posició 2, i inserim 'drum'
+var eliminats = myFish.splice(2, 0, 'drum');
+// myFish is ['angel', 'clown', 'drum', 'mandarin', 'surgeon']
+// eliminats va [], no s'han eliminat elements
+
+// myFish val ['angel', 'clown', 'drum', 'mandarin', 'surgeon']
+// eliminem 1 element a la posició 3
+eliminats = myFish.splice(3, 1);
+// myFish val ['angel', 'clown', 'drum', 'surgeon']
+// eliminats val ['mandarin']
+
+// myFish val ['angel', 'clown', 'drum', 'surgeon']
+// Eliminem 1 element a la posició 2, i inserim 'trumpet'
+eliminats = myFish.splice(2, 1, 'trumpet');
+// myFish val ['angel', 'clown', 'trumpet', 'surgeon']
+// eliminats val ['drum']
+
+// myFish val ['angel', 'clown', 'trumpet', 'surgeon']
+// eliminem 2 elements de la posició 0, i inserim 'parrot', 'anemone' i 'blue'
+eliminats = myFish.splice(0, 2, 'parrot', 'anemone', 'blue');
+// myFish val ['parrot', 'anemone', 'blue', 'trumpet', 'surgeon']
+// eliminats val ['angel', 'clown']
+
+// myFish val ['parrot', 'anemone', 'blue', 'trumpet', 'surgeon']
+// eliminem 2 elements de la posició 3
+eliminats = myFish.splice(myFish.length -3, 2);
+// myFish val ['parrot', 'anemone', 'surgeon']
+// eliminats val ['blue', 'trumpet']
+
+ +

Especificacions

+ + + + + + + + + + + + + + + + + + + + + + + + + + + + + +
EspecificacióEstatComentaris
{{SpecName('ES3')}}{{Spec2('ES3')}}Definició inicial. Implementat a JavaScript 1.2.
{{SpecName('ES5.1', '#sec-15.4.4.12', 'Array.prototype.splice')}}{{Spec2('ES5.1')}}
{{SpecName('ES6', '#sec-array.prototype.splice', 'Array.prototype.splice')}}{{Spec2('ES6')}}
{{SpecName('ESDraft', '#sec-array.prototype.splice', 'Array.prototype.splice')}}{{Spec2('ESDraft')}}
+ +

Compatibilitat amb navegadors

+ +
{{CompatibilityTable}}
+ +
+ + + + + + + + + + + + + + + + + + + +
CaracterísticaChromeFirefox (Gecko)Internet ExplorerOperaSafari
Suport bàsic{{CompatChrome("1.0")}}{{CompatGeckoDesktop("1.7")}}{{CompatIE("5.5")}}{{CompatVersionUnknown}}{{CompatVersionUnknown}}
+
+ +
+ + + + + + + + + + + + + + + + + + + + + +
CaracterísticaAndroidChrome for AndroidFirefox Mobile (Gecko)IE MobileOpera MobileSafari Mobile
Suport bàsic{{CompatVersionUnknown}}{{CompatVersionUnknown}}{{CompatVersionUnknown}}{{CompatVersionUnknown}}{{CompatVersionUnknown}}{{CompatVersionUnknown}}
+
+ +

Compatibilitat amb versions anteriors

+ +

A JavaScript 1.2 el mètode splice() retornava l'element eliminat si només s'havia eliminat un sol element (és a dir, si el valor del paràmetre comptadorEliminar era 1); en qualsevol altre cas retornava un array contenit els elements eliminats.

+ +
+

Nota: L'últim navegador en utilitzar JavaScript 1.2 va ser el Netscape Navigator 4, així que podeu asumir que splice() sempre retornarà un array. Aquest és el cas quan un objecte JavaScript disposa de la propietat length i un mètode splice(),{{domxref("console.log()")}} el tracta com si fós un objecte array. Comprovar-ho amb instanceof Array retornarà false.

+
+ +

Vegeu també

+ + diff --git a/files/ca/web/javascript/reference/global_objects/boolean/index.html b/files/ca/web/javascript/reference/global_objects/boolean/index.html new file mode 100644 index 0000000000..83f2597df9 --- /dev/null +++ b/files/ca/web/javascript/reference/global_objects/boolean/index.html @@ -0,0 +1,196 @@ +--- +title: Boolean +slug: Web/JavaScript/Referencia/Objectes_globals/Boolean +translation_of: Web/JavaScript/Reference/Global_Objects/Boolean +--- +
{{JSRef("Global_Objects", "Boolean")}}
+ +

Resum

+ +

L'objecte Boolean és un objecte que embolcalla valors booleans.

+ +

Constructor

+ +
new Boolean([valors])
+ +

Paràmetres

+ +
+
valors
+
Opcional. El valor inicial de l'objecte Boolean.
+
+ +

Descripció

+ +

El valor passat com a primer paràmetre es converteix a un valor booleà, en cas necesari. Si és omés o si és 0, -0, {{jsxref("Global_Objects/null", "null")}}, false, {{jsxref("Global_Objects/NaN", "NaN")}}, {{jsxref("Global_Objects/undefined", "undefined")}}, o la cadena de caràcters buida (""), l'objecte tindrà el valor inicial false. Tots els altres valors, incloent qualsevol objecte o la cadena de caràcters "false", crea un objecte amb el valor inicial de true.

+ +

No confoneu els valors Boolean primitius true i false amb els valors true i false de l'objecte Boolean.

+ +

Qualsevol objecte el valor del qual no sigui {{jsxref("Global_Objects/undefined", "undefined")}} o {{jsxref("Global_Objects/null", "null")}}, incloent un objecte de tipus Boolean el valor del qual sigui false, evalua a true quan es passa a una sentència condicional. Per exemple, la condició en la següent sentència {{jsxref("Statements/if...else", "if")}} evalua a true:

+ +
x = new Boolean(false);
+if (x) {
+  // aquest codi s'executarà
+}
+
+ +

Aquest comportament no s'aplica a les primitives de tipus booleà. Per exemple, la condició en la següent sentència {{jsxref("Statements/if...else", "if")}} evalua a false:

+ +
x = false;
+if (x) {
+  // aquest codi no s'executarà
+}
+
+ +

No creeu una instància de Boolean per a convertir un valor no booleà a un valor booleà. En comptes d'això utilitzeu Boolean com una funció per a realitzar aquesta tasca:

+ +
x = Boolean(expression);     // utilitzar preferentment
+x = new Boolean(expression); // no ho utilitzeu
+
+ +

Si s'especifica qualsevol objecte, inclòs un objecte Boolean el valor del qual sigui false, com a valor inicial per a un objecte Boolean, el nou objecte Boolean tindrà un valor de true.

+ +
myFalse = new Boolean(false);   // valor inicial false
+g = new Boolean(myFalse);       // valor inicial true
+myString = new String('Hello'); // objecte de tipus String
+s = new Boolean(myString);      // valor inicial true
+
+ +

No utilitzeu un objecte Boolean quan podríeu utilitzar un valor primitiu booleà.

+ +

Propietats

+ +
+
Boolean.length
+
La propietat Length retorna el valor de 1.
+
{{jsxref("Boolean.prototype")}}
+
Representa el prototip pel constructor Boolean.
+
+ +

{{jsOverrides("Function", "Properties", "prototype")}}

+ +

Mètodes

+ +

L'objecte Boolean no té mètodes propis. Hereta, però, alguns mètodes a través de la cadena de prototipus:

+ +
{{jsOverrides("Function", "Methods")}}
+ +

Instàncies de Boolean

+ +

Totes les instàncies de Boolean hereten de {{jsxref("Boolean.prototype")}}. Com tots els constructors, el prototipus de l'objecte dicta les propietats i mètodes que heretaran les instàncies.

+ +

Propietats

+ +
{{page('/ca/docs/Web/JavaScript/Reference/Global_Objects/Boolean/prototype', 'Properties')}}
+ +

Mètodes

+ +
{{page('/en-US/docs/Web/JavaScript/Reference/Global_Objects/Boolean/prototype', 'Methods')}}
+ +

Exemples

+ +

Exemple: Crear objectes Boolean amb un valor inicial de false

+ +
var bNoParam = new Boolean();
+var bZero = new Boolean(0);
+var bNull = new Boolean(null);
+var bEmptyString = new Boolean('');
+var bfalse = new Boolean(false);
+
+ +

Exemple: Crear objectes Boolean amb un valor inicial de true

+ +
var btrue = new Boolean(true);
+var btrueString = new Boolean('true');
+var bfalseString = new Boolean('false');
+var bSuLin = new Boolean('Su Lin');
+var bArrayProto = new Boolean([]);
+var bObjProto = new Boolean({});
+
+ +

Especificacions

+ + + + + + + + + + + + + + + + + + + + + + + + +
EspecificacióEstatComentaris
ECMAScript 1a Edició.StandardDefinició inicial. Implementat a JavaScript 1.0.
{{SpecName('ES5.1', '#sec-15.6', 'Boolean')}}{{Spec2('ES5.1')}} 
{{SpecName('ES6', '#sec-boolean-objects', 'Boolean')}}{{Spec2('ES6')}} 
+ +

Compatibilitat amb navegadors

+ +
{{CompatibilityTable}}
+ +
+ + + + + + + + + + + + + + + + + + + +
CaracterísticaChromeFirefox (Gecko)Internet ExplorerOperaSafari
Suport bàsic{{CompatVersionUnknown}}{{CompatVersionUnknown}}{{CompatIE("6.0")}}{{CompatVersionUnknown}}{{CompatVersionUnknown}}
+
+ +
+ + + + + + + + + + + + + + + + + + + + + +
CaracterísticaAndroidChrome for AndroidFirefox Mobile (Gecko)IE MobileOpera MobileSafari Mobile
Suport bàsic{{CompatVersionUnknown}}{{CompatVersionUnknown}}{{CompatVersionUnknown}}{{CompatVersionUnknown}}{{CompatVersionUnknown}}{{CompatVersionUnknown}}
+
+ +

Vegeu també

+ + diff --git a/files/ca/web/javascript/reference/global_objects/boolean/tosource/index.html b/files/ca/web/javascript/reference/global_objects/boolean/tosource/index.html new file mode 100644 index 0000000000..6b6a1b8b2b --- /dev/null +++ b/files/ca/web/javascript/reference/global_objects/boolean/tosource/index.html @@ -0,0 +1,98 @@ +--- +title: Boolean.prototype.toSource() +slug: Web/JavaScript/Referencia/Objectes_globals/Boolean/toSource +translation_of: Web/JavaScript/Reference/Global_Objects/Boolean/toSource +--- +
{{JSRef("Objectes_standard", "Boolean")}} {{non-standard_header}}
+ +

Resum

+ +

El mètode toSource() retorna una cadena de caràcters que representa el codi font de l'objecte.

+ +

Sintaxi

+ +
booleanObj.toSource()
+Boolean.toSource()
+ +

Paràmetres

+ +

Cap.

+ +

Descripció

+ +

El mètode toSource retorna els valors següents:

+ + + +

Aquest mètode normalment és utilitzat internament per JavaScript i no explícitament al codi.

+ +

Especificacions

+ +

No forma part de cap standard. Implementat a JavaScript 1.3.

+ +

Compatibilitat amb navegadors

+ +
{{CompatibilityTable}}
+ +
+ + + + + + + + + + + + + + + + + + + +
CaracterísticaChromeFirefox (Gecko)Internet ExplorerOperaSafari
Suport bàsic{{CompatUnknown}}{{CompatVersionUnknown}}{{CompatUnknown}}{{CompatUnknown}}{{CompatUnknown}}
+
+ +
+ + + + + + + + + + + + + + + + + + + + + +
CaracterísticaAndroidChrome for AndroidFirefox Mobile (Gecko)IE MobileOpera MobileSafari Mobile
Suport bàsic{{CompatUnknown}}{{CompatUnknown}}{{CompatVersionUnknown}}{{CompatUnknown}}{{CompatUnknown}}{{CompatUnknown}}
+
+ +

Vegeu també

+ + diff --git a/files/ca/web/javascript/reference/global_objects/boolean/tostring/index.html b/files/ca/web/javascript/reference/global_objects/boolean/tostring/index.html new file mode 100644 index 0000000000..90da6cba3a --- /dev/null +++ b/files/ca/web/javascript/reference/global_objects/boolean/tostring/index.html @@ -0,0 +1,121 @@ +--- +title: Boolean.prototype.toString() +slug: Web/JavaScript/Referencia/Objectes_globals/Boolean/toString +translation_of: Web/JavaScript/Reference/Global_Objects/Boolean/toString +--- +
{{JSRef("Global_Objects", "Boolean")}}
+ +

Resum

+ +

El mètode toString() retorna una cadena de caràcters que representa l'objecte Boolean.

+ +

Sintaxi

+ +
bool.toString()
+ +

Paràmetres

+ +

Cap.

+ +

Descripció

+ +

L'objecte {{jsxref("Objectes_standard/Boolean", "Boolean")}} sobreescriu el mètode toString de l'objecte {{jsxref("Objectes_standard/Object", "Object")}}; no hereta {{jsxref("Object.prototype.toString()")}}. Per a objectes de tipus Boolean, el mètode toString retorna una cadena de caràcters que representa l'objecte.

+ +

JavaScript crida el mètode toString de manera automàtica quan aquest ha de ser representat mitjançant text o bé quan un {{jsxref("Objectes_standard/Boolean", "Boolean")}} és referenciat en una concatenació de cadenes de caràcters.

+ +

Per a objectes i valors de tipus {{jsxref("Objectes_standard/Boolean", "Boolean")}}, el mètode toString incorporat retorna la cadena de caràcters "true" o bé "false", depenent del valor de l'objecte booleà.

+ +

Exemples

+ +

Exemple: Utilitzar toString

+ +

Al codi següent flag.toString() retorna "true":

+ +
var flag = new Boolean(true);
+var myVar = flag.toString();
+
+ +

Especificacions

+ + + + + + + + + + + + + + + + + + + + + + + + +
EspecificacióEstatComentaris
ECMAScript 1a Edició. Implementat a JavaScript 1.1StandardDefinició inicial.
{{SpecName('ES5.1', '#sec-15.6.4.2', 'Boolean.prototype.toString')}}{{Spec2('ES5.1')}} 
{{SpecName('ES6', '#sec-boolean.prototype.tostring', 'Boolean.prototype.toString')}}{{Spec2('ES6')}} 
+ +

Compatibilitat amb navegadors

+ +
{{CompatibilityTable}}
+ +
+ + + + + + + + + + + + + + + + + + + +
CaracterísticaChromeFirefox (Gecko)Internet ExplorerOperaSafari
Suport bàsic{{CompatVersionUnknown}}{{CompatVersionUnknown}}{{CompatVersionUnknown}}{{CompatVersionUnknown}}{{CompatVersionUnknown}}
+
+ +
+ + + + + + + + + + + + + + + + + + + + + +
CaracterísticaAndroidChrome for AndroidFirefox Mobile (Gecko)IE MobileOpera MobileSafari Mobile
Suport bàsic{{CompatVersionUnknown}}{{CompatVersionUnknown}}{{CompatVersionUnknown}}{{CompatVersionUnknown}}{{CompatVersionUnknown}}{{CompatVersionUnknown}}
+
+ +

Vegeu també

+ + diff --git a/files/ca/web/javascript/reference/global_objects/boolean/valueof/index.html b/files/ca/web/javascript/reference/global_objects/boolean/valueof/index.html new file mode 100644 index 0000000000..f99fd3c6c0 --- /dev/null +++ b/files/ca/web/javascript/reference/global_objects/boolean/valueof/index.html @@ -0,0 +1,117 @@ +--- +title: Boolean.prototype.valueOf() +slug: Web/JavaScript/Referencia/Objectes_globals/Boolean/valueOf +translation_of: Web/JavaScript/Reference/Global_Objects/Boolean/valueOf +--- +
{{JSRef("Global_Objects", "Boolean")}}
+ +

Resum

+ +

El mètode valueOf() retorna el valor primitiu d'un objecte {{jsxref("Objectes_standard/Boolean", "Boolean")}}.

+ +

Sintaxi

+ +
bool.valueOf()
+ +

Paràmetres

+ +

Cap.

+ +

Descripció

+ +

El mètode valueOf pertanyent a {{jsxref("Objectes_standard/Boolean", "Boolean")}} retorna el valor primitiu d'un objecte o literal {{jsxref("Objectes_standard/Boolean", "Boolean")}} com a tipus de dada Boolean.

+ +

Aquest mètode normalment és utilitzat internament per JavaScript i no explícitament als scripts.

+ +

Exemples

+ +

Exemple: Utilitzar valueOf

+ +
x = new Boolean();
+myVar = x.valueOf(); // assigna false a myVar
+
+ +

Especificacions

+ + + + + + + + + + + + + + + + + + + + + + + + +
EspecificacióEstatComentaris
ECMAScript 1a Edició.StandardDefinició inicial. Implementat a JavaScript 1.1.
{{SpecName('ES5.1', '#sec-15.6.4.3', 'Boolean.prototype.valueOf')}}{{Spec2('ES5.1')}} 
{{SpecName('ES6', '#sec-boolean.prototype.valueof', 'Boolean.prototype.valueOf')}}{{Spec2('ES6')}} 
+ +

Compatibilitat amb navegadors

+ +
{{CompatibilityTable}}
+ +
+ + + + + + + + + + + + + + + + + + + +
CaracterísticaChromeFirefox (Gecko)Internet ExplorerOperaSafari
Suport bàsic{{CompatVersionUnknown}}{{CompatVersionUnknown}}{{CompatVersionUnknown}}{{CompatVersionUnknown}}{{CompatVersionUnknown}}
+
+ +
+ + + + + + + + + + + + + + + + + + + + + +
CaracterísticaAndroidChrome for AndroidFirefox Mobile (Gecko)IE MobileOpera MobileSafari Mobile
Suport bàsic{{CompatVersionUnknown}}{{CompatVersionUnknown}}{{CompatVersionUnknown}}{{CompatVersionUnknown}}{{CompatVersionUnknown}}{{CompatVersionUnknown}}
+
+ +

Vegeu també

+ + 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 ---- -
{{JSRef}}
- -

La propietat DataView.prototype representa el prototip de l'objecte {{jsxref("DataView")}}.

- -
{{js_property_attributes(0,0,0)}}
- -

Descripció

- -

Les instàncies DataView hereten de DataView.prototype. Com passa amb tots els constructors, podeu canviar l'objecte prototip del constructor per produir canvis a totes les instàncies DataView.

- -

Propietats

- -
-
DataView.prototype.constructor
-
Especifica la funció que crea un prototip de l'objecte. El valor inicial és el constructor integrat estàndard DataView.
-
{{jsxref("DataView.prototype.buffer")}} {{readonlyInline}}
-
L'{{jsxref("ArrayBuffer")}} referenciat per aquesta vista. Fixat en el temps de construcció i per tant és només de lectura.
-
{{jsxref("DataView.prototype.byteLength")}} {{readonlyInline}}
-
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 només de lectura.
-
{{jsxref("DataView.prototype.byteOffset")}} {{readonlyInline}}
-
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 només de lectura.
-
- -

Mètodes

- -

Lectura

- -
-
{{jsxref("DataView.prototype.getInt8()")}}
-
Obté un nombre sencer (byte) de 8 bits amb signe al byte de posició especificat des de l'inici de la vista.
-
{{jsxref("DataView.prototype.getUint8()")}}
-
Obté un nombre sencer sense signe de 8 bits (unsigned byte) al byte de posició especificat des de l'inici de la vista.
-
{{jsxref("DataView.prototype.getInt16()")}}
-
Obté un nombre sencer de 16 bits (short) al byte de posició especificat des de l'inici de la vista.
-
{{jsxref("DataView.prototype.getUint16()")}}
-
Obté un nombre sencer sense signe de 16 bits (unsigned short) al byte de posició especificat des de l'inici de la vista.
-
{{jsxref("DataView.prototype.getInt32()")}}
-
Obté un nombre sencer de 32 bits (long) al byte de posició especificat des de l'inici de la vista.
-
{{jsxref("DataView.prototype.getUint32()")}}
-
Obté un nombre sencer sense signe de 31 bits (unsigned long) al byte de posició especificat des de l'inici de la vista.
-
{{jsxref("DataView.prototype.getFloat32()")}}
-
Obté un nombre en coma flotant amb signe de 32 bits (float) al byte de posició especificat des de l'inici de la vista.
-
{{jsxref("DataView.prototype.getFloat64()")}}
-
Obté un nombre en coma flotant amb signe de 64 bits (double) al byte de posició especificat des de l'inici de la vista.
-
- -

Escritura

- -
-
{{jsxref("DataView.prototype.setInt8()")}}
-
Emmagatzema el valor d'un nombre sencer de 8 bits (byte) al byte de posició especificat des de l'inici de la vista.
-
{{jsxref("DataView.prototype.setUint8()")}}
-
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.
-
{{jsxref("DataView.prototype.setInt16()")}}
-
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.
-
{{jsxref("DataView.prototype.setUint16()")}}
-
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.
-
{{jsxref("DataView.prototype.setInt32()")}}
-
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.
-
{{jsxref("DataView.prototype.setUint32()")}}
-
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.
-
{{jsxref("DataView.prototype.setFloat32()")}}
-
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.
-
{{jsxref("DataView.prototype.setFloat64()")}}
-
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.
-
- -

Especificacions

- - - - - - - - - - - - - - -
EspecificacióEstatComentaris
{{SpecName('ES6', '#sec-dataview.prototype', 'DataView.prototype')}}{{Spec2('ES6')}}Definició inicial.
- -

Compatibilitat amb navegador

- -

{{CompatibilityTable}}

- -
- - - - - - - - - - - - - - - - - - - -
CaracterísticaChromeFirefox (Gecko)Internet ExplorerOperaSafari
Suport bàsic9.0{{ CompatGeckoDesktop("15.0") }}1012.15.1
-
- -
- - - - - - - - - - - - - - - - - - - - - -
CaracterísticaAndroidChrome per AndroidFirefox Mobile (Gecko)IE MobileOpera MobileSafari Mobile
Suport bàsic4.0{{CompatVersionUnknown}}{{CompatGeckoMobile("15")}}{{CompatUnknown}}12.04.2
-
- -

Vegeu també

- - diff --git a/files/ca/web/javascript/reference/global_objects/date/getdate/index.html b/files/ca/web/javascript/reference/global_objects/date/getdate/index.html new file mode 100644 index 0000000000..16808aaae0 --- /dev/null +++ b/files/ca/web/javascript/reference/global_objects/date/getdate/index.html @@ -0,0 +1,119 @@ +--- +title: Date.prototype.getDate() +slug: Web/JavaScript/Referencia/Objectes_globals/Date/getDate +translation_of: Web/JavaScript/Reference/Global_Objects/Date/getDate +--- +
{{JSRef}}
+ +

El mètode getDate() retorna el dia del mes per a la data especificada segons l'hora local.

+ +

Sintaxi

+ +
objecteData.getDate()
+ +

Paràmetres

+ +

Cap.

+ +

Valor retornat

+ +

El valor retornat per getDate() és un nombre sencer entre 1 i 31.

+ +

Exemples

+ +

Utilitzar getDate()

+ +

La segona sentència de l'exemple de sota assigna el valor 25 a la variable dia, basant-se en el valor de l'objecte {{jsxref("Date")}} nadal95.

+ +
var nadal95 = new Date('December 25, 1995 23:15:30');
+var dia = nadal95.getDate();
+
+console.log(dia); // 25
+
+ +

Especificacions

+ + + + + + + + + + + + + + + + + + + + + + + + +
EspecificacióEstatComentaris
{{SpecName('ES6', '#sec-date.prototype.getdate', 'Date.prototype.getDate')}}{{Spec2('ES6')}} 
{{SpecName('ES5.1', '#sec-15.9.5.14', 'Date.prototype.getDate')}}{{Spec2('ES5.1')}} 
{{SpecName('ES1')}}{{Spec2('ES1')}}Definició inicial. Implementat a JavaScript 1.1.
+ +

Compatibilitat amb navegadors

+ +
{{CompatibilityTable}}
+ +
+ + + + + + + + + + + + + + + + + + + +
CaracterísticaChromeFirefox (Gecko)Internet ExplorerOperaSafari
Suport bàsic{{CompatVersionUnknown}}{{CompatVersionUnknown}}{{CompatVersionUnknown}}{{CompatVersionUnknown}}{{CompatVersionUnknown}}
+
+ +
+ + + + + + + + + + + + + + + + + + + + + +
CaracterísticaAndroidChrome for AndroidFirefox Mobile (Gecko)IE MobileOpera MobileSafari Mobile
Suport bàsic{{CompatVersionUnknown}}{{CompatVersionUnknown}}{{CompatVersionUnknown}}{{CompatVersionUnknown}}{{CompatVersionUnknown}}{{CompatVersionUnknown}}
+
+ +

Vegeu també

+ + diff --git a/files/ca/web/javascript/reference/global_objects/date/getday/index.html b/files/ca/web/javascript/reference/global_objects/date/getday/index.html new file mode 100644 index 0000000000..244562c167 --- /dev/null +++ b/files/ca/web/javascript/reference/global_objects/date/getday/index.html @@ -0,0 +1,121 @@ +--- +title: Date.prototype.getDay() +slug: Web/JavaScript/Referencia/Objectes_globals/Date/getDay +translation_of: Web/JavaScript/Reference/Global_Objects/Date/getDay +--- +
{{JSRef("Global_Objects", "Date")}}
+ +

Resum

+ +

El mètode getDay() retorna el dia de la setmana per a la data especificada, en temps local on 0 (zero) representa el Diumenge.

+ +

Sintaxi

+ +
dateObj.getDay()
+ +

Paràmetres

+ +

Cap.

+ +

Retorna

+ +

El valor retornat per getDay() és un nombre sencer que correspon al dia de la setmana tal i com es mostra a continuació: 0 és Diumenge, 1 és Dilluns, 2 és Dimarts, etcètera.

+ +

Exemples

+ +

Exemple: Utilitzar getDay()

+ +

La segona sentència que trobareu a continuació asigna el valor 1 a la variable diaSetmana, basat en el valor de l'objecte {{jsxref("Global_Objects/Date", "Date")}} nadal95, que està inicialitzat amb la data d 25 de Desembre de 1995, és un Dilluns.

+ +
var nadal95 = new Date('December 25, 1995 23:15:30');
+var diaSetmana = nadal95.getDay();
+
+console.log(diaSetmana); // 1
+
+ +

Especificacions

+ + + + + + + + + + + + + + + + + + + + + + + + +
EspecificacióEstatComentaris
ECMAScript 1a Edició.StandardDefinició inicial. Implementat a JavaScript 1.0.
{{SpecName('ES5.1', '#sec-15.9.5.16', 'Date.prototype.getDay')}}{{Spec2('ES5.1')}} 
{{SpecName('ES6', '#sec-date.prototype.getday', 'Date.prototype.getDay')}}{{Spec2('ES6')}} 
+ +

Compatibilitat amb navegadors

+ +
{{CompatibilityTable}}
+ +
+ + + + + + + + + + + + + + + + + + + +
CaracterísticaChromeFirefox (Gecko)Internet ExplorerOperaSafari
Suport bàsic{{CompatVersionUnknown}}{{CompatVersionUnknown}}{{CompatVersionUnknown}}{{CompatVersionUnknown}}{{CompatVersionUnknown}}
+
+ +
+ + + + + + + + + + + + + + + + + + + + + +
CaracterísticaAndroidChrome for AndroidFirefox Mobile (Gecko)IE MobileOpera MobileSafari Mobile
Suport bàsic{{CompatVersionUnknown}}{{CompatVersionUnknown}}{{CompatVersionUnknown}}{{CompatVersionUnknown}}{{CompatVersionUnknown}}{{CompatVersionUnknown}}
+
+ +

Vegeu també

+ + diff --git a/files/ca/web/javascript/reference/global_objects/date/getfullyear/index.html b/files/ca/web/javascript/reference/global_objects/date/getfullyear/index.html new file mode 100644 index 0000000000..94f14f4332 --- /dev/null +++ b/files/ca/web/javascript/reference/global_objects/date/getfullyear/index.html @@ -0,0 +1,121 @@ +--- +title: Date.prototype.getFullYear() +slug: Web/JavaScript/Referencia/Objectes_globals/Date/getFullYear +translation_of: Web/JavaScript/Reference/Global_Objects/Date/getFullYear +--- +
{{JSRef("Global_Objects", "Date")}}
+ +

Resum

+ +

El mètode getFullYear() retorna l'any de la data especificada, en temps local.

+ +

Utilitzeu aquest mètode en comptes de {{jsxref("Date.prototype.getYear()", "getYear()")}}.

+ +

Sintaxi

+ +
dateObj.getFullYear()
+ +

Paràmetres

+ +

Cap.

+ +

Retorna

+ +

El valor retornat per getFullYear() és un nombre absolut. Per a dates entre els anys 1000 i 9999, getFullYear() retorna un nombre de 4 dígits (1995, per exemple). Utilitzeu aquesta funció per a assegurar-vos d'obtindre un any compatible amb l'efecte 2000.

+ +

Exemples

+ +

Exemple: Utilitzar getFullYear()

+ +

L'exemple següent assigna el valor de 4 dígits de l'any actual a la variable any.

+ +
var avui = new Date();
+var any = avui.getFullYear();
+
+ +

Especificacions

+ + + + + + + + + + + + + + + + + + + + + + + + +
EspecificacióEstatComentaris
ECMAScript 1a Edició.StandardDefinició inicial. Implementat a JavaScript 1.3.
{{SpecName('ES5.1', '#sec-15.9.5.10', 'Date.prototype.getFullYear')}}{{Spec2('ES5.1')}} 
{{SpecName('ES6', '#sec-date.prototype.getfullyear', 'Date.prototype.getFullYear')}}{{Spec2('ES6')}} 
+ +

Compatibilitat amb navegadors

+ +
{{CompatibilityTable}}
+ +
+ + + + + + + + + + + + + + + + + + + +
CaracterísticaChromeFirefox (Gecko)Internet ExplorerOperaSafari
Suport bàsic{{CompatVersionUnknown}}{{CompatVersionUnknown}}{{CompatVersionUnknown}}{{CompatVersionUnknown}}{{CompatVersionUnknown}}
+
+ +
+ + + + + + + + + + + + + + + + + + + + + +
CaracterísticaAndroidChrome for AndroidFirefox Mobile (Gecko)IE MobileOpera MobileSafari Mobile
Suport bàsic{{CompatVersionUnknown}}{{CompatVersionUnknown}}{{CompatVersionUnknown}}{{CompatVersionUnknown}}{{CompatVersionUnknown}}{{CompatVersionUnknown}}
+
+ +

Vegeu també

+ + diff --git a/files/ca/web/javascript/reference/global_objects/date/gethours/index.html b/files/ca/web/javascript/reference/global_objects/date/gethours/index.html new file mode 100644 index 0000000000..3848e96339 --- /dev/null +++ b/files/ca/web/javascript/reference/global_objects/date/gethours/index.html @@ -0,0 +1,120 @@ +--- +title: Date.prototype.getHours() +slug: Web/JavaScript/Referencia/Objectes_globals/Date/getHours +translation_of: Web/JavaScript/Reference/Global_Objects/Date/getHours +--- +
{{JSRef("Global_Objects", "Date")}}
+ +

Resum

+ +

El mètode getHours() retorna l'hora per a la data especificada, en temps local.

+ +

Sintaxi

+ +
dateObj.getHours()
+ +

Paràmetres

+ +

Cap.

+ +

Retorna

+ +

El valor retornat per getHours() és un nombre sencer entre 0 i 23.

+ +

Exemples

+ +

Exemple: Utilitzar getHours()

+ +

La segona sentència que trobareu a continuació assigna el valor 23 a la variable hora, basant-se en l'objecte {{jsxref("Global_Objects/Date", "Date")}} nadal95.

+ +
var nadal95 = new Date('December 25, 1995 23:15:30');
+var hora = nadal95.getHours();
+
+console.log(hora); // 23
+
+ +

Especificacions

+ + + + + + + + + + + + + + + + + + + + + + + + +
EspecificacióEstatComentaris
ECMAScript 1a Edició.StandardDefinició inicial. Implementat a JavaScript 1.0.
{{SpecName('ES5.1', '#sec-15.9.5.18', 'Date.prototype.getHours')}}{{Spec2('ES5.1')}} 
{{SpecName('ES6', '#sec-date.prototype.gethours', 'Date.prototype.getHours')}}{{Spec2('ES6')}} 
+ +

Compatibilitat amb navegadors

+ +
{{CompatibilityTable}}
+ +
+ + + + + + + + + + + + + + + + + + + +
CaracterísticaChromeFirefox (Gecko)Internet ExplorerOperaSafari
Suport bàsic{{CompatVersionUnknown}}{{CompatVersionUnknown}}{{CompatVersionUnknown}}{{CompatVersionUnknown}}{{CompatVersionUnknown}}
+
+ +
+ + + + + + + + + + + + + + + + + + + + + +
CaracterísticaAndroidChrome for AndroidFirefox Mobile (Gecko)IE MobileOpera MobileSafari Mobile
Suport bàsic{{CompatVersionUnknown}}{{CompatVersionUnknown}}{{CompatVersionUnknown}}{{CompatVersionUnknown}}{{CompatVersionUnknown}}{{CompatVersionUnknown}}
+
+ +

Vegeu també

+ + diff --git a/files/ca/web/javascript/reference/global_objects/date/getmilliseconds/index.html b/files/ca/web/javascript/reference/global_objects/date/getmilliseconds/index.html new file mode 100644 index 0000000000..d438cf8cad --- /dev/null +++ b/files/ca/web/javascript/reference/global_objects/date/getmilliseconds/index.html @@ -0,0 +1,118 @@ +--- +title: Date.prototype.getMilliseconds() +slug: Web/JavaScript/Referencia/Objectes_globals/Date/getMilliseconds +translation_of: Web/JavaScript/Reference/Global_Objects/Date/getMilliseconds +--- +
{{JSRef("Global_Objects", "Date")}}
+ +

Resum

+ +

El mètode getMilliseconds() retorna els milisegons de la data especificada d'acord a l'hora local.

+ +

Sintaxi

+ +
dateObj.getMilliseconds()
+ +

Paràmetres

+ +

Cap.

+ +

Retorna

+ +

El valor retornat per getMilliseconds() és un nombre entre 0 i 999.

+ +

Exemples

+ +

Exemple: Utilitzar getMilliseconds()

+ +

L'exemple següent assigna la part de milisegons de l'hora actual a la variable milisegons:

+ +
var avui = new Date();
+var milisegonds = avui.getMilliseconds();
+
+ +

Especificacions

+ + + + + + + + + + + + + + + + + + + + + + + + +
EspecificacióEstatComentaris
ECMAScript 1a Edició.StandardDefinició inicial. Implementat a JavaScript 1.3.
{{SpecName('ES5.1', '#sec-15.9.5.24', 'Date.prototype.getMilliseconds')}}{{Spec2('ES5.1')}} 
{{SpecName('ES6', '#sec-date.prototype.getmilliseconds', 'Date.prototype.getMilliseconds')}}{{Spec2('ES6')}} 
+ +

Compatibilitat amb navegadors

+ +
{{CompatibilityTable}}
+ +
+ + + + + + + + + + + + + + + + + + + +
CaracterísticaChromeFirefox (Gecko)Internet ExplorerOperaSafari
Suport bàsic{{CompatVersionUnknown}}{{CompatVersionUnknown}}{{CompatVersionUnknown}}{{CompatVersionUnknown}}{{CompatVersionUnknown}}
+
+ +
+ + + + + + + + + + + + + + + + + + + + + +
CaracterísticaAndroidChrome for AndroidFirefox Mobile (Gecko)IE MobileOpera MobileSafari Mobile
Suport bàsic{{CompatVersionUnknown}}{{CompatVersionUnknown}}{{CompatVersionUnknown}}{{CompatVersionUnknown}}{{CompatVersionUnknown}}{{CompatVersionUnknown}}
+
+ +

Vegeu també

+ + diff --git a/files/ca/web/javascript/reference/global_objects/date/getminutes/index.html b/files/ca/web/javascript/reference/global_objects/date/getminutes/index.html new file mode 100644 index 0000000000..3ae466d56d --- /dev/null +++ b/files/ca/web/javascript/reference/global_objects/date/getminutes/index.html @@ -0,0 +1,120 @@ +--- +title: Date.prototype.getMinutes() +slug: Web/JavaScript/Referencia/Objectes_globals/Date/getMinutes +translation_of: Web/JavaScript/Reference/Global_Objects/Date/getMinutes +--- +
{{JSRef("Global_Objects", "Date")}}
+ +

Resum

+ +

El mètode getMinutes() retorna els minuts de la data especificada segons el temps local.

+ +

Sintaxi

+ +
dateObj.getMinutes()
+ +

Paràmetres

+ +

Cap.

+ +

Retorna

+ +

El valor retorna per getMinutes() és un nombre sencer entre 0 i 59.

+ +

Exemples

+ +

Exemple: Utilitzar getMinutes()

+ +

La segona sentència de  sota assigna el valor 15 a la variable minuts, prenent el valor de l'objecte nadal95 de tipus {{jsxref("Global_Objects/Date", "Date")}}.

+ +
var nadal95 = new Date('December 25, 1995 23:15:30');
+var minuts = nadal95.getMinutes();
+
+console.log(minuts); // 15
+
+ +

Especificacions

+ + + + + + + + + + + + + + + + + + + + + + + + +
EspecificacióEstatComentaris
ECMAScript 1a Edició.StandardDefinició inicial. Implementat a JavaScript 1.0.
{{SpecName('ES5.1', '#sec-15.9.5.20', 'Date.prototype.getMinutes')}}{{Spec2('ES5.1')}} 
{{SpecName('ES6', '#sec-date.prototype.getminutes', 'Date.prototype.getMinutes')}}{{Spec2('ES6')}} 
+ +

Compatibilitat amb navegadors

+ +
{{CompatibilityTable}}
+ +
+ + + + + + + + + + + + + + + + + + + +
CaracterísticaChromeFirefox (Gecko)Internet ExplorerOperaSafari
Suport bàsic{{CompatVersionUnknown}}{{CompatVersionUnknown}}{{CompatVersionUnknown}}{{CompatVersionUnknown}}{{CompatVersionUnknown}}
+
+ +
+ + + + + + + + + + + + + + + + + + + + + +
CaracterísticaAndroidChrome for AndroidFirefox Mobile (Gecko)IE MobileOpera MobileSafari Mobile
Suport bàsic{{CompatVersionUnknown}}{{CompatVersionUnknown}}{{CompatVersionUnknown}}{{CompatVersionUnknown}}{{CompatVersionUnknown}}{{CompatVersionUnknown}}
+
+ +

Vegeu també

+ + diff --git a/files/ca/web/javascript/reference/global_objects/date/getmonth/index.html b/files/ca/web/javascript/reference/global_objects/date/getmonth/index.html new file mode 100644 index 0000000000..2631ebef9a --- /dev/null +++ b/files/ca/web/javascript/reference/global_objects/date/getmonth/index.html @@ -0,0 +1,120 @@ +--- +title: Date.prototype.getMonth() +slug: Web/JavaScript/Referencia/Objectes_globals/Date/getMonth +translation_of: Web/JavaScript/Reference/Global_Objects/Date/getMonth +--- +
{{JSRef("Global_Objects", "Date")}}
+ +

Resum

+ +

El mètode getMonth() retorna el mes de la data especificada d'acord al temps local, representat per un nombre a partir de zero (on zero indica el primer mes de l'any).

+ +

Sintaxi

+ +
dateObj.getMonth()
+ +

Paràmetres

+ +

Cap.

+ +

Retorna

+ +

El valor retornat per getMonth() és un nombre sencer entre 0 i 11. 0 correspon a gener, 1 a febrer, etcètera.

+ +

Exemples

+ +

Exemple: Utilitzar getMonth()

+ +

La segona sentència de sota assigna el valor 11 a la variable mes, basada en el valor de l'objecte nadal95 de tipus {{jsxref("Global_Objects/Date", "Date")}}.

+ +
var nadal95 = new Date('December 25, 1995 23:15:30');
+var mes = nadal95.getMonth();
+
+console.log(mes); // 11
+
+ +

Especificacions

+ + + + + + + + + + + + + + + + + + + + + + + + +
EspecificacióEstatComentaris
ECMAScript 1a Edició.StandardDefinició inicial. Implementat a JavaScript 1.0.
{{SpecName('ES5.1', '#sec-15.9.5.12', 'Date.prototype.getMonth')}}{{Spec2('ES5.1')}} 
{{SpecName('ES6', '#sec-date.prototype.getmonth', 'Date.prototype.getMonth')}}{{Spec2('ES6')}} 
+ +

Compatibilitat amb navegadors

+ +
{{CompatibilityTable}}
+ +
+ + + + + + + + + + + + + + + + + + + +
CaracterísticaChromeFirefox (Gecko)Internet ExplorerOperaSafari
Suport bàsic{{CompatVersionUnknown}}{{CompatVersionUnknown}}{{CompatVersionUnknown}}{{CompatVersionUnknown}}{{CompatVersionUnknown}}
+
+ +
+ + + + + + + + + + + + + + + + + + + + + +
CaracterísticaAndroidChrome for AndroidFirefox Mobile (Gecko)IE MobileOpera MobileSafari Mobile
Suport bàsic{{CompatVersionUnknown}}{{CompatVersionUnknown}}{{CompatVersionUnknown}}{{CompatVersionUnknown}}{{CompatVersionUnknown}}{{CompatVersionUnknown}}
+
+ +

Vegeu també

+ + diff --git a/files/ca/web/javascript/reference/global_objects/date/getseconds/index.html b/files/ca/web/javascript/reference/global_objects/date/getseconds/index.html new file mode 100644 index 0000000000..790c62e3e9 --- /dev/null +++ b/files/ca/web/javascript/reference/global_objects/date/getseconds/index.html @@ -0,0 +1,120 @@ +--- +title: Date.prototype.getSeconds() +slug: Web/JavaScript/Referencia/Objectes_globals/Date/getSeconds +translation_of: Web/JavaScript/Reference/Global_Objects/Date/getSeconds +--- +
{{JSRef("Global_Objects", "Date")}}
+ +

Resum

+ +

El mètode getSeconds() retorna els segons de la data especficada d'acord al temps local.

+ +

Sintaxi

+ +
dateObj.getSeconds()
+ +

Paràmetres

+ +

Cap.

+ +

Retorna

+ +

El valor retornat per getSeconds() és un sencer entre 0 i 59.

+ +

Exemples

+ +

Exemple: Utilitzar getSeconds()

+ +

La segona sentència de sota assigna el valor 30 a la variable segons, basat en el valor de l'objecte nadal95, de tipus {{jsxref("Global_Objects/Date", "Date")}}.

+ +
var nadal95 = new Date('December 25, 1995 23:15:30');
+var segons = nadal95.getSeconds();
+
+console.log(segons); // 30
+
+ +

Especificacions

+ + + + + + + + + + + + + + + + + + + + + + + + +
EspecificacióEstatComentaris
ECMAScript 1a Edició.StandardDefinició inicial. Implementat a JavaScript 1.0.
{{SpecName('ES5.1', '#sec-15.9.5.22', 'Date.prototype.getSeconds')}}{{Spec2('ES5.1')}} 
{{SpecName('ES6', '#sec-date.prototype.getseconds', 'Date.prototype.getSeconds')}}{{Spec2('ES6')}} 
+ +

Compatibilitat amb navegadors

+ +
{{CompatibilityTable}}
+ +
+ + + + + + + + + + + + + + + + + + + +
CaracterísticaChromeFirefox (Gecko)Internet ExplorerOperaSafari
Suport bàsic{{CompatVersionUnknown}}{{CompatVersionUnknown}}{{CompatVersionUnknown}}{{CompatVersionUnknown}}{{CompatVersionUnknown}}
+
+ +
+ + + + + + + + + + + + + + + + + + + + + +
CaracterísticaAndroidChrome for AndroidFirefox Mobile (Gecko)IE MobileOpera MobileSafari Mobile
Suport bàsic{{CompatVersionUnknown}}{{CompatVersionUnknown}}{{CompatVersionUnknown}}{{CompatVersionUnknown}}{{CompatVersionUnknown}}{{CompatVersionUnknown}}
+
+ +

Vegeu també

+ + diff --git a/files/ca/web/javascript/reference/global_objects/date/gettime/index.html b/files/ca/web/javascript/reference/global_objects/date/gettime/index.html new file mode 100644 index 0000000000..20c45f31c5 --- /dev/null +++ b/files/ca/web/javascript/reference/global_objects/date/gettime/index.html @@ -0,0 +1,135 @@ +--- +title: Date.prototype.getTime() +slug: Web/JavaScript/Referencia/Objectes_globals/Date/getTime +translation_of: Web/JavaScript/Reference/Global_Objects/Date/getTime +--- +
{{JSRef}}
+ +

El mètode getTime() retorna el valor numèric corresponent a l'hora per a la data especificada, d'acord al temps universal.

+ +

Es pot emprar aquest mètode com a ajuda per a proporcionar una data i hora per a un altre objecte de tipus {{jsxref("Global_Objects/Date", "Date")}}. Aquest mètode és funcionalment equivalnet al mètode {{jsxref("Date.valueof", "valueOf()")}}.

+ +

Sintaxi

+ +
dateObj.getTime()
+ +

Paràmetres

+ +

Cap.

+ +

Retorn

+ +

El valor retornat pel mètode getTime() és el nombre de milisegons que han passat des de l'1 de gener de 1970 00:00:00 UTC.

+ +

Exemples

+ +

Utilitzar getTime() per a obtindre dates

+ +

Construïr un objecte date que representi el mateix moment.

+ +
var aniversari = new Date(1994, 12, 10);
+var copia= new Date();
+copia.setTime(aniversari.getTime());
+
+ +

Mesurar el temps d'execució

+ +

Restar dos crides seguides de getTime() en objectes {{jsxref("Date")}} acabats de generar dóne el temps transcorregut entre les dues crides. Això pot ser emprat per a calcular el temps d'execució d'algunes operacions. Vegeu també {{jsxref("Date.now()")}} per a prevenir l'instanciació d'objectes {{jsxref("Date")}} innecesaris.

+ +
var fi, inici;
+
+inici= new Date();
+for (var i = 0; i < 1000; i++) {
+  Math.sqrt(i);
+}
+fi = new Date();
+
+console.log("L'operació ha trigat " + (fi.getTime() - inici.getTime()) + ' ms');
+
+ +

Especificacions

+ + + + + + + + + + + + + + + + + + + + + + + + +
EspecificacióEstatComentaris
ECMAScript 1a Edició.StandardDefinició inicial. Implementat a JavaScript 1.0.
{{SpecName('ES5.1', '#sec-15.9.5.9', 'Date.prototype.getTime')}}{{Spec2('ES5.1')}} 
{{SpecName('ES6', '#sec-date.prototype.gettime', 'Date.prototype.getTime')}}{{Spec2('ES6')}} 
+ +

Compatibilitat amb navegadors

+ +
{{CompatibilityTable}}
+ +
+ + + + + + + + + + + + + + + + + + + +
CaracterísticaChromeFirefox (Gecko)Internet ExplorerOperaSafari
Suport bàsic{{CompatVersionUnknown}}{{CompatVersionUnknown}}{{CompatVersionUnknown}}{{CompatVersionUnknown}}{{CompatVersionUnknown}}
+
+ +
+ + + + + + + + + + + + + + + + + + + + + +
CaracterísticaAndroidChrome for AndroidFirefox Mobile (Gecko)IE MobileOpera MobileSafari Mobile
Suport bàsic{{CompatVersionUnknown}}{{CompatVersionUnknown}}{{CompatVersionUnknown}}{{CompatVersionUnknown}}{{CompatVersionUnknown}}{{CompatVersionUnknown}}
+
+ +

Vegeu també

+ + diff --git a/files/ca/web/javascript/reference/global_objects/date/gettimezoneoffset/index.html b/files/ca/web/javascript/reference/global_objects/date/gettimezoneoffset/index.html new file mode 100644 index 0000000000..8af4d6e9e8 --- /dev/null +++ b/files/ca/web/javascript/reference/global_objects/date/gettimezoneoffset/index.html @@ -0,0 +1,109 @@ +--- +title: Date.prototype.getTimezoneOffset() +slug: Web/JavaScript/Referencia/Objectes_globals/Date/getTimezoneOffset +translation_of: Web/JavaScript/Reference/Global_Objects/Date/getTimezoneOffset +--- +
{{JSRef("Global_Objects", "Date")}}
+ +

Resum

+ +

El mètode getTimezoneOffset() retorna la desviació de la zona horària a l'hora UTC, en minuts, per a la localizació en ús.

+ +

Sintaxi

+ +
dateObj.getTimezoneOffset()
+ +

Paràmetres

+ +

Cap.

+ +

Retorn

+ +

La desviació de la zona horària és la diferència, en minuts, entre UTC i l'hora local. Això comporta que la desviació serà positiva si l'hora local està per darrere de la UTC i negativa si està endevant. Per exemple, si la vostra zona horària és UTC+10 (Australian Eastern Standard Time), el mètode retornarà -600. L'horari d'estalvi d'energia (d'estiu) fa que aquest valor no sigui una constant, per a qualsevol localització.

+ +

Exemples

+ +

Exemple: Utilitzar getTimezoneOffset()

+ +
var x = new Date();
+var currentTimeZoneOffsetInHours = x.getTimezoneOffset() / 60;
+
+ +

Especificacions

+ + + + + + + + + + + + + + + + + + + + + + + + +
EspecificacióEstatComentaris
ECMAScript 1a Edició.StandardDefinició inicial. Implementat a JavaScript 1.0.
{{SpecName('ES5.1', '#sec-15.9.5.26', 'Date.prototype.getTimezoneOffset')}}{{Spec2('ES5.1')}} 
{{SpecName('ES6', '#sec-date.prototype.gettimezoneoffset', 'Date.prototype.getTimezoneOffset')}}{{Spec2('ES6')}} 
+ +

Compatibilitat amb navegadors

+ +
{{CompatibilityTable}}
+ +
+ + + + + + + + + + + + + + + + + + + +
CaracterísticaChromeFirefox (Gecko)Internet ExplorerOperaSafari
Suport bàsic{{CompatVersionUnknown}}{{CompatVersionUnknown}}{{CompatVersionUnknown}}{{CompatVersionUnknown}}{{CompatVersionUnknown}}
+
+ +
+ + + + + + + + + + + + + + + + + + + + + +
CaracterísticaAndroidChrome for AndroidFirefox Mobile (Gecko)IE MobileOpera MobileSafari Mobile
Suport bàsic{{CompatVersionUnknown}}{{CompatVersionUnknown}}{{CompatVersionUnknown}}{{CompatVersionUnknown}}{{CompatVersionUnknown}}{{CompatVersionUnknown}}
+
diff --git a/files/ca/web/javascript/reference/global_objects/date/getutcdate/index.html b/files/ca/web/javascript/reference/global_objects/date/getutcdate/index.html new file mode 100644 index 0000000000..ee3a8b881f --- /dev/null +++ b/files/ca/web/javascript/reference/global_objects/date/getutcdate/index.html @@ -0,0 +1,119 @@ +--- +title: Date.prototype.getUTCDate() +slug: Web/JavaScript/Referencia/Objectes_globals/Date/getUTCDate +translation_of: Web/JavaScript/Reference/Global_Objects/Date/getUTCDate +--- +
{{JSRef("Global_Objects", "Date")}}
+ +

Resum

+ +

El mètode getUTCDate()retorna el dia del mes per a la data especificada, segons l'hora universal.

+ +

Sintaxi

+ +
dateObj.getUTCDate()
+ +

Paràmetres

+ +

Cap.

+ +

Retorn

+ +

El valor retornat per getUTCDate() és un nombre sencer entre 1 i 31.

+ +

Exemples

+ +

Exemple: Utilitzar getUTCDate()

+ +

L'exemple següent assigna la part del dia de la data actual a la variable dia.

+ +
var avui = new Date();
+var dia = avui.getUTCDate();
+
+ +

Especificacions

+ + + + + + + + + + + + + + + + + + + + + + + + +
EspecificacióEstatComentaris
ECMAScript 1a Edició.StandardDefinició inicial. Implementat a JavaScript 1.3.
{{SpecName('ES5.1', '#sec-15.9.5.15', 'Date.prototype.getUTCDate')}}{{Spec2('ES5.1')}} 
{{SpecName('ES6', '#sec-date.prototype.getutcdate', 'Date.prototype.getUTCDate')}}{{Spec2('ES6')}} 
+ +

Compatibilitat amb navegadors

+ +
{{CompatibilityTable}}
+ +
+ + + + + + + + + + + + + + + + + + + +
CaracterísticaChromeFirefox (Gecko)Internet ExplorerOperaSafari
Suport bàsic{{CompatVersionUnknown}}{{CompatVersionUnknown}}{{CompatVersionUnknown}}{{CompatVersionUnknown}}{{CompatVersionUnknown}}
+
+ +
+ + + + + + + + + + + + + + + + + + + + + +
CaracterísticaAndroidChrome for AndroidFirefox Mobile (Gecko)IE MobileOpera MobileSafari Mobile
Suport bàsic{{CompatVersionUnknown}}{{CompatVersionUnknown}}{{CompatVersionUnknown}}{{CompatVersionUnknown}}{{CompatVersionUnknown}}{{CompatVersionUnknown}}
+
+ +

Vegeu també

+ + diff --git a/files/ca/web/javascript/reference/global_objects/date/getutcday/index.html b/files/ca/web/javascript/reference/global_objects/date/getutcday/index.html new file mode 100644 index 0000000000..b6f992f9a1 --- /dev/null +++ b/files/ca/web/javascript/reference/global_objects/date/getutcday/index.html @@ -0,0 +1,119 @@ +--- +title: Date.prototype.getUTCDay() +slug: Web/JavaScript/Referencia/Objectes_globals/Date/getUTCDay +translation_of: Web/JavaScript/Reference/Global_Objects/Date/getUTCDay +--- +
{{JSRef("Global_Objects", "Date")}}
+ +

Resum

+ +

El mètode getUTCDay() retorna el dia de la setmana de la data especificada segons l'hora universal, on 0 representa Diumenge.

+ +

Sintaxi

+ +
dateObj.getUTCDay()
+ +

Paràmetres

+ +

Cap.

+ +

Retorn

+ +

El valor retornat per  getUTCDay() és un nombre sencer que correspón al dia de la setmana: 0 per a Diumenge, 1 per a dilluns, 2 per a Dimarts, etcètera.

+ +

Exemples

+ +

Exemple: Utilitzar getUTCDay()

+ +

L'exemple següent assigna el dia de la setmana de la data actual a la variable diaSetmana.

+ +
var avui = new Date();
+var diaSetmana = avui.getUTCDay();
+
+ +

Especificacions

+ + + + + + + + + + + + + + + + + + + + + + + + +
EspecificacióEstatComentaris
ECMAScript 1a Edició.StandardDefinició inicial. Implementat a JavaScript 1.3.
{{SpecName('ES5.1', '#sec-15.9.5.17', 'Date.prototype.getUTCDay')}}{{Spec2('ES5.1')}} 
{{SpecName('ES6', '#sec-date.prototype.getutcday', 'Date.prototype.getUTCDay')}}{{Spec2('ES6')}} 
+ +

Compatibilitat amb navegadors

+ +
{{CompatibilityTable}}
+ +
+ + + + + + + + + + + + + + + + + + + +
CaracterísticaChromeFirefox (Gecko)Internet ExplorerOperaSafari
Suport bàsic{{CompatVersionUnknown}}{{CompatVersionUnknown}}{{CompatVersionUnknown}}{{CompatVersionUnknown}}{{CompatVersionUnknown}}
+
+ +
+ + + + + + + + + + + + + + + + + + + + + +
CaracterísticaAndroidChrome for AndroidFirefox Mobile (Gecko)IE MobileOpera MobileSafari Mobile
Suport bàsic{{CompatVersionUnknown}}{{CompatVersionUnknown}}{{CompatVersionUnknown}}{{CompatVersionUnknown}}{{CompatVersionUnknown}}{{CompatVersionUnknown}}
+
+ +

Vegeu també

+ + diff --git a/files/ca/web/javascript/reference/global_objects/date/getutcfullyear/index.html b/files/ca/web/javascript/reference/global_objects/date/getutcfullyear/index.html new file mode 100644 index 0000000000..3ca1526e28 --- /dev/null +++ b/files/ca/web/javascript/reference/global_objects/date/getutcfullyear/index.html @@ -0,0 +1,118 @@ +--- +title: Date.prototype.getUTCFullYear() +slug: Web/JavaScript/Referencia/Objectes_globals/Date/getUTCFullYear +translation_of: Web/JavaScript/Reference/Global_Objects/Date/getUTCFullYear +--- +
{{JSRef("Global_Objects", "Date")}}
+ +

Resum

+ +

El mètode getUTCFullYear() retorna l'any de la data especificada, segons el temps universal.

+ +

Sintaxi

+ +
dateObj.getUTCFullYear()
+ +

Paràmetres

+ +

Cap.

+ +

Retorn

+ +

El valor retornat per getUTCFullYear() és un nombre absolut que compleix amb any-2000, per exemple, 1995.

+ +

Exemples

+ +

Exemple: Utilitzar getUTCFullYear()

+ +

L'exemple següent assigna el valor de 4 dígits de l'any actual a la variable any.

+ +
var avui = new Date();
+var any = avui.getUTCFullYear();
+
+ +

Especificacions

+ + + + + + + + + + + + + + + + + + + + + + + + +
EspecificacióEstatComentaris
ECMAScript 1a Edició.StandardDefinició inicial. Implementat a JavaScript 1.3.
{{SpecName('ES5.1', '#sec-15.9.5.11', 'Date.prototype.getUTCFullYear')}}{{Spec2('ES5.1')}} 
{{SpecName('ES6', '#sec-date.prototype.getutcfullyear', 'Date.prototype.getUTCFullYear')}}{{Spec2('ES6')}} 
+ +

Compatibilitat amb navegadors

+ +
{{CompatibilityTable}}
+ +
+ + + + + + + + + + + + + + + + + + + +
CaracterísticaChromeFirefox (Gecko)Internet ExplorerOperaSafari
Suport bàsic{{CompatVersionUnknown}}{{CompatVersionUnknown}}{{CompatVersionUnknown}}{{CompatVersionUnknown}}{{CompatVersionUnknown}}
+
+ +
+ + + + + + + + + + + + + + + + + + + + + +
CaracterísticaAndroidChrome for AndroidFirefox Mobile (Gecko)IE MobileOpera MobileSafari Mobile
Suport bàsic{{CompatVersionUnknown}}{{CompatVersionUnknown}}{{CompatVersionUnknown}}{{CompatVersionUnknown}}{{CompatVersionUnknown}}{{CompatVersionUnknown}}
+
+ +

Vegeu també

+ + diff --git a/files/ca/web/javascript/reference/global_objects/date/getutchours/index.html b/files/ca/web/javascript/reference/global_objects/date/getutchours/index.html new file mode 100644 index 0000000000..f575df92a1 --- /dev/null +++ b/files/ca/web/javascript/reference/global_objects/date/getutchours/index.html @@ -0,0 +1,118 @@ +--- +title: Date.prototype.getUTCHours() +slug: Web/JavaScript/Referencia/Objectes_globals/Date/getUTCHours +translation_of: Web/JavaScript/Reference/Global_Objects/Date/getUTCHours +--- +
{{JSRef("Global_Objects", "Date")}}
+ +

Resum

+ +

El mètode getUTCHours() retorna les hores especificades a la data, d'acord l'hora universal.

+ +

Sintaxi

+ +
dateObj.getUTCHours()
+ +

Paràmetres

+ +

Cap.

+ +

Retorn

+ +

El valor retornat per getUTCHours() és un nombre sencer entre 0 i 23.

+ +

Exemples

+ +

Exemple: Utilitzar getUTCHours()

+ +

L'exemple següent assigna la part de les hores de la data actual a la variable hora.

+ +
var avui = new Date();
+var hora = avui.getUTCHours();
+
+ +

Especificacions

+ + + + + + + + + + + + + + + + + + + + + + + + +
EspecificacióEstatComentaris
ECMAScript 1a Edició.StandardDefinició inicial. Implementat a JavaScript 1.3.
{{SpecName('ES5.1', '#sec-15.9.5.19', 'Date.prototype.getUTCHours')}}{{Spec2('ES5.1')}} 
{{SpecName('ES6', '#sec-date.prototype.getutchours', 'Date.prototype.getUTCHours')}}{{Spec2('ES6')}} 
+ +

Compatibilitat amb navegadors

+ +
{{CompatibilityTable}}
+ +
+ + + + + + + + + + + + + + + + + + + +
CaracterísticaChromeFirefox (Gecko)Internet ExplorerOperaSafari
Suport bàsic{{CompatVersionUnknown}}{{CompatVersionUnknown}}{{CompatVersionUnknown}}{{CompatVersionUnknown}}{{CompatVersionUnknown}}
+
+ +
+ + + + + + + + + + + + + + + + + + + + + +
CaracterísticaAndroidChrome for AndroidFirefox Mobile (Gecko)IE MobileOpera MobileSafari Mobile
Suport bàsic{{CompatVersionUnknown}}{{CompatVersionUnknown}}{{CompatVersionUnknown}}{{CompatVersionUnknown}}{{CompatVersionUnknown}}{{CompatVersionUnknown}}
+
+ +

Vegeu també

+ + diff --git a/files/ca/web/javascript/reference/global_objects/date/getutcmilliseconds/index.html b/files/ca/web/javascript/reference/global_objects/date/getutcmilliseconds/index.html new file mode 100644 index 0000000000..d09ac5bded --- /dev/null +++ b/files/ca/web/javascript/reference/global_objects/date/getutcmilliseconds/index.html @@ -0,0 +1,116 @@ +--- +title: Date.prototype.getUTCMilliseconds() +slug: Web/JavaScript/Referencia/Objectes_globals/Date/getUTCMilliseconds +translation_of: Web/JavaScript/Reference/Global_Objects/Date/getUTCMilliseconds +--- +
{{JSRef}}
+ +

El mètode getUTCMilliseconds() retorna els milisegons de la data especificada, d'acord al temps universal.

+ +

Sintaxi

+ +
objecteData.getUTCMilliseconds()
+ +

Paràmetres

+ +

Cap.

+ +

Valor retornat

+ +

El valor retorna per getUTCMilliseconds() és un nombre sencer entre 0 i 999.

+ +

Exemples

+ +

Utilitzar getUTCMilliseconds()

+ +

L'exemple següent assigna la porció de milisegons del temps actual a la variable milisegons.

+ +
var avui = new Date();
+var milisegons = avui.getUTCMilliseconds();
+
+ +

Especificacions

+ + + + + + + + + + + + + + + + + + + + + + + + +
EspecificacióEstatComentaris
{{SpecName('ES1')}}{{Spec2('ES1')}}Definició inicial. Implementat a JavaScript 1.3.
{{SpecName('ES5.1', '#sec-15.9.5.25', 'Date.prototype.getUTCMilliseconds')}}{{Spec2('ES5.1')}} 
{{SpecName('ES6', '#sec-date.prototype.getutcmilliseconds', 'Date.prototype.getUTCMilliseconds')}}{{Spec2('ES6')}} 
+ +

Compatibilitat amb navegadors

+ +
{{CompatibilityTable}}
+ +
+ + + + + + + + + + + + + + + + + + + +
CaracterísticaChromeFirefox (Gecko)Internet ExplorerOperaSafari
Suport bàsic{{CompatVersionUnknown}}{{CompatVersionUnknown}}{{CompatVersionUnknown}}{{CompatVersionUnknown}}{{CompatVersionUnknown}}
+
+ +
+ + + + + + + + + + + + + + + + + + + + + +
CaracterísticaAndroidChrome for AndroidFirefox Mobile (Gecko)IE MobileOpera MobileSafari Mobile
Suport bàsic{{CompatVersionUnknown}}{{CompatVersionUnknown}}{{CompatVersionUnknown}}{{CompatVersionUnknown}}{{CompatVersionUnknown}}{{CompatVersionUnknown}}
+
+ +

Vegeu també

+ + diff --git a/files/ca/web/javascript/reference/global_objects/date/getutcminutes/index.html b/files/ca/web/javascript/reference/global_objects/date/getutcminutes/index.html new file mode 100644 index 0000000000..e18a13c52f --- /dev/null +++ b/files/ca/web/javascript/reference/global_objects/date/getutcminutes/index.html @@ -0,0 +1,116 @@ +--- +title: Date.prototype.getUTCMinutes() +slug: Web/JavaScript/Referencia/Objectes_globals/Date/getUTCMinutes +translation_of: Web/JavaScript/Reference/Global_Objects/Date/getUTCMinutes +--- +
{{JSRef}}
+ +

El mètode getUTCMinutes() retorna els minuts de la data especificada en temps universal.

+ +

Sintaxi

+ +
objecteData.getUTCMinutes()
+ +

Paràmetres

+ +

Cap.

+ +

Valor a retornar

+ +

El valor retornat per getUTCMinutes() és un nombre sencer entre 0 i 59.

+ +

Exemples

+ +

Utilitzar getUTCMinutes()

+ +

L'exemple següent assigna la part de minuts del temps actual a la variable minuts.

+ +
var avui = new Date();
+var minuts = avui.getUTCMinutes();
+
+ +

Especificacions

+ + + + + + + + + + + + + + + + + + + + + + + + +
EspecificacióEstatComentaris
{{SpecName('ES1')}}{{Spec2('ES1')}}Definició inicial. Implementat a JavaScript 1.3.
{{SpecName('ES5.1', '#sec-15.9.5.21', 'Date.prototype.getUTCMinutes')}}{{Spec2('ES5.1')}} 
{{SpecName('ES6', '#sec-date.prototype.getutcminutes', 'Date.prototype.getUTCMinutes')}}{{Spec2('ES6')}} 
+ +

Compatibilitat amb navegadors

+ +
{{CompatibilityTable}}
+ +
+ + + + + + + + + + + + + + + + + + + +
CaracterísticaChromeFirefox (Gecko)Internet ExplorerOperaSafari
Suport bàsic{{CompatVersionUnknown}}{{CompatVersionUnknown}}{{CompatVersionUnknown}}{{CompatVersionUnknown}}{{CompatVersionUnknown}}
+
+ +
+ + + + + + + + + + + + + + + + + + + + + +
CaracterísticaAndroidChrome for AndroidFirefox Mobile (Gecko)IE MobileOpera MobileSafari Mobile
Suport bàsic{{CompatVersionUnknown}}{{CompatVersionUnknown}}{{CompatVersionUnknown}}{{CompatVersionUnknown}}{{CompatVersionUnknown}}{{CompatVersionUnknown}}
+
+ +

Vegeu també

+ + diff --git a/files/ca/web/javascript/reference/global_objects/date/getutcmonth/index.html b/files/ca/web/javascript/reference/global_objects/date/getutcmonth/index.html new file mode 100644 index 0000000000..48ba78349b --- /dev/null +++ b/files/ca/web/javascript/reference/global_objects/date/getutcmonth/index.html @@ -0,0 +1,116 @@ +--- +title: Date.prototype.getUTCMonth() +slug: Web/JavaScript/Referencia/Objectes_globals/Date/getUTCMonth +translation_of: Web/JavaScript/Reference/Global_Objects/Date/getUTCMonth +--- +
{{JSRef}}
+ +

El mètode getUTCMonth() retorna el mes de la data especificada d'acord al temps universal, com a valor basat en zero (on zero indica el primer mes de l'any.

+ +

Sintaxi

+ +
objecteData.getUTCMonth()
+ +

Paràmetres

+ +

Cap.

+ +

Valor retornat

+ +

El valor retornat per getUTCMonth() és un nombre sencer entre 0 i 11 corresponent al mes. 0 per al gener, 1 per al febrer, 2 per al març, etcètera.

+ +

Exemples

+ +

Utilitzar getUTCMonth()

+ +

L'exemple següent assigna la part de la data actual corresponent al mes a la variable mes.

+ +
var avui = new Date();
+var mes = mes.getUTCMonth();
+
+ +

Especificacions

+ + + + + + + + + + + + + + + + + + + + + + + + +
EspecificacióEstatComentaris
{{SpecName('ES1')}}{{Spec2('ES1')}}Definició inicial. Implementat a JavaScript 1.3.
{{SpecName('ES5.1', '#sec-15.9.5.13', 'Date.prototype.getUTCMonth')}}{{Spec2('ES5.1')}} 
{{SpecName('ES6', '#sec-date.prototype.getutcmonth', 'Date.prototype.getUTCMonth')}}{{Spec2('ES6')}} 
+ +

Compatibilitat amb navegadors

+ +
{{CompatibilityTable}}
+ +
+ + + + + + + + + + + + + + + + + + + +
CaracterísticaChromeFirefox (Gecko)Internet ExplorerOperaSafari
Suport bàsic{{CompatVersionUnknown}}{{CompatVersionUnknown}}{{CompatVersionUnknown}}{{CompatVersionUnknown}}{{CompatVersionUnknown}}
+
+ +
+ + + + + + + + + + + + + + + + + + + + + +
CaracterísticaAndroidChrome for AndroidFirefox Mobile (Gecko)IE MobileOpera MobileSafari Mobile
Suport bàsic{{CompatVersionUnknown}}{{CompatVersionUnknown}}{{CompatVersionUnknown}}{{CompatVersionUnknown}}{{CompatVersionUnknown}}{{CompatVersionUnknown}}
+
+ +

Vegeu també

+ + diff --git a/files/ca/web/javascript/reference/global_objects/date/getutcseconds/index.html b/files/ca/web/javascript/reference/global_objects/date/getutcseconds/index.html new file mode 100644 index 0000000000..1f69ca8199 --- /dev/null +++ b/files/ca/web/javascript/reference/global_objects/date/getutcseconds/index.html @@ -0,0 +1,118 @@ +--- +title: Date.prototype.getUTCSeconds() +slug: Web/JavaScript/Referencia/Objectes_globals/Date/getUTCSeconds +translation_of: Web/JavaScript/Reference/Global_Objects/Date/getUTCSeconds +--- +
{{JSRef("Global_Objects", "Date")}}
+ +

Resum

+ +

El mètode getUTCSeconds() retorna els segons a la data especificada, segons l'hora universal.

+ +

Sintaxi

+ +
dateObj.getUTCSeconds()
+ +

Paràmetres

+ +

Cap.

+ +

Retorna

+ +

El valor retornat per getUTCSeconds() és un nombre sencer entre 0 i 59.

+ +

Exemples

+ +

Exemple: Utilitzar getUTCSeconds()

+ +

L'exemple següent assigna la porció de segons del temps actual a la variable segons.

+ +
var avui = new Date();
+var segons = avui.getUTCSeconds();
+
+ +

Especificacions

+ + + + + + + + + + + + + + + + + + + + + + + + +
EspecificacióEstatComentaris
ECMAScript 1a Edició.StandardDefinició inicial. Implementat a JavaScript 1.3.
{{SpecName('ES5.1', '#sec-15.9.5.23', 'Date.prototype.getUTCSeconds')}}{{Spec2('ES5.1')}} 
{{SpecName('ES6', '#sec-date.prototype.getutcseconds', 'Date.prototype.getUTCSeconds')}}{{Spec2('ES6')}} 
+ +

Compatibilitat amb navegadors

+ +
{{CompatibilityTable}}
+ +
+ + + + + + + + + + + + + + + + + + + +
CaracterísticaChromeFirefox (Gecko)Internet ExplorerOperaSafari
Suport bàsic{{CompatVersionUnknown}}{{CompatVersionUnknown}}{{CompatVersionUnknown}}{{CompatVersionUnknown}}{{CompatVersionUnknown}}
+
+ +
+ + + + + + + + + + + + + + + + + + + + + +
CaracterísticaAndroidChrome for AndroidFirefox Mobile (Gecko)IE MobileOpera MobileSafari Mobile
Suport bàsic{{CompatVersionUnknown}}{{CompatVersionUnknown}}{{CompatVersionUnknown}}{{CompatVersionUnknown}}{{CompatVersionUnknown}}{{CompatVersionUnknown}}
+
+ +

Vegeu també

+ + diff --git a/files/ca/web/javascript/reference/global_objects/date/getyear/index.html b/files/ca/web/javascript/reference/global_objects/date/getyear/index.html new file mode 100644 index 0000000000..8724b2e03b --- /dev/null +++ b/files/ca/web/javascript/reference/global_objects/date/getyear/index.html @@ -0,0 +1,162 @@ +--- +title: Date.prototype.getYear() +slug: Web/JavaScript/Referencia/Objectes_globals/Date/getYear +translation_of: Web/JavaScript/Reference/Global_Objects/Date/getYear +--- +
{{JSRef("Global_Objects", "Date")}} {{deprecated_header}}
+ +

Resum

+ +

El mètode getYear() retorna l'any de la data especificada segons l'hora local. Com que getYear() no retorna anys sencers ("el problema de l'any 2000"), no s'utilitza més i s'ha substituït pel mètode {{jsxref("Date.prototype.getFullYear", "getFullYear()")}}.

+ +

Sintaxi

+ +
dateObj.getYear()
+ +

Paràmetres

+ +

Cap.

+ +

Retorna

+ +

El mètode getYear() retorna l'any menys el valor 1900; és a dir:

+ + + +

Per a tenir en compte anys abans o deprés del 2000 es recomana utilitzar {{jsxref("Date.prototype.getFullYear", "getFullYear()")}} en comptes de getYear() ja que retorna l'any sencer.

+ +

Compatibilitat amb versions anteriors

+ +

Comportament en JavaScript 1.2 i anteriors

+ +

El mètode getYear() retorna o bé un any amb dos dígits o bé un any amb 4 dígits:

+ + + +

Exemples

+ +

Exemple: Anys entre1900 i 1999

+ +

La segona sentència assigna el valor 95 a la variable any.

+ +
var nadal = new Date('December 25, 1995 23:15:00');
+var any = nadal.getYear(); // retorna 95
+
+ +

Exemple: Anys majors que 1999

+ +

La segona sentència assigna el valor 100 a la variable any.

+ +
var nadal = new Date('December 25, 2000 23:15:00');
+var any = Xmas.getYear(); // retorna 100
+
+ +

Exemple: Anys menors que 1900

+ +

La segona sentència assigna el valor -100 a la variable any.

+ +
var nadal = new Date('December 25, 1800 23:15:00');
+var any = nadal.getYear(); // retorna -100
+
+ +

Exemple: Assignar i obtenir un any entre1900 i 1999

+ +

La segona sentència assigna el valor 95 a la variable any, que representa l'any 1995.

+ +
var nadal.setYear(95);
+var any = nadal.getYear(); // retorna 95
+
+ +

Especificacions

+ + + + + + + + + + + + + + + + + + + + + + + + +
EspecificacióEstatComentaris
ECMAScript 1a Edició.StandardDefinició inicial. Implementat a JavaScript 1.3.
{{SpecName('ES5.1', '#sec-B.2.4', 'Date.prototype.getYear')}}{{Spec2('ES5.1')}}Definit a l'annex de compatibilitat (amb caràcter informatiu).
{{SpecName('ES6', '#sec-date.prototype.getyear', 'Date.prototype.getYear')}}{{Spec2('ES6')}}Definit a l'annex de característiques adicionals per a navegadors web (amb caràcter normatiu).
+ +

Compatibilitat amb navegadors

+ +
{{CompatibilityTable}}
+ +
+ + + + + + + + + + + + + + + + + + + +
CaracterísticaChromeFirefox (Gecko)Internet ExplorerOperaSafari
Suport bàsic{{CompatVersionUnknown}}{{CompatVersionUnknown}}{{CompatVersionUnknown}}{{CompatVersionUnknown}}{{CompatVersionUnknown}}
+
+ +
+ + + + + + + + + + + + + + + + + + + + + +
CaracterísticaAndroidChrome for AndroidFirefox Mobile (Gecko)IE MobileOpera MobileSafari Mobile
Suport bàsic{{CompatVersionUnknown}}{{CompatVersionUnknown}}{{CompatVersionUnknown}}{{CompatVersionUnknown}}{{CompatVersionUnknown}}{{CompatVersionUnknown}}
+
+ +

Vegeu també

+ + diff --git a/files/ca/web/javascript/reference/global_objects/date/index.html b/files/ca/web/javascript/reference/global_objects/date/index.html new file mode 100644 index 0000000000..3fb5a9368d --- /dev/null +++ b/files/ca/web/javascript/reference/global_objects/date/index.html @@ -0,0 +1,250 @@ +--- +title: Date +slug: Web/JavaScript/Referencia/Objectes_globals/Date +translation_of: Web/JavaScript/Reference/Global_Objects/Date +--- +
{{JSRef("Global_Objects", "Date")}}
+ +

Resum

+ +

Crea una instància de tipus Date de JavaScript, que representa un únic moment en el temps. Els objectes de tipus Date es basen en un valor de temps que mesura el nombre de milisegons que han passat des de l'u de gener de 1970 UTC.

+ +

Constructor

+ +
new Date();
+new Date(valor);
+new Date(dataString);
+new Date(any, mes[, dia[, hora[, minuts[, segons[, milisegons]]]]]);
+
+ +
+

Nota: Els objectes Date de JavaScript només poden ser instanciats cridant Date com a constructor: Si es crida la funció com una funció normal (és a dir, sense l'operador {{jsxref("Operators/new", "new")}}), aquesta retornarà una string en comptes d'un objecte de tipus Date; al contrari que altres tipus d'objectes JavaScript, els objectes de JavaScript de tipus Date no poden ser representats com a literals.

+
+ +

Paràmetres

+ +
+

Nota: Quan es crida Date com a constructor amb més d'un argument, si els valors són més grans que el seu rang lògic (per exemple, si es passa 13 com a valor pel mes o 70 com a valor de minuts), Date ajusta el valor adjacent. Per exemple, new Date(2013, 13, 1) és equivalent a new Date(2014, 1, 1), ambdós creen un objecte de tipus Date que representa 2014-02-01 (cal destacar que els mesos es comencen a contar des de zero). El mateix s'aplica per a altres valors: new Date(2013, 2, 1, 0, 70) és equivalent a new Date(2013, 2, 1, 1, 10) i ambdós representen 2013-03-01T01:10:00.

+
+ +
+

Nota: Quan es crida Date com a constructor amb més d'un argument, els arguments especificats representen l'hora local. Si es pretèn passar valors UTC, utilitzeu new Date({{jsxref("Date.UTC()", "Date.UTC(...)")}}) amb aquests arguments.

+
+ +
+
valor
+
Nombre sencer que representa el nombre de milisegons des de l'1 de gener de 1970 00:00:00 UTC (Època UNIX).
+
dataString
+
Valor String que representa una data. La String ha d'estar en un format reconegut pel mètode {{jsxref("Date.parse()")}} (Marques de temps RFC 2822 compatibles amb el IETF o bé una versió de la ISO8601).
+
any
+
Valor sencer que representa un any. Els valors des de 0 a 99 representen els anys des de 1900 a 1999. Vegeu l'{{anch("Example:_Two_digit_years_map_to_1900_-_1999", "exemple a continuació")}}.
+
mes
+
Valor sencer que representa un mes, començant per zero com a gener i acabant amb 11 com a desembre.
+
dia
+
Opcional. Valor sencer que representa el dia del mes.
+
hora
+
Opcional. Valor sencer que representa l'hora del dia.
+
minut
+
Opcional. Valor sencer que representa els minuts d'un segment de temps.
+
segon
+
Opcional. Valor sencer que representa els segons d'un segment de temps.
+
milisegons
+
Opcional. Valor sencer que representa els milisegons d'un segment de temps.
+
+ +

Descripció

+ + + +

Propietats

+ +
+
{{jsxref("Date.prototype")}}
+
Permet afegir propietats a l'objecte de JavaScript Date.
+
Date.length
+
El valor de Date.length és 7. Aquest és el nombre de arguments que el constructor accepta.
+
+ +
{{jsOverrides("Function", "properties", "prototype")}}
+ +

Mètodes

+ +
+
{{jsxref("Date.now()")}}
+
Retorna el valor numèric corresponent al temps actual - el nombre de milisegons que han passat des de l'1 de gener de 1970 00:00:00 UTC.
+
{{jsxref("Date.parse()")}}
+
Interpreta un string que representa una data i retorna el nombre de milisegons des de l'1 de gener de 1970 00:00:00 UTC.
+
{{jsxref("Date.UTC()")}}
+
Accepta els mateixos paràmetres que el constructor (és a dir, de 2 a 7) i retorna le nombre de milisegons des de l'1 de gener de 1970 00:00:00 UTC.
+
+ +
{{jsOverrides("Function", "Methods", "now", "parse", "UTC")}}
+ +

Instàncies de JavaScript Date

+ +

Totes les instàncies de Date hereten de {{jsxref("Date.prototype")}}. L'objecte prototipus del constructor Date pot ser modificat per a afectar a totes les instàncies de Date.

+ +

Mètodes de Date.prototype

+ +
{{page('/ca/docs/Web/JavaScript/Reference/Global_Objects/Date/prototype', 'Methods')}}
+ +

Exemples

+ +

Exemple: Vàries formes de crear un objecte de tipus Date

+ +

Els següents exemples mostren diverses maneres de crear dates a JavaScript:

+ +
var today = new Date();
+var birthday = new Date('December 17, 1995 03:24:00');
+var birthday = new Date('1995-12-17T03:24:00');
+var birthday = new Date(1995, 11, 17);
+var birthday = new Date(1995, 11, 17, 3, 24, 0);
+
+ +

Exemple: Dos dígits per representar els anys 1900 a 1999

+ +

Per a crear i obtindre dates entre els anys 0 i 99 es recomana emprar els mètodes {{jsxref("Date.prototype.setFullYear()")}} i {{jsxref("Date.prototype.getFullYear()")}}.

+ +
var date = new Date(98, 1); // Sun Feb 01 1998 00:00:00 GMT+0000 (GMT)
+
+// Deprecated method, 98 maps to 1998 here as well
+date.setYear(98);           // Sun Feb 01 1998 00:00:00 GMT+0000 (GMT)
+
+date.setFullYear(98);       // Sat Feb 01 0098 00:00:00 GMT+0000 (BST)
+
+ +

Exemple: Calcular el temps passat

+ +

Els exemples següents mostren com determinar el temps passat entre dues dates a JavaScript:

+ +
// utilitzant objectes Date
+var start = Date.now();
+
+// L'event a cronometra va aquí:
+doSomethingForALongTime();
+var end = Date.now();
+var elapsed = end - start; // temps transcorregut en milisegons
+
+ +
// utilitzant mètodes que formen part del sistema
+var start = new Date();
+
+// the event to time goes here:
+doSomethingForALongTime();
+var end = new Date();
+var elapsed = end.getTime() - start.getTime(); // temps transcorregut en milisegons
+
+ +
// cronometra una funció i retorna el que retorni
+function printElapsedTime(fTest) {
+  var nStartTime = Date.now(),
+      vReturn = fTest(),
+      nEndTime = Date.now();
+
+  console.log('Temps transcorregut: ' + String(nEndTime - nStartTime) + ' miliseconds');
+  return vReturn;
+}
+
+yourFunctionReturn = printElapsedTime(yourFunction);
+
+ +
+

Nota: En navegadors que suporten la característica de temps en alta resolució de la {{domxref("window.performance", "API d'Alt Rendiment Web", "", 1)}}, {{domxref("Performance.now()")}} pot proporcionar mesures de temps més concises i fiables pel temps transcorregut que {{jsxref("Date.now()")}}.

+
+ +

Especificacions

+ + + + + + + + + + + + + + + + + + + + + + + + +
EspecificacióEstatComentaris
ECMAScript 1a Edició.StandardDefinició inicial. Implementat a JavaScript 1.1.
{{SpecName('ES5.1', '#sec-15.9', 'Date')}}{{Spec2('ES5.1')}} 
{{SpecName('ES6', '#sec-date-objects', 'Date')}}{{Spec2('ES6')}} 
+ +

Compatibilitat amb navegadors

+ +
{{CompatibilityTable}}
+ +
+ + + + + + + + + + + + + + + + + + + +
CaracterísticaChromeFirefox (Gecko)Internet ExplorerOperaSafari
Suport bàsic{{CompatVersionUnknown}}{{CompatVersionUnknown}}{{CompatVersionUnknown}}{{CompatVersionUnknown}}{{CompatVersionUnknown}}
+
+ +
+ + + + + + + + + + + + + + + + + + + + + +
CaracterísticaAndroidChrome for AndroidFirefox Mobile (Gecko)IE MobileOpera MobileSafari Mobile
Suport bàsic{{CompatVersionUnknown}}{{CompatVersionUnknown}}{{CompatVersionUnknown}}{{CompatVersionUnknown}}{{CompatVersionUnknown}}{{CompatVersionUnknown}}
+
+ +

Informes de compatiblitat amb navegadors

+ + + +

Notes específiques de Internet Explorer

+ +

Internet Explorer 8 no suporta el format de dates ISO8601.

diff --git a/files/ca/web/javascript/reference/global_objects/date/now/index.html b/files/ca/web/javascript/reference/global_objects/date/now/index.html new file mode 100644 index 0000000000..c3ef05fa86 --- /dev/null +++ b/files/ca/web/javascript/reference/global_objects/date/now/index.html @@ -0,0 +1,126 @@ +--- +title: Date.now() +slug: Web/JavaScript/Referencia/Objectes_globals/Date/now +translation_of: Web/JavaScript/Reference/Global_Objects/Date/now +--- +
{{JSRef("Global_Objects", "Date")}}
+ +

Resum

+ +

El mètode Date.now() retorna el nombre de milisegons que han passat des de l'1 de gener de 1970 00:00:00 UTC.

+ +

Sintaxi

+ +
var timeInMs = Date.now();
+ +

Paràmetres

+ +

Cap.

+ +

Descripció

+ +

El mètode now() retorna el nombre de method returns el nombre de milisegons que han passat des de l'1 de gener de 1970 00:00:00 UTC fins al moment actual representat en un  {{jsxref("Global_Objects/Number", "Nombre")}}.

+ +

Com que now() és un mètode estàtic de {{jsxref("Global_Objects/Date", "Date")}}, sempre es crida com a Date.now().

+ +

Polyfill

+ +

Aquest mètode va ser estandaritzat a la cinquena edició de l'ECMA-262. Els motors que encara no hagin sigut actualitzats per a suportar aquest mètode poden utilitzar el bocí de codi següent per a paliar l'absència d'aquest mètode:

+ +
if (!Date.now) {
+  Date.now = function now() {
+    return new Date().getTime();
+  };
+}
+
+ +

Especificacions

+ + + + + + + + + + + + + + + + + + + +
EspecificacióEstatComentaris
{{SpecName('ES5.1', '#sec-15.9.4.4', 'Date.now')}}{{Spec2('ES5.1')}}Definició inicial. Implementat a JavaScript 1.5.
{{SpecName('ES6', '#sec-date.now', 'Date.now')}}{{Spec2('ES6')}} 
+ +

Compatibilitat amb navegadors

+ +
{{CompatibilityTable}}
+ +
+ + + + + + + + + + + + + + + + + + + +
CaracterístiquesChromeFirefox (Gecko)Internet ExplorerOperaSafari
Suport bàsic{{CompatChrome("5")}}{{CompatGeckoDesktop("1.9")}}{{CompatIE("9")}}{{CompatOpera("10.50")}}{{CompatSafari("4")}}
+
+ +
+ + + + + + + + + + + + + + + + + + + + + +
CaracterístiquesAndroidChrome for AndroidFirefox Mobile (Gecko)IE MobileOpera MobileSafari Mobile
+ + + + + + +
Suport bàsic
+
{{CompatVersionUnknown}}{{CompatVersionUnknown}}{{CompatVersionUnknown}}{{CompatVersionUnknown}}{{CompatVersionUnknown}}{{CompatVersionUnknown}}
+
+ +

Basat en la  taula de compatibilitat de Kangax.

+ +

Vegeu també

+ + diff --git a/files/ca/web/javascript/reference/global_objects/date/setdate/index.html b/files/ca/web/javascript/reference/global_objects/date/setdate/index.html new file mode 100644 index 0000000000..746de134fe --- /dev/null +++ b/files/ca/web/javascript/reference/global_objects/date/setdate/index.html @@ -0,0 +1,122 @@ +--- +title: Date.prototype.setDate() +slug: Web/JavaScript/Referencia/Objectes_globals/Date/setDate +translation_of: Web/JavaScript/Reference/Global_Objects/Date/setDate +--- +
{{JSRef}}
+ +

El mètode setDate() assigna el dia de l'objecte {{jsxref("Date")}} relatiu al principi del mes assignat en aquell moment.

+ +

Sintaxi

+ +
objecteData.setDate(dia)
+ +

Paràmetres

+ +
+
dia
+
Un nombre sencer que representa el dia del mes.
+
+ +

Valor retornat

+ +

El valor retornat per setDate() és el nombre de milisegons que han passat des de l'ú de gener de 1970 00:00:00 UTC de la data resultant (l'objecte {{jsxref("Date")}} també canvia).

+ +

Descripció

+ +

Si es passa un paràmetre que està fora del rang esperat, el mètode setDate() actualitza els altres paràmetres per a acceptar el nombre. Per exemple, si es passa 0 com a dia, la data representarà l'últim dia del mes anterior.

+ +

Exemples

+ +

Utilitzar setDate()

+ +
var elGranDia = new Date(1962, 6, 7); // 1962-07-07
+elGranDia.setDate(24);  // 1962-07-24
+elGranDia.setDate(32);  // 1962-08-01
+elGranDia.setDate(22);  // 1962-08-22
+ +

Especificacions

+ + + + + + + + + + + + + + + + + + + + + + + + +
EspecificacióEstatComentaris
{{SpecName('ES1')}}{{Spec2('ES1')}}Definició inicial. Implementat a JavaScript 1.0.
{{SpecName('ES5.1', '#sec-15.9.5.36', 'Date.prototype.setDate')}}{{Spec2('ES5.1')}} 
{{SpecName('ES6', '#sec-date.prototype.setdate', 'Date.prototype.setDate')}}{{Spec2('ES6')}} 
+ +

Compatibilitat amb navegadors

+ +
{{CompatibilityTable}}
+ +
+ + + + + + + + + + + + + + + + + + + +
CaracterísticaChromeFirefox (Gecko)Internet ExplorerOperaSafari
Suport bàsic{{CompatVersionUnknown}}{{CompatVersionUnknown}}{{CompatVersionUnknown}}{{CompatVersionUnknown}}{{CompatVersionUnknown}}
+
+ +
+ + + + + + + + + + + + + + + + + + + + + +
CaracterísticaAndroidChrome for AndroidFirefox Mobile (Gecko)IE MobileOpera MobileSafari Mobile
Suport bàsic{{CompatVersionUnknown}}{{CompatVersionUnknown}}{{CompatVersionUnknown}}{{CompatVersionUnknown}}{{CompatVersionUnknown}}{{CompatVersionUnknown}}
+
+ +

Vegeu també

+ + diff --git a/files/ca/web/javascript/reference/global_objects/date/setfullyear/index.html b/files/ca/web/javascript/reference/global_objects/date/setfullyear/index.html new file mode 100644 index 0000000000..c29d56ca4e --- /dev/null +++ b/files/ca/web/javascript/reference/global_objects/date/setfullyear/index.html @@ -0,0 +1,128 @@ +--- +title: Date.prototype.setFullYear() +slug: Web/JavaScript/Referencia/Objectes_globals/Date/setFullYear +translation_of: Web/JavaScript/Reference/Global_Objects/Date/setFullYear +--- +
{{JSRef}}
+ +

El mètode setFullYear() assigna l'any sencerr per a la data especificada, d'acord a l'hora local. Retorna una nova marca de temps.

+ +

Sintaxi

+ +
objecteData.setFullYear(any[, mes[, dia]])
+ +

Paràmetres

+ +
+
any
+
Un nombre sencer que representa el valor numèric de l'any, per exemple, 1995.
+
mes
+
Un nombre sencer entre 0 i 11 que representa el mes.
+
dia
+
Opcional. Un nombre sencer entre 1 i 31 que representa el dia del mes.
+
+ +

Valor retornat

+ +

Una nova marca de temps amb el valor de l'objecte actual.

+ +

Descripció

+ +

Si no s'especifica el paràmetre dia s'utilitza el valor retornat pels mètodes {{jsxref("Date.prototype.getMonth()", "getMonth()")}} i {{jsxref("Date.prototype.getDate()", "getDate()")}}.

+ +

Si es passa un paràmetre que està fora del rang esperat, el mètode UTC() actualitza els altres paràmetres per a acceptar el nombre. Per exemple, si es passa 15 com a mes, l'any serà incrementat en 1 (any + 1), i s'emprarà 3 com a mes.

+ +

Exemples

+ +

Utilitzar setFullYear()

+ +
var elGranDia = new Date();
+elGranDia.setFullYear(1997);
+
+ +

Especificacions

+ + + + + + + + + + + + + + + + + + + + + + + + +
EspecificacióEstatComentaris
{{SpecName('ES1')}}{{Spec2('ES1')}}Definició inicial. Implementat a JavaScript 1.3.
{{SpecName('ES5.1', '#sec-15.9.5.40', 'Date.prototype.setFullYear')}}{{Spec2('ES5.1')}} 
{{SpecName('ES6', '#sec-date.prototype.setfullyear', 'Date.prototype.setFullYear')}}{{Spec2('ES6')}} 
+ +

Compatibilitat amb navegadors

+ +
{{CompatibilityTable}}
+ +
+ + + + + + + + + + + + + + + + + + + +
CaracterísticaChromeFirefox (Gecko)Internet ExplorerOperaSafari
Suport bàsic{{CompatVersionUnknown}}{{CompatVersionUnknown}}{{CompatVersionUnknown}}{{CompatVersionUnknown}}{{CompatVersionUnknown}}
+
+ +
+ + + + + + + + + + + + + + + + + + + + + +
CaracterísticaAndroidChrome for AndroidFirefox Mobile (Gecko)IE MobileOpera MobileSafari Mobile
Suport bàsic{{CompatVersionUnknown}}{{CompatVersionUnknown}}{{CompatVersionUnknown}}{{CompatVersionUnknown}}{{CompatVersionUnknown}}{{CompatVersionUnknown}}
+
+ +

Vegeu també

+ + diff --git a/files/ca/web/javascript/reference/global_objects/date/sethours/index.html b/files/ca/web/javascript/reference/global_objects/date/sethours/index.html new file mode 100644 index 0000000000..7f660ba344 --- /dev/null +++ b/files/ca/web/javascript/reference/global_objects/date/sethours/index.html @@ -0,0 +1,129 @@ +--- +title: Date.prototype.setHours() +slug: Web/JavaScript/Referencia/Objectes_globals/Date/setHours +translation_of: Web/JavaScript/Reference/Global_Objects/Date/setHours +--- +
{{JSRef}}
+ +

El mètode setHours() assigna l'hora per a una data especificada d'acord a l'hora local, i retorna el nombre de milisegons que han passat des de l'u de gener de 1970 00:00:00 UTC fins al temps representat per la instància de {{jsxref("Date")}} actualitzada.

+ +

Sintaxi

+ +
objecteData.setHours(hores[, minuts[, segons[, milisegons]]])
+ +

Versions anteriors a JavaScript 1.3

+ +
objecteData.setHours(hores)
+ +

Paràmetres

+ +
+
hores
+
Un nombre sencer entre 0 i 23, que representa l'hora.
+
minuts
+
Opcional. Un nombre sencer entre 0 i 59 que representa els minuts.
+
segons
+
Opcional. Un nombre sencer entre 0 i 59 que representa els segons.
+
milisegons
+
Opcional. Un nombre sencer entre 0 i 999 que representa els milisegons.
+
+ +

Descripció

+ +

Si no s'especifiquen els paràmetres minuts, segons i milisegons s'utilitzen els valors retornats per {{jsxref("Date.prototype.getMinutes()", "getMinutes()")}}, {{jsxref("Date.prototype.getSeconds()", "getSeconds()")}} i {{jsxref("Date.prototype.getMilliseconds()", "getMilliseconds()")}}.

+ +

Si es passa un paràmetre que està fora del rang esperat, el mètode setHours() actualitza els altres paràmetres per a acceptar el nombre. Per exemple, si es passa 100 com a segons, els minuts seran incrementats en 1 (minuts + 1), i s'emprarà 40 com a segons.

+ +

Exemples

+ +

Utilitzar setHours()

+ +
var elGranDia = new Date();
+elGranDia.setHours(7);
+
+ +

Especificacions

+ + + + + + + + + + + + + + + + + + + + + + + + +
EspecificacióEstatComentaris
{{SpecName('ES1')}}{{Spec2('ES1')}}Definició inicial. Implementat a JavaScript 1.0.
{{SpecName('ES5.1', '#sec-15.9.5.34', 'Date.prototype.setHours')}}{{Spec2('ES5.1')}} 
{{SpecName('ES6', '#sec-date.prototype.sethours', 'Date.prototype.setHours')}}{{Spec2('ES6')}} 
+ +

Compatibilitat amb navegadors

+ +
{{CompatibilityTable}}
+ +
+ + + + + + + + + + + + + + + + + + + +
CaracterísticaChromeFirefox (Gecko)Internet ExplorerOperaSafari
Suport bàsic{{CompatVersionUnknown}}{{CompatVersionUnknown}}{{CompatVersionUnknown}}{{CompatVersionUnknown}}{{CompatVersionUnknown}}
+
+ +
+ + + + + + + + + + + + + + + + + + + + + +
CaracterísticaAndroidChrome for AndroidFirefox Mobile (Gecko)IE MobileOpera MobileSafari Mobile
Suport bàsic{{CompatVersionUnknown}}{{CompatVersionUnknown}}{{CompatVersionUnknown}}{{CompatVersionUnknown}}{{CompatVersionUnknown}}{{CompatVersionUnknown}}
+
+ +

Vegeu també

+ + diff --git a/files/ca/web/javascript/reference/global_objects/date/setmilliseconds/index.html b/files/ca/web/javascript/reference/global_objects/date/setmilliseconds/index.html new file mode 100644 index 0000000000..53dc451ad4 --- /dev/null +++ b/files/ca/web/javascript/reference/global_objects/date/setmilliseconds/index.html @@ -0,0 +1,117 @@ +--- +title: Date.prototype.setMilliseconds() +slug: Web/JavaScript/Referencia/Objectes_globals/Date/setMilliseconds +translation_of: Web/JavaScript/Reference/Global_Objects/Date/setMilliseconds +--- +
{{JSRef}}
+ +

El mètode setMilliseconds() assigna els milisegons per a una data especificada d'acord a l'hora local.

+ +

Sintaxi

+ +
objecteData.setMilliseconds(milisegons)
+ +

Paràmetres

+ +
+
milisegons
+
Un nombre sencer entre 0 i 999 que representa els milisegons.
+
+ +

Descripció

+ +

Si es passa un paràmetre que està fora del rang esperat, el mètode setMilliseconds() actualitza els altres paràmetres per a acceptar el nombre. Per exemple, si es passa 1005 com a milisegons, els segonsseran incrementats en 1 (segons + 1), i s'emprarà 5 com a milisegons.

+ +

Exemples

+ +

Utilitzar setMilliseconds()

+ +
var elGranDia= new Date();
+elGranDia.setMilliseconds(100);
+
+ +

Especificacions

+ + + + + + + + + + + + + + + + + + + + + + + + +
EspecificacióEstatComenataris
{{SpecName('ES1')}}{{Spec2('ES1')}}Definició inicial. Implementat a JavaScript 1.3.
{{SpecName('ES5.1', '#sec-15.9.5.28', 'Date.prototype.setMilliseconds')}}{{Spec2('ES5.1')}} 
{{SpecName('ES6', '#sec-date.prototype.setmilliseconds', 'Date.prototype.setMilliseconds')}}{{Spec2('ES6')}} 
+ +

Compatibilitat amb navegadors

+ +
{{CompatibilityTable}}
+ +
+ + + + + + + + + + + + + + + + + + + +
CaracterísticaChromeFirefox (Gecko)Internet ExplorerOperaSafari
Suport bàsic{{CompatVersionUnknown}}{{CompatVersionUnknown}}{{CompatVersionUnknown}}{{CompatVersionUnknown}}{{CompatVersionUnknown}}
+
+ +
+ + + + + + + + + + + + + + + + + + + + + +
CaracterísticaAndroidChrome for AndroidFirefox Mobile (Gecko)IE MobileOpera MobileSafari Mobile
Suport bàsic{{CompatVersionUnknown}}{{CompatVersionUnknown}}{{CompatVersionUnknown}}{{CompatVersionUnknown}}{{CompatVersionUnknown}}{{CompatVersionUnknown}}
+
+ +

Vegeu també

+ + diff --git a/files/ca/web/javascript/reference/global_objects/date/setminutes/index.html b/files/ca/web/javascript/reference/global_objects/date/setminutes/index.html new file mode 100644 index 0000000000..7dba61cade --- /dev/null +++ b/files/ca/web/javascript/reference/global_objects/date/setminutes/index.html @@ -0,0 +1,127 @@ +--- +title: Date.prototype.setMinutes() +slug: Web/JavaScript/Referencia/Objectes_globals/Date/setMinutes +translation_of: Web/JavaScript/Reference/Global_Objects/Date/setMinutes +--- +
{{JSRef}}
+ +

El mètode setMinutes() assigna els minuts a una data especificada, d'acord a l'hora local.

+ +

Sintaxi

+ +
objecteData.setMinutes(minuts[, segons[, milisegons]])
+ +

Versions anteriors a JavaScript 1.3

+ +
objecteData.setMinutes(minuts)
+ +

Paràmetres

+ +
+
minuts
+
Un nombre sencer entre 0 i 59 que representa els minuts.
+
segons
+
Opcional. Un nombre sencer entre 0 i 59 que representa els segons.
+
milisegons
+
Opcional. Un nombre sencer entre 0 i 999 que representa els milisegons.
+
+ +

Descripció

+ +

Si no s'especifiquen els paràmetres minuts, segons i milisegons s'utilitzen els valors retornats per {{jsxref("Date.prototype.getSeconds()", "getSeconds()")}} i {{jsxref("Date.prototype.getMilliseconds()", "getMilliseconds()")}}.

+ +

Si es passa un paràmetre que està fora del rang esperat, el mètode setMinutes() actualitza els altres paràmetres per a acceptar el nombre. Per exemple, si es passa 100 com a segons, els minuts seran incrementats en 1 (minuts + 1), i s'emprarà 40 com a segons.

+ +

Exemples

+ +

Utilitzar setMinutes()

+ +
var elGranDia = new Date();
+elGranDia.setMinutes(45);
+
+ +

Especificacions

+ + + + + + + + + + + + + + + + + + + + + + + + +
EspecificacióEstatComentaris
{{SpecName('ES1')}}{{Spec2('ES1')}}Definició inicial. Implementat a JavaScript 1.0.
{{SpecName('ES5.1', '#sec-15.9.5.32', 'Date.prototype.setMinutes')}}{{Spec2('ES5.1')}} 
{{SpecName('ES6', '#sec-date.prototype.setminutes', 'Date.prototype.setMinutes')}}{{Spec2('ES6')}} 
+ +

Compatibilitat amb navegadors

+ +
{{CompatibilityTable}}
+ +
+ + + + + + + + + + + + + + + + + + + +
CaracterísticaChromeFirefox (Gecko)Internet ExplorerOperaSafari
Suport bàsic{{CompatVersionUnknown}}{{CompatVersionUnknown}}{{CompatVersionUnknown}}{{CompatVersionUnknown}}{{CompatVersionUnknown}}
+
+ +
+ + + + + + + + + + + + + + + + + + + + + +
CaracterísticaAndroidChrome for AndroidFirefox Mobile (Gecko)IE MobileOpera MobileSafari Mobile
Suport bàsic{{CompatVersionUnknown}}{{CompatVersionUnknown}}{{CompatVersionUnknown}}{{CompatVersionUnknown}}{{CompatVersionUnknown}}{{CompatVersionUnknown}}
+
+ +

Vegeu també

+ + diff --git a/files/ca/web/javascript/reference/global_objects/date/setmonth/index.html b/files/ca/web/javascript/reference/global_objects/date/setmonth/index.html new file mode 100644 index 0000000000..a84f51df7c --- /dev/null +++ b/files/ca/web/javascript/reference/global_objects/date/setmonth/index.html @@ -0,0 +1,126 @@ +--- +title: Date.prototype.setMonth() +slug: Web/JavaScript/Referencia/Objectes_globals/Date/setMonth +translation_of: Web/JavaScript/Reference/Global_Objects/Date/setMonth +--- +
{{JSRef}}
+ +

El mètode setMonth() assigna el mes per a una data especificada d'acord a l'any assignat previament.

+ +

Sintaxi

+ +
objecteData.setMonth(mes[, dia])
+ +

Versions anteriors a JavaScript 1.3

+ +
objecteData.setMonth(mes)
+ +

Paràmetres

+ +
+
mes
+
Un nombre sencer entre 0 i 11 que representa els mesos des de gener fins a desembre
+
dia
+
Opcional. Un nombre sencer entre 1 i 31 que representa el dia del mes.
+
 
+
+ +

Descripció

+ +

Si no s'especifica el paràmetre dia s'utilitza el valor retornat pel mètode {{jsxref("Date.prototype.getDate()", "getDate()")}}.

+ +

Si es passa un paràmetre que està fora del rang esperat, el mètode setMonth() actualitza els altres paràmetres per a acceptar el nombre. Per exemple, si es passa 15 com a mes, l'any serà incrementat en 1 (any + 1), i s'emprarà 3 com a mes.

+ +

Exemples

+ +

Utilitzar setMonth()

+ +
var elGranDia = new Date();
+elGranDia.setMonth(6);
+
+ +

Especificacions

+ + + + + + + + + + + + + + + + + + + + + + + + +
EspecificacióEstatComentaris
{{SpecName('ES1')}}{{Spec2('ES1')}}Definició inicial. Implementat a JavaScript 1.0.
{{SpecName('ES5.1', '#sec-15.9.5.38', 'Date.prototype.setMonth')}}{{Spec2('ES5.1')}} 
{{SpecName('ES6', '#sec-date.prototype.setmonth', 'Date.prototype.setMonth')}}{{Spec2('ES6')}} 
+ +

Compatibilitat amb navegadors

+ +
{{CompatibilityTable}}
+ +
+ + + + + + + + + + + + + + + + + + + +
CaracterísticaChromeFirefox (Gecko)Internet ExplorerOperaSafari
Suport bàsic{{CompatVersionUnknown}}{{CompatVersionUnknown}}{{CompatVersionUnknown}}{{CompatVersionUnknown}}{{CompatVersionUnknown}}
+
+ +
+ + + + + + + + + + + + + + + + + + + + + +
CaracterísticaAndroidChrome for AndroidFirefox Mobile (Gecko)IE MobileOpera MobileSafari Mobile
Suport bàsic{{CompatVersionUnknown}}{{CompatVersionUnknown}}{{CompatVersionUnknown}}{{CompatVersionUnknown}}{{CompatVersionUnknown}}{{CompatVersionUnknown}}
+
+ +

Vegeu també

+ + diff --git a/files/ca/web/javascript/reference/global_objects/date/setseconds/index.html b/files/ca/web/javascript/reference/global_objects/date/setseconds/index.html new file mode 100644 index 0000000000..60ea2c0ae3 --- /dev/null +++ b/files/ca/web/javascript/reference/global_objects/date/setseconds/index.html @@ -0,0 +1,125 @@ +--- +title: Date.prototype.setSeconds() +slug: Web/JavaScript/Referencia/Objectes_globals/Date/setSeconds +translation_of: Web/JavaScript/Reference/Global_Objects/Date/setSeconds +--- +
{{JSRef}}
+ +

El mètode setSeconds() assigna els segons per a una data especificada, en temps local.

+ +

Sintaxi

+ +
objecteData.setSeconds(segons[, milisegons])
+ +

Versions anteriors a JavaScript 1.3

+ +
objecteData.setSeconds(segons)
+ +

Paràmetres

+ +
+
segons
+
Un nombre sencer entre 0 i 59 que representa els segons.
+
milisegons
+
Opcional. Un nombre sencer entre 0 i 999 que representa els milisegons.
+
+ +

Descripció

+ +

Si no s'especifica el paràmetre milisegons s'utilitza el valor retornat pel mètode {{jsxref("Date.prototype.getMilliseconds()", "getMilliseconds()")}}.

+ +

Si es passa un paràmetre que està fora del rang esperat, el mètode setSeconds() actualitza els altres paràmetres per a acceptar el nombre. Per exemple, si es passa 100 com a segons, els minuts seran incrementats en 1 (minuts + 1), i s'emprarà 40 com a segons.

+ +

Exemples

+ +

Utilitzar setSeconds()

+ +
var elGranDia = new Date();
+elGranDia.setSeconds(30);
+
+ +

Especificacions

+ + + + + + + + + + + + + + + + + + + + + + + + +
EspecificacionsEstatComentaris
{{SpecName('ES1')}}{{Spec2('ES1')}}Definició inicial. Implementat a JavaScript 1.0.
{{SpecName('ES5.1', '#sec-15.9.5.30', 'Date.prototype.setSeconds')}}{{Spec2('ES5.1')}} 
{{SpecName('ES6', '#sec-date.prototype.setseconds', 'Date.prototype.setSeconds')}}{{Spec2('ES6')}} 
+ +

Compatibilitat amb navegadors

+ +
{{CompatibilityTable}}
+ +
+ + + + + + + + + + + + + + + + + + + +
CaracterísticaChromeFirefox (Gecko)Internet ExplorerOperaSafari
Suport bàsic{{CompatVersionUnknown}}{{CompatVersionUnknown}}{{CompatVersionUnknown}}{{CompatVersionUnknown}}{{CompatVersionUnknown}}
+
+ +
+ + + + + + + + + + + + + + + + + + + + + +
CaracterísticaAndroidChrome for AndroidFirefox Mobile (Gecko)IE MobileOpera MobileSafari Mobile
Suport bàsic{{CompatVersionUnknown}}{{CompatVersionUnknown}}{{CompatVersionUnknown}}{{CompatVersionUnknown}}{{CompatVersionUnknown}}{{CompatVersionUnknown}}
+
+ +

Vegeu també

+ + diff --git a/files/ca/web/javascript/reference/global_objects/date/settime/index.html b/files/ca/web/javascript/reference/global_objects/date/settime/index.html new file mode 100644 index 0000000000..9774f3ee4c --- /dev/null +++ b/files/ca/web/javascript/reference/global_objects/date/settime/index.html @@ -0,0 +1,118 @@ +--- +title: Date.prototype.setTime() +slug: Web/JavaScript/Referencia/Objectes_globals/Date/setTime +translation_of: Web/JavaScript/Reference/Global_Objects/Date/setTime +--- +
{{JSRef}}
+ +

El mètode setTime() configura l'objecte {{jsxref("Date")}} amb un nombre que representa un temps en milisegons que han passat des de la mitjanit de l'ú de gener de 1970, en temps universal.

+ +

Sintaxi

+ +
objecteData.setTime(temps)
+ +

Paràmetres

+ +
+
temps
+
Un nombre sencer que representa el nombre de milisegons que han passat des de l'1 de gener de 1970 00:00:00 UTC.
+
+ +

Descripció

+ +

Utilitzeu el mètode setTime() per a assignar una data i hora a un objecte de tipus {{jsxref("Date")}}.

+ +

Exemples

+ +

Utilitzar setTime()

+ +
var elGranDia = new Date('July 1, 1999');
+var elMateixGranDia = new Date();
+elMateixGranDia.setTime(elGranDia.getTime());
+
+ +

Especificacions

+ + + + + + + + + + + + + + + + + + + + + + + + +
EspecificacióEstatComentaris
{{SpecName('ES1')}}{{Spec2('ES1')}}Definició inicial. Implementat a JavaScript 1.0.
{{SpecName('ES5.1', '#sec-15.9.5.27', 'Date.prototype.setTime')}}{{Spec2('ES5.1')}} 
{{SpecName('ES6', '#sec-date.prototype.settime', 'Date.prototype.setTime')}}{{Spec2('ES6')}} 
+ +

Compatibilitat amb navegadors

+ +
{{CompatibilityTable}}
+ +
+ + + + + + + + + + + + + + + + + + + +
CaracterísticaChromeFirefox (Gecko)Internet ExplorerOperaSafari
Suport bàsic{{CompatVersionUnknown}}{{CompatVersionUnknown}}{{CompatVersionUnknown}}{{CompatVersionUnknown}}{{CompatVersionUnknown}}
+
+ +
+ + + + + + + + + + + + + + + + + + + + + +
CaracterísticaAndroidChrome for AndroidFirefox Mobile (Gecko)IE MobileOpera MobileSafari Mobile
Suport bàsic{{CompatVersionUnknown}}{{CompatVersionUnknown}}{{CompatVersionUnknown}}{{CompatVersionUnknown}}{{CompatVersionUnknown}}{{CompatVersionUnknown}}
+
+ +

Vegeu també

+ + diff --git a/files/ca/web/javascript/reference/global_objects/date/setutcdate/index.html b/files/ca/web/javascript/reference/global_objects/date/setutcdate/index.html new file mode 100644 index 0000000000..109178f66a --- /dev/null +++ b/files/ca/web/javascript/reference/global_objects/date/setutcdate/index.html @@ -0,0 +1,119 @@ +--- +title: Date.prototype.setUTCDate() +slug: Web/JavaScript/Referencia/Objectes_globals/Date/setUTCDate +translation_of: Web/JavaScript/Reference/Global_Objects/Date/setUTCDate +--- +
{{JSRef}}
+ +

El mètode setUTCDate() assigna el dia del mes per a una data especificada, en temps universal.

+ +

Sintaxi

+ +
objecteData.setUTCDate(dia)
+ +

Paràmetres

+ +
+
dia
+
Un nombre sencer de 1 a 31, que representa el dia del mes.
+
+ +

Descripció

+ +

If a parameter you specify is outside of the expected range, setUTCDate() attempts to update the date information in the {{jsxref("Date")}} object accordingly. For example, if you use 40 for dayValue, and the month stored in the {{jsxref("Date")}} object is June, the day will be changed to 10 and the month will be incremented to July.

+ +

Si es passa un paràmetre que està fora del rang esperat, el mètode setUTCDate() actualitza els altres paràmetres per a acceptar el nombre. Per exemple, si es passa 40 com a dia, i el mes especificat a l'objecte {{jsxref("Date")}} és juny, el dia es canviarà a 10 i el mes serà incrementat a juliol.

+ +

Exemples

+ +

Utilitzar setUTCDate()

+ +
var elGranDia = new Date();
+elGranDia.setUTCDate(20);
+
+ +

Especificacions

+ + + + + + + + + + + + + + + + + + + + + + + + +
EspecificacióEstatComentaris
{{SpecName('ES1')}}{{Spec2('ES1')}}Definició inicial. Implementat a JavaScript 1.3.
{{SpecName('ES5.1', '#sec-15.9.5.37', 'Date.prototype.setUTCDate')}}{{Spec2('ES5.1')}} 
{{SpecName('ES6', '#sec-date.prototype.setutcdate', 'Date.prototype.setUTCDate')}}{{Spec2('ES6')}} 
+ +

Compatibilitat amb navegadors

+ +
{{CompatibilityTable}}
+ +
+ + + + + + + + + + + + + + + + + + + +
CaracterísticaChromeFirefox (Gecko)Internet ExplorerOperaSafari
Suport bàsic{{CompatVersionUnknown}}{{CompatVersionUnknown}}{{CompatVersionUnknown}}{{CompatVersionUnknown}}{{CompatVersionUnknown}}
+
+ +
+ + + + + + + + + + + + + + + + + + + + + +
CaracterísticaAndroidChrome for AndroidFirefox Mobile (Gecko)IE MobileOpera MobileSafari Mobile
Suport bàsic{{CompatVersionUnknown}}{{CompatVersionUnknown}}{{CompatVersionUnknown}}{{CompatVersionUnknown}}{{CompatVersionUnknown}}{{CompatVersionUnknown}}
+
+ +

Vegeu també

+ + diff --git a/files/ca/web/javascript/reference/global_objects/date/setutcfullyear/index.html b/files/ca/web/javascript/reference/global_objects/date/setutcfullyear/index.html new file mode 100644 index 0000000000..55185a431b --- /dev/null +++ b/files/ca/web/javascript/reference/global_objects/date/setutcfullyear/index.html @@ -0,0 +1,123 @@ +--- +title: Date.prototype.setUTCFullYear() +slug: Web/JavaScript/Referencia/Objectes_globals/Date/setUTCFullYear +translation_of: Web/JavaScript/Reference/Global_Objects/Date/setUTCFullYear +--- +
{{JSRef}}
+ +

El mètode setUTCFullYear() assigna l'any sencer a la data especificada d'acord amb el temps universal.

+ +

Sintaxi

+ +
objecteData.setUTCFullYear(any[, mes[, dia]])
+ +

Paràmetres

+ +
+
any
+
Un nombre sencer que representa el valor numèric de l'any, per exemple, 1995.
+
mes
+
Un nombre sencer entre 0 i 11 que representa el mes.
+
dia
+
Opcional. Un nombre sencer entre 1 i 31 que representa el dia del mes. Si s'especifica el paràmetre dia, també s'ha d'especificar el paràmetre mes.
+
+ +

Descripció

+ +

Si no s'especifica els paràmetres mes o dia s'utilitza el valor retornat pels mètodes getMonth() i getDate().

+ +

Si es passa un paràmetre que està fora del rang esperat, el mètode setUTCFullYear() actualitza els altres paràmetres per a acceptar el nombre. Per exemple, si es passa 15 com a mes, l'any serà incrementat en 1 (any + 1), i s'emprarà 3 com a mes.

+ +

Exemples

+ +

Utilitzar setUTCFullYear()

+ +
var elGranDia = new Date();
+elGranDia.setUTCFullYear(1997);
+
+ +

Especificacions

+ + + + + + + + + + + + + + + + + + + + + + + + +
EspecificacióEstatComentaris
{{SpecName('ES1')}}{{Spec2('ES1')}}Definició inicial. Implementat a JavaScript 1.3.
{{SpecName('ES5.1', '#sec-15.9.5.41', 'Date.prototype.setUTCFullYear')}}{{Spec2('ES5.1')}} 
{{SpecName('ES6', '#sec-date.prototype.setutcfullyear', 'Date.prototype.setUTCFullYear')}}{{Spec2('ES6')}} 
+ +

Compatibilitat amb navegadors

+ +
{{CompatibilityTable}}
+ +
+ + + + + + + + + + + + + + + + + + + +
CaracterísticaChromeFirefox (Gecko)Internet ExplorerOperaSafari
Suport bàsic{{CompatVersionUnknown}}{{CompatVersionUnknown}}{{CompatVersionUnknown}}{{CompatVersionUnknown}}{{CompatVersionUnknown}}
+
+ +
+ + + + + + + + + + + + + + + + + + + + + +
CaracterísticaAndroidChrome for AndroidFirefox Mobile (Gecko)IE MobileOpera MobileSafari Mobile
Suport bàsic{{CompatVersionUnknown}}{{CompatVersionUnknown}}{{CompatVersionUnknown}}{{CompatVersionUnknown}}{{CompatVersionUnknown}}{{CompatVersionUnknown}}
+
+ +

Vegeu també

+ + diff --git a/files/ca/web/javascript/reference/global_objects/date/setutchours/index.html b/files/ca/web/javascript/reference/global_objects/date/setutchours/index.html new file mode 100644 index 0000000000..3c75ea903c --- /dev/null +++ b/files/ca/web/javascript/reference/global_objects/date/setutchours/index.html @@ -0,0 +1,125 @@ +--- +title: Date.prototype.setUTCHours() +slug: Web/JavaScript/Referencia/Objectes_globals/Date/setUTCHours +translation_of: Web/JavaScript/Reference/Global_Objects/Date/setUTCHours +--- +
{{JSRef}}
+ +

El mètode setUTCHours() assigna l'hora per a una data especificada d'acord al temps universal, i retorna el nombre de milisegons que han passat des de l'ú de gener de 1970 00:00:00 UTC fins al temps representat per l'instància {{jsxref("Date")}} actualitzada.

+ +

Sintaxi

+ +
objecteData.setUTCHours(hores[, minuts[, segons[, milisegons]]])
+ +

Paràmetres

+ +
+
hores
+
Un nombre sencer entre 0 i 23, que representa l'hora.
+
minuts
+
Opcional. Un nombre sencer entre 0 i 59 que representa els minuts.
+
segons
+
Oppcional. Un nombre sencer entre 0 i 59 que representa els segons. Si s'especifica segons també s'ha d'expecificar minuts.
+
milisegons
+
Opcional. Un nombre sencer entre 0 i 999 que representa els milisegons. Si s'especifica milisegons també s'han d'especificar minuts i segons.
+
+ +

Descripció

+ +

Si no s'especifica els paràmetres minuts, segons o milisegons s'utilitza el valor retornat pels mètodes {{jsxref("Date.prototype.getUTCMinutes()", "getUTCMinutes()")}}, {{jsxref("Date.prototype.getUTCSeconds()", "getUTCSeconds()")}}, i {{jsxref("Date.prototype.getUTCMilliseconds()", "getUTCMilliseconds()")}}.

+ +

Si es passa un paràmetre que està fora del rang esperat, el mètode setUTCHours() actualitza els altres paràmetres per a acceptar el nombre. Per exemple, si es passa 100 com a segons, els minuts seran incrementats en 1 (minuts + 1), i s'emprarà 40 com a segons.

+ +

Exemples

+ +

Utilitzar setUTCHours()

+ +
var elGranDia = new Date();
+elGranDia.setUTCHours(8);
+
+ +

Especificacions

+ + + + + + + + + + + + + + + + + + + + + + + + +
EspecificacióEstatComentaris
{{SpecName('ES1')}}{{Spec2('ES1')}}Definició inicial. Implementat a JavaScript 1.3.
{{SpecName('ES5.1', '#sec-15.9.5.35', 'Date.prototype.setUTCHours')}}{{Spec2('ES5.1')}} 
{{SpecName('ES6', '#sec-date.prototype.setutchours', 'Date.prototype.setUTCHours')}}{{Spec2('ES6')}} 
+ +

Compatibilitat amb navegadors

+ +
{{CompatibilityTable}}
+ +
+ + + + + + + + + + + + + + + + + + + +
CaracterísticaChromeFirefox (Gecko)Internet ExplorerOperaSafari
Suport bàsic{{CompatVersionUnknown}}{{CompatVersionUnknown}}{{CompatVersionUnknown}}{{CompatVersionUnknown}}{{CompatVersionUnknown}}
+
+ +
+ + + + + + + + + + + + + + + + + + + + + +
CaracterísticaAndroidChrome for AndroidFirefox Mobile (Gecko)IE MobileOpera MobileSafari Mobile
Suport bàsic{{CompatVersionUnknown}}{{CompatVersionUnknown}}{{CompatVersionUnknown}}{{CompatVersionUnknown}}{{CompatVersionUnknown}}{{CompatVersionUnknown}}
+
+ +

Vegeu també

+ + diff --git a/files/ca/web/javascript/reference/global_objects/date/setutcmilliseconds/index.html b/files/ca/web/javascript/reference/global_objects/date/setutcmilliseconds/index.html new file mode 100644 index 0000000000..e3265e247f --- /dev/null +++ b/files/ca/web/javascript/reference/global_objects/date/setutcmilliseconds/index.html @@ -0,0 +1,117 @@ +--- +title: Date.prototype.setUTCMilliseconds() +slug: Web/JavaScript/Referencia/Objectes_globals/Date/setUTCMilliseconds +translation_of: Web/JavaScript/Reference/Global_Objects/Date/setUTCMilliseconds +--- +
{{JSRef}}
+ +

El mètode setUTCMilliseconds() assigna els milisegons a la data sepecificada d'acord l'hora local.

+ +

Sintaxi

+ +
objecteData.setUTCMilliseconds(milisegons)
+ +

Paràmetres

+ +
+
milisegons
+
Un nombre sencer entre 0 i 999 que representa els milisegons.
+
+ +

Descripció

+ +

Si es passa un paràmetre que està fora del rang esperat, el mètode setUTCMilliseconds() actualitza els altres paràmetres per a acceptar el nombre. Per exemple, si es passa 1100 com a milisegons, els segons seran incrementats en 1 (segons + 1), i s'emprarà 100 com a milisegons.

+ +

Exemples

+ +

Utilitzar setUTCMilliseconds()

+ +
var elGranDia = new Date();
+elGranDia.setUTCMilliseconds(500);
+
+ +

Especificacions

+ + + + + + + + + + + + + + + + + + + + + + + + +
EspecificacióEstatComentaris
{{SpecName('ES1')}}{{Spec2('ES1')}}Definició inicial. Implementat a JavaScript 1.3.
{{SpecName('ES5.1', '#sec-15.9.5.29', 'Date.prototype.setUTCMilliseconds')}}{{Spec2('ES5.1')}} 
{{SpecName('ES6', '#sec-date.prototype.setutcmilliseconds', 'Date.prototype.setUTCMilliseconds')}}{{Spec2('ES6')}} 
+ +

Compatibilitat amb navegadors

+ +
{{CompatibilityTable}}
+ +
+ + + + + + + + + + + + + + + + + + + +
CaracterísticaChromeFirefox (Gecko)Internet ExplorerOperaSafari
Suport bàsic{{CompatVersionUnknown}}{{CompatVersionUnknown}}{{CompatVersionUnknown}}{{CompatVersionUnknown}}{{CompatVersionUnknown}}
+
+ +
+ + + + + + + + + + + + + + + + + + + + + +
CaracterísticaAndroidChrome for AndroidFirefox Mobile (Gecko)IE MobileOpera MobileSafari Mobile
Suport bàsic{{CompatVersionUnknown}}{{CompatVersionUnknown}}{{CompatVersionUnknown}}{{CompatVersionUnknown}}{{CompatVersionUnknown}}{{CompatVersionUnknown}}
+
+ +

Vegeu també

+ + diff --git a/files/ca/web/javascript/reference/global_objects/date/setutcminutes/index.html b/files/ca/web/javascript/reference/global_objects/date/setutcminutes/index.html new file mode 100644 index 0000000000..5551364e52 --- /dev/null +++ b/files/ca/web/javascript/reference/global_objects/date/setutcminutes/index.html @@ -0,0 +1,123 @@ +--- +title: Date.prototype.setUTCMinutes() +slug: Web/JavaScript/Referencia/Objectes_globals/Date/setUTCMinutes +translation_of: Web/JavaScript/Reference/Global_Objects/Date/setUTCMinutes +--- +
{{JSRef}}
+ +

El mètode setUTCMinutes() assigna els minuts per a la data especificada, segons l'hora local.

+ +

Sintaxi

+ +
objecteData.setUTCMinutes(minuts[, segons[, milisegons]])
+ +

Paràmetres

+ +
+
minuts
+
Un nombre sencer entre 0 i 59, que representa els minuts.
+
segons
+
Oppcional. Un nombre sencer entre 0 i 59 que representa els segons. Si s'especifica segons també s'ha d'expecificar minuts.
+
milisegons
+
Opcional. Un nombre sencer entre 0 i 999 que representa els milisegons. Si s'especifica milisegons també s'han d'especificar minuts i segons.
+
+ +

Descripció

+ +

Si no s'especifica els paràmetres segons o milisegons s'utilitza el valor retornat pels mètodes {{jsxref("Date.prototype.getUTCSeconds()", "getUTCSeconds()")}} i {{jsxref("Date.prototype.getUTCMilliseconds()", "getUTCMilliseconds()")}}.

+ +

Si es passa un paràmetre que està fora del rang esperat, el mètode setUTCMinutes() actualitza els altres paràmetres per a acceptar el nombre. Per exemple, si es passa 100 com a segons, els minuts seran incrementats en 1 (minuts + 1), i s'emprarà 40 com a segons.

+ +

Exemples

+ +

Utilitzar setUTCMinutes()

+ +
var elGranDia = new Date();
+elGranDia.setUTCMinutes(43);
+
+ +

Especificacions

+ + + + + + + + + + + + + + + + + + + + + + + + +
EspecificacióEstatComentaris
{{SpecName('ES1')}}{{Spec2('ES1')}}Definició inicial. Implementat a JavaScript 1.3.
{{SpecName('ES5.1', '#sec-15.9.5.33', 'Date.prototype.setUTCMinutes')}}{{Spec2('ES5.1')}} 
{{SpecName('ES6', '#sec-date.prototype.setutcminutes', 'Date.prototype.setUTCMinutes')}}{{Spec2('ES6')}} 
+ +

Compatibilitat amb navegadors

+ +
{{CompatibilityTable}}
+ +
+ + + + + + + + + + + + + + + + + + + +
CaracterísticaChromeFirefox (Gecko)Internet ExplorerOperaSafari
Suport bàsic{{CompatVersionUnknown}}{{CompatVersionUnknown}}{{CompatVersionUnknown}}{{CompatVersionUnknown}}{{CompatVersionUnknown}}
+
+ +
+ + + + + + + + + + + + + + + + + + + + + +
CaracterísticaAndroidChrome for AndroidFirefox Mobile (Gecko)IE MobileOpera MobileSafari Mobile
Suport bàsic{{CompatVersionUnknown}}{{CompatVersionUnknown}}{{CompatVersionUnknown}}{{CompatVersionUnknown}}{{CompatVersionUnknown}}{{CompatVersionUnknown}}
+
+ +

Vegeu també

+ + diff --git a/files/ca/web/javascript/reference/global_objects/date/setutcmonth/index.html b/files/ca/web/javascript/reference/global_objects/date/setutcmonth/index.html new file mode 100644 index 0000000000..e06f0fba64 --- /dev/null +++ b/files/ca/web/javascript/reference/global_objects/date/setutcmonth/index.html @@ -0,0 +1,121 @@ +--- +title: Date.prototype.setUTCMonth() +slug: Web/JavaScript/Referencia/Objectes_globals/Date/setUTCMonth +translation_of: Web/JavaScript/Reference/Global_Objects/Date/setUTCMonth +--- +
{{JSRef}}
+ +

El mètode setUTCMonth() assigna el mes per a la data especificada segons el temps universal.

+ +

Sintaxi

+ +
objecteData.setUTCMonth(mes[, dia])
+ +

Paràmetres

+ +
+
mes
+
Un nombre sencer entre 0 i 11 que representa els mesos des de gener fins a desembre
+
dia
+
Opcional. Un nombre sencer entre 1 i 31 que representa el dia del mes.
+
+ +

Descripció

+ +

Si no s'especifica el paràmetre dia s'utilitza el valor retornat pel mètode.{{jsxref("Date.prototype.getUTCDate()", "getUTCDate()")}}.

+ +

Si es passa un paràmetre que està fora del rang esperat, el mètode setUTCMonth() actualitza els altres paràmetres per a acceptar el nombre. Per exemple, si es passa 15 com a mes, l'any serà incrementat en 1 (any + 1), i s'emprarà 3 com a mes.

+ +

Exemples

+ +

Utilitzar setUTCMonth()

+ +
var elGranDia = new Date();
+elGranDia.setUTCMonth(11);
+
+ +

Especificacions

+ + + + + + + + + + + + + + + + + + + + + + + + +
EspecificacióEstatComentaris
{{SpecName('ES1')}}{{Spec2('ES1')}}Definició inicial. Implementat a JavaScript 1.3.
{{SpecName('ES5.1', '#sec-15.9.5.39', 'Date.prototype.setUTCMonth')}}{{Spec2('ES5.1')}} 
{{SpecName('ES6', '#sec-date.prototype.setutcmonth', 'Date.prototype.setUTCMonth')}}{{Spec2('ES6')}} 
+ +

Compatibilitat amb navegadors

+ +
{{CompatibilityTable}}
+ +
+ + + + + + + + + + + + + + + + + + + +
CaracterísticaChromeFirefox (Gecko)Internet ExplorerOperaSafari
Suport bàsic{{CompatVersionUnknown}}{{CompatVersionUnknown}}{{CompatVersionUnknown}}{{CompatVersionUnknown}}{{CompatVersionUnknown}}
+
+ +
+ + + + + + + + + + + + + + + + + + + + + +
CaracterísticaAndroidChrome for AndroidFirefox Mobile (Gecko)IE MobileOpera MobileSafari Mobile
Suport bàsic{{CompatVersionUnknown}}{{CompatVersionUnknown}}{{CompatVersionUnknown}}{{CompatVersionUnknown}}{{CompatVersionUnknown}}{{CompatVersionUnknown}}
+
+ +

Vegeu també

+ + diff --git a/files/ca/web/javascript/reference/global_objects/date/setutcseconds/index.html b/files/ca/web/javascript/reference/global_objects/date/setutcseconds/index.html new file mode 100644 index 0000000000..66f33a9e1b --- /dev/null +++ b/files/ca/web/javascript/reference/global_objects/date/setutcseconds/index.html @@ -0,0 +1,121 @@ +--- +title: Date.prototype.setUTCSeconds() +slug: Web/JavaScript/Referencia/Objectes_globals/Date/setUTCSeconds +translation_of: Web/JavaScript/Reference/Global_Objects/Date/setUTCSeconds +--- +
{{JSRef}}
+ +

El mètode setUTCSeconds() assigna els segons a la data especificada, segons el temps universal.

+ +

Sintaxi

+ +
objecteData.setUTCSeconds(segons[, milisegons])
+ +

Paràmetres

+ +
+
segons
+
Un nombre sencer entre 0 i 59 que representa els segons.
+
milisegons
+
Opcional. Un nombre sencer entre 0 i 999 que representa els milisegons.
+
+ +

Descripció

+ +

Si no s'especifica el paràmetre milisegons s'utilitza el valor retornat pel mètode {{jsxref("Date.prototype.getUTCMilliseconds()", "getUTCMilliseconds()")}}.

+ +

Si es passa un paràmetre que està fora del rang esperat, el mètode setUTCSeconds() actualitza els altres paràmetres per a acceptar el nombre. Per exemple, si es passa 100 com a segons, els minuts seran incrementats en 1 (minuts + 1), i s'emprarà 40 com a segons.

+ +

Exemples

+ +

Utilitzar setUTCSeconds()

+ +
var elGranDia = new Date();
+elGranDia.setUTCSeconds(20);
+
+ +

Especificacions

+ + + + + + + + + + + + + + + + + + + + + + + + +
EspecificacióEstatComentaris
{{SpecName('ES1')}}{{Spec2('ES1')}}Definició inicial. Implementat a JavaScript 1.3.
{{SpecName('ES5.1', '#sec-15.9.5.31', 'Date.prototype.setUTCSeconds')}}{{Spec2('ES5.1')}} 
{{SpecName('ES6', '#sec-date.prototype.setutcseconds', 'Date.prototype.setUTCSeconds')}}{{Spec2('ES6')}} 
+ +

Compatibilitat amb navegadors

+ +
{{CompatibilityTable}}
+ +
+ + + + + + + + + + + + + + + + + + + +
CaracterísticaChromeFirefox (Gecko)Internet ExplorerOperaSafari
Suport bàsic{{CompatVersionUnknown}}{{CompatVersionUnknown}}{{CompatVersionUnknown}}{{CompatVersionUnknown}}{{CompatVersionUnknown}}
+
+ +
+ + + + + + + + + + + + + + + + + + + + + +
CaracterísticaAndroidChrome for AndroidFirefox Mobile (Gecko)IE MobileOpera MobileSafari Mobile
Suport bàsic{{CompatVersionUnknown}}{{CompatVersionUnknown}}{{CompatVersionUnknown}}{{CompatVersionUnknown}}{{CompatVersionUnknown}}{{CompatVersionUnknown}}
+
+ +

Vegeu també

+ + diff --git a/files/ca/web/javascript/reference/global_objects/date/setyear/index.html b/files/ca/web/javascript/reference/global_objects/date/setyear/index.html new file mode 100644 index 0000000000..ead16f2d21 --- /dev/null +++ b/files/ca/web/javascript/reference/global_objects/date/setyear/index.html @@ -0,0 +1,124 @@ +--- +title: Date.prototype.setYear() +slug: Web/JavaScript/Referencia/Objectes_globals/Date/setYear +translation_of: Web/JavaScript/Reference/Global_Objects/Date/setYear +--- +
{{JSRef}} {{deprecated_header}}
+ +

El mètode setYear() assigna l'any per a una data especificada, d'acord a l'hora local. Com que setYear() no utilitza anys complerts ("el problema de l'any 2000"), aquest mètode està en desús i s'ha reemplaçat pel mètode {{jsxref("Date.prototype.setFullYear()", "setFullYear()")}}.

+ +

Sintaxi

+ +
objecteData.setYear(any)
+ +

Paràmetres

+ +
+
any
+
Un nombre sencer.
+
+ +

Descripció

+ +

Si any és un nombre entre 0 i 99 (inclòs), llavors s'assigna 1900 + any a objecteData. En cas contrari, s'assigna any a objecteData.

+ +

Exemples

+ +

Utilitzar setYear()

+ +

Les dues primeres línies assignen el valor 1996 a l'any. La tercera línia assigna el valor 2000 a l'any.

+ +
var elGranDia = new Date();
+
+elGranDia.setYear(96);
+elGranDia.setYear(1996);
+elGranDia.setYear(2000);
+
+ +

Especificacions

+ + + + + + + + + + + + + + + + + + + + + + + + +
EspecificacióEstatComentaris
{{SpecName('ES1')}}{{Spec2('ES1')}}Definició inicial. Implementat a JavaScript 1.0.
{{SpecName('ES5.1', '#sec-B.2.5', 'Date.prototype.getYear')}}{{Spec2('ES5.1')}}Definit a l'annex de compatibilitat (informatiu).
{{SpecName('ES6', '#sec-date.prototype.setyear', 'Date.prototype.getYear')}}{{Spec2('ES6')}}Definit a l'annex de característiques adicionals per a navegadors web (normatiu).
+ +

Compatibilitat amb navegadors

+ +
{{CompatibilityTable}}
+ +
+ + + + + + + + + + + + + + + + + + + +
CaracterísticaChromeFirefox (Gecko)Internet ExplorerOperaSafari
Suport bàsic{{CompatVersionUnknown}}{{CompatVersionUnknown}}{{CompatVersionUnknown}}{{CompatVersionUnknown}}{{CompatVersionUnknown}}
+
+ +
+ + + + + + + + + + + + + + + + + + + + + +
CaracterísticaAndroidChrome for AndroidFirefox Mobile (Gecko)IE MobileOpera MobileSafari Mobile
Suport bàsic{{CompatVersionUnknown}}{{CompatVersionUnknown}}{{CompatVersionUnknown}}{{CompatVersionUnknown}}{{CompatVersionUnknown}}{{CompatVersionUnknown}}
+
+ +

Vegeu també

+ + diff --git a/files/ca/web/javascript/reference/global_objects/date/todatestring/index.html b/files/ca/web/javascript/reference/global_objects/date/todatestring/index.html new file mode 100644 index 0000000000..9548215179 --- /dev/null +++ b/files/ca/web/javascript/reference/global_objects/date/todatestring/index.html @@ -0,0 +1,115 @@ +--- +title: Date.prototype.toDateString() +slug: Web/JavaScript/Referencia/Objectes_globals/Date/toDateString +translation_of: Web/JavaScript/Reference/Global_Objects/Date/toDateString +--- +
{{JSRef}}
+ +

El mètode toDateString() retorna la part de la data d'un objecte {{jsxref("Date")}} en un format entenible per persones en anglés amerià.

+ +

Sintaxi

+ +
objecteData.toDateString()
+ +

Descripció

+ +

Les instàncies de Date representen un punt específic en el temps. Una crida al mètode toString() retornarà la dada en un format entenible per persones, en anglés americà. Al motor SpiderMonkey, aquest format consisteix en la part de la data (dia, mes i any) seguida de la part de l'hora (hores, minuts, segons i zona horària). De vegades és convenient obtenir un string només de la part de l'hora; aquesta és la raó de ser del mètode toDateString().

+ +

El mètode toDateString() resulta especialment útil perquè els motors que compleixen amb el standard ECMA-262 poden retornar resultats diferents al string obtingut mitjançant el mètode toString() en objectes Date, ja que el format depèn totalment de la implementació; això implica que partir el string per a obtenir només la part de temps pot no produïr un resultat consistent en tots els motors.

+ +

Exemples

+ +

Ús bàsic de toDateString()

+ +
var d = new Date(1993, 6, 28, 14, 39, 7);
+
+console.log(d.toString());     // imprimeix Wed Jul 28 1993 14:39:07 GMT-0600 (PDT)
+console.log(d.toDateString()); // imprimeix Wed Jul 28 1993
+
+ +

Especificacions

+ + + + + + + + + + + + + + + + + + + + + + + + +
EspecificacióEstatComentaris
{{SpecName('ES3')}}{{Spec2('ES3')}}Definició inicial.
{{SpecName('ES5.1', '#sec-15.9.5.3', 'Date.prototype.toDateString')}}{{Spec2('ES5.1')}} 
{{SpecName('ES6', '#sec-date.prototype.todatestring', 'Date.prototype.toDateString')}}{{Spec2('ES6')}} 
+ +

Compatibilitat amb navegadors

+ +
{{CompatibilityTable}}
+ +
+ + + + + + + + + + + + + + + + + + + +
CaracterísticaChromeFirefox (Gecko)Internet ExplorerOperaSafari
Suport bàsic{{CompatVersionUnknown}}{{CompatVersionUnknown}}{{CompatVersionUnknown}}{{CompatVersionUnknown}}{{CompatVersionUnknown}}
+
+ +
+ + + + + + + + + + + + + + + + + + + + + +
CaracterísticaAndroidChrome for AndroidFirefox Mobile (Gecko)IE MobileOpera MobileSafari Mobile
Suport bàsic{{CompatVersionUnknown}}{{CompatVersionUnknown}}{{CompatVersionUnknown}}{{CompatVersionUnknown}}{{CompatVersionUnknown}}{{CompatVersionUnknown}}
+
+ +

Vegeu també

+ + diff --git a/files/ca/web/javascript/reference/global_objects/date/togmtstring/index.html b/files/ca/web/javascript/reference/global_objects/date/togmtstring/index.html new file mode 100644 index 0000000000..08e63be739 --- /dev/null +++ b/files/ca/web/javascript/reference/global_objects/date/togmtstring/index.html @@ -0,0 +1,115 @@ +--- +title: Date.prototype.toGMTString() +slug: Web/JavaScript/Referencia/Objectes_globals/Date/toGMTString +translation_of: Web/JavaScript/Reference/Global_Objects/Date/toGMTString +--- +
{{JSRef}} {{deprecated_header}}
+ +

El mètode toGMTString() converteix una data a un string, utilitzant les convencions del Greenwich Mean Time (GMT). El format exacte del valor retornat per toGMTString() és depenent de la plataforma i el navegador, per norma general hauria de representar la data en una forma entenible per persones.

+ +
+

Nota: toGMTString() està en desús i no es recomana fer-lo servir més. Es mantè només per a compatibilitat amb codi vell que l'utilitzi; en comptes d'aquest mètode utilitzeu {{jsxref("Date.prototype.toUTCString()", "toUTCString()")}}.

+
+ +

Sintaxi

+ +
objecteData.toGMTString()
+ +

Exemples

+ +

Exemple senzill

+ +

En aquest exemple el mètode toGMTString() converteix la data a GMT (UTC) utilitzant el desplaçament de zona horaria donat pel sistema operatiu i retorna un valor string que té aproximadament la forma que trobareu a continuació. El format exacte dependrà de la plataforma.

+ +
var avui = new Date();
+var str = avui.toGMTString();  // en desús! utilitzeu toUTCString()
+
+console.log(str);               // Mon, 18 Dec 1995 17:28:35 GMT
+
+ +

Especificacions

+ + + + + + + + + + + + + + + + + + + + + + + + +
EspecificacióEstatComentaris
{{SpecName('ES1')}}{{Spec2('ES1')}}Definició inicial, però ja marcat com a en desús. Implementat a JavaScript 1.0.
{{SpecName('ES5.1', '#sec-B.2.6', 'Date.prototype.toGMTString')}}{{Spec2('ES5.1')}}Definit a l'annex de compatibilitat (informatiu).
{{SpecName('ES6', '#sec-date.prototype.togmtstring', 'Date.prototype.toGMTString')}}{{Spec2('ES6')}}Definit a l'annex per a característiques adicionals per a navegadors web (normatiu).
+ +

Compatibilitat amb navegadors

+ +
{{CompatibilityTable}}
+ +
+ + + + + + + + + + + + + + + + + + + +
CaracterísticaChromeFirefox (Gecko)Internet ExplorerOperaSafari
Suport bàsic{{CompatVersionUnknown}}{{CompatVersionUnknown}}{{CompatVersionUnknown}}{{CompatVersionUnknown}}{{CompatVersionUnknown}}
+
+ +
+ + + + + + + + + + + + + + + + + + + + + +
CaracterísticaAndroidChrome for AndroidFirefox Mobile (Gecko)IE MobileOpera MobileSafari Mobile
Suport bàsic{{CompatVersionUnknown}}{{CompatVersionUnknown}}{{CompatVersionUnknown}}{{CompatVersionUnknown}}{{CompatVersionUnknown}}{{CompatVersionUnknown}}
+
+ +

Vegeu també

+ + diff --git a/files/ca/web/javascript/reference/global_objects/date/toisostring/index.html b/files/ca/web/javascript/reference/global_objects/date/toisostring/index.html new file mode 100644 index 0000000000..759e53225c --- /dev/null +++ b/files/ca/web/javascript/reference/global_objects/date/toisostring/index.html @@ -0,0 +1,134 @@ +--- +title: Date.prototype.toISOString() +slug: Web/JavaScript/Referencia/Objectes_globals/Date/toISOString +translation_of: Web/JavaScript/Reference/Global_Objects/Date/toISOString +--- +
{{JSRef}}
+ +

El mètode toISOString() retorna una cadena en un format ISO extès simplificat (ISO 8601), el qual sempre té 24 caràcters de llargària: YYYY-MM-DDTHH:mm:ss.sssZ. La zona horària és sempre UTC, tal i com indica el sufix "Z".

+ +

Sintaxi

+ +
dateObj.toISOString()
+ +

Exemples

+ +

Utilitzar toISOString()

+ +
var today = new Date('05 October 2011 14:48 UTC');
+
+console.log(today.toISOString()); // Retorna 2011-10-05T14:48:00.000Z
+
+ +

L'exemple anterior interpreta una cadena no estàndard que pot no ser interpretada correctament per navegadors que no siguin mozilla.

+ +

Polyfill

+ +

Aquest mètode es va estandaritzar en la 5a edició d'ECMA-262. Els motors que no s'hagin actualitzat per suportar aquest mètode poden evitar al mancança d'aquest mètode utilitzant les següents accions:

+ +
if (!Date.prototype.toISOString) {
+  (function() {
+
+    function pad(number) {
+      if (number < 10) {
+        return '0' + number;
+      }
+      return number;
+    }
+
+    Date.prototype.toISOString = function() {
+      return this.getUTCFullYear() +
+        '-' + pad(this.getUTCMonth() + 1) +
+        '-' + pad(this.getUTCDate()) +
+        'T' + pad(this.getUTCHours()) +
+        ':' + pad(this.getUTCMinutes()) +
+        ':' + pad(this.getUTCSeconds()) +
+        '.' + (this.getUTCMilliseconds() / 1000).toFixed(3).slice(2, 5) +
+        'Z';
+    };
+
+  }());
+}
+
+ +

Especificacions

+ + + + + + + + + + + + + + + + + + + +
EspecificacióEstatComentaris
{{SpecName('ES5.1', '#sec-15.9.5.43', 'Date.prototype.toISOString')}}{{Spec2('ES5.1')}}Definició inicial. Implementat en JavaScript 1.8.
{{SpecName('ES6', '#sec-date.prototype.toisostring', 'Date.prototype.toISOString')}}{{Spec2('ES6')}} 
+ +

Compatibilitat amb navegadors

+ +
{{CompatibilityTable}}
+ +
+ + + + + + + + + + + + + + + + + + + +
CaracterísticaChromeFirefox (Gecko)Internet ExplorerOperaSafari
Suport bàsic{{CompatVersionUnknown}}{{CompatVersionUnknown}}{{CompatIE("9")}}{{CompatVersionUnknown}}{{CompatVersionUnknown}}
+
+ +
+ + + + + + + + + + + + + + + + + + + + + +
CaracterísticaAndroidChrome per AndroidFirefox Mobile (Gecko)IE MobileOpera MobileSafari Mobile
Suport bàsic{{CompatVersionUnknown}}{{CompatVersionUnknown}}{{CompatVersionUnknown}}{{CompatVersionUnknown}}{{CompatVersionUnknown}}{{CompatVersionUnknown}}
+
+ +

Vegeu també

+ + diff --git a/files/ca/web/javascript/reference/global_objects/date/tojson/index.html b/files/ca/web/javascript/reference/global_objects/date/tojson/index.html new file mode 100644 index 0000000000..8b583470bf --- /dev/null +++ b/files/ca/web/javascript/reference/global_objects/date/tojson/index.html @@ -0,0 +1,108 @@ +--- +title: Date.prototype.toJSON() +slug: Web/JavaScript/Referencia/Objectes_globals/Date/toJSON +translation_of: Web/JavaScript/Reference/Global_Objects/Date/toJSON +--- +
{{JSRef}}
+ +

El mètode toJSON() retorna una representació de tipus cadena de l'objecte {{jsxref("Date")}}.

+ +

Sintaxi

+ +
dateObj.toJSON()
+ +

Descripció

+ +

Les instàncies {{jsxref("Date")}} referencien a un punt concret en el temps. La crida toJSON() retorna una cadena (usant {{jsxref("Date.prototype.toISOString()", "toISOString()")}}) en representació del valor de l'objecte {{jsxref("Date")}}. Generalment aquest mètode s'utilitza, per defecte, per serialitzar eficaçment objectes {{jsxref("Date")}} durant la serialització {{Glossary("JSON")}}.

+ +

Exemples

+ +

Utilitzar toJSON()

+ +
var jsonDate = (new Date()).toJSON();
+var backToDate = new Date(jsonDate);
+
+console.log(jsonDate); //2015-10-26T07:46:36.611Z
+
+ +

Especificacions

+ + + + + + + + + + + + + + + + + + + +
EspecificacióEstatComentaris
{{SpecName('ES5.1', '#sec-15.9.5.44', 'Date.prototype.toJSON')}}{{Spec2('ES5.1')}}Definició inicial. Implementat en JavaScript 1.8.5.
{{SpecName('ES6', '#sec-date.prototype.tojson', 'Date.prototype.toJSON')}}{{Spec2('ES6')}} 
+ +

Compatibilitat amb navegadors

+ +
{{CompatibilityTable}}
+ +
+ + + + + + + + + + + + + + + + + + + +
CaracterísticaChromeFirefox (Gecko)Internet ExplorerOperaSafari
Suport bàsic{{CompatVersionUnknown}}{{CompatVersionUnknown}}{{CompatVersionUnknown}}{{CompatVersionUnknown}}{{CompatVersionUnknown}}
+
+ +
+ + + + + + + + + + + + + + + + + + + + + +
CaracterísticaAndroidChrome per AndroidFirefox Mobile (Gecko)IE MobileOpera MobileSafari Mobile
Suport bàsic{{CompatVersionUnknown}}{{CompatVersionUnknown}}{{CompatVersionUnknown}}{{CompatVersionUnknown}}{{CompatVersionUnknown}}{{CompatVersionUnknown}}
+
+ +

Vegeu també

+ + diff --git a/files/ca/web/javascript/reference/global_objects/date/tostring/index.html b/files/ca/web/javascript/reference/global_objects/date/tostring/index.html new file mode 100644 index 0000000000..8482fe5298 --- /dev/null +++ b/files/ca/web/javascript/reference/global_objects/date/tostring/index.html @@ -0,0 +1,142 @@ +--- +title: Date.prototype.toString() +slug: Web/JavaScript/Referencia/Objectes_globals/Date/toString +translation_of: Web/JavaScript/Reference/Global_Objects/Date/toString +--- +
{{JSRef}}
+ +

El mètode toString() retorna un string que representa l'objecte {{jsxref("Date")}} especificat.

+ +

Sintaxi

+ +
objecteDate.toString()
+ +

Paràmetres

+ +

Cap.

+ +

Descripció

+ +

L'objecte {{jsxref("Date")}} sobreescriu el mètode toString() de l'objecte {{jsxref("Object")}}; no hereta {{jsxref("Object.prototype.toString()")}}. Per a objectes {{jsxref("Date")}}, el mètode toString() retorna un string que representa l'objecte.

+ +

El mètode toString() sempre retorna una representació en forma de string de la data en anglés americà.

+ +

JavaScript cridarà el mètode toString() de manera automàtica quan una data requereix ser representada com a text o bé quan una data formi part d'una concatenació de strings.

+ +

El mètode toString() és genèric. Si this no fa referència a una instància de {{jsxref("Date")}}, retornarà "Invalid Date".

+ +

Exemples

+ +

Utilitzar toString()

+ +

L'exemple següent assigna el valor de toString() d'un objecte {{jsxref("Date")}} a myVar:

+ +
var x = new Date();
+myVar = x.toString(); // assigna un valor a myVar simimlar a:
+// Mon Sep 28 1998 14:36:22 GMT-0700 (Pacific Daylight Time)
+
+ +

Especificacions

+ + + + + + + + + + + + + + + + + + + + + + + + +
EspecificacióEstatComentaris
{{SpecName('ES1')}}{{Spec2('ES1')}}Definició inicial. Implementat a JavaScript 1.0.
{{SpecName('ES5.1', '#sec-15.9.5.2', 'Date.prototype.toLocaleTimeString')}}{{Spec2('ES5.1')}} 
{{SpecName('ES6', '#sec-date.prototype.tostring', 'Date.prototype.toString')}}{{Spec2('ES6')}} 
+ +

Compatibilitat amb navegadors

+ +
{{CompatibilityTable}}
+ +
+ + + + + + + + + + + + + + + + + + + + + + + + + + + +
CaracterísticaChromeFirefox (Gecko)Internet ExplorerOperaSafari
Suport bàsic{{CompatVersionUnknown}}{{CompatVersionUnknown}}{{CompatVersionUnknown}}{{CompatVersionUnknown}}{{CompatVersionUnknown}}
Mètode genèric{{CompatUnknown}}{{CompatGeckoDesktop("41")}}{{CompatUnknown}}{{CompatUnknown}}{{CompatUnknown}}
+
+ +
+ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +
CaracterísticaAndroidChrome for AndroidFirefox Mobile (Gecko)IE MobileOpera MobileSafari Mobile
Suport bàsic{{CompatVersionUnknown}}{{CompatVersionUnknown}}{{CompatVersionUnknown}}{{CompatVersionUnknown}}{{CompatVersionUnknown}}{{CompatVersionUnknown}}
Mètode genèric{{CompatUnknown}}{{CompatUnknown}}{{CompatGeckoMobile("41")}}{{CompatUnknown}}{{CompatUnknown}}{{CompatUnknown}}
+
+ +

Vegeu també

+ + diff --git a/files/ca/web/javascript/reference/global_objects/date/totimestring/index.html b/files/ca/web/javascript/reference/global_objects/date/totimestring/index.html new file mode 100644 index 0000000000..aac8de7a85 --- /dev/null +++ b/files/ca/web/javascript/reference/global_objects/date/totimestring/index.html @@ -0,0 +1,115 @@ +--- +title: Date.prototype.toTimeString() +slug: Web/JavaScript/Referencia/Objectes_globals/Date/toTimeString +translation_of: Web/JavaScript/Reference/Global_Objects/Date/toTimeString +--- +
{{JSRef}}
+ +

El mètode toTimeString() retorna la part de temps d'un objecte de tipus {{jsxref("Date")}} formatada de tal forma que és entenible per les persones, utilitzan anglés americà.

+ +

Sintaxi

+ +
objecteData.toTimeString()
+ +

Descripció

+ +

Les instàncies de {{jsxref("Date")}} representen un punt específic en el temps. Una crida al mètode {{jsxref("Date.prototype.toString()", "toString()")}} retornarà la dada en un format entenible per persones, en anglés americà. Al motor SpiderMonkey, aquest format consisteix en la part de la data (dia, mes i any) seguida de la part de l'hora (hores, minuts, segons i zona horària). De vegades és convenient obtenir un string només de la part de l'hora; aquesta és la raó de ser del mètode toTimeString().

+ +

El mètode toTimeString() resulta especialment útil perquè els motors que compleixen amb el standard ECMA-262 poden retornar resultats diferents al string obtingut mitjançant el mètode {{jsxref("Date.prototype.toString()", "toString()")}} en objectes {{jsxref("Date")}}, ja que el format depèn totalment de la implementació; això implica que partir el string per a obtenir només la part de temps pot no produïr un resultat consistent en tots els motors.

+ +

Exemples

+ +

Utilització bàsica de toTimeString()

+ +
var d = new Date(1993, 6, 28, 14, 39, 7);
+
+console.log(d.toString());     // escriu Wed Jul 28 1993 14:39:07 GMT-0600 (PDT)
+console.log(d.toTimeString()); // escriu 14:39:07 GMT-0600 (PDT)
+
+ +

Especificacions

+ + + + + + + + + + + + + + + + + + + + + + + + +
EspecificacióEstatComentaris
{{SpecName('ES3')}}{{Spec2('ES3')}}Definició inicial.
{{SpecName('ES5.1', '#sec-15.9.5.4', 'Date.prototype.toTimeString')}}{{Spec2('ES5.1')}} 
{{SpecName('ES6', '#sec-date.prototype.totimestring', 'Date.prototype.toTimeString')}}{{Spec2('ES6')}} 
+ +

Compatibilitat amb navegadors

+ +
{{CompatibilityTable}}
+ +
+ + + + + + + + + + + + + + + + + + + +
CaracterísticaChromeFirefox (Gecko)Internet ExplorerOperaSafari
Suport bàsic{{CompatVersionUnknown}}{{CompatVersionUnknown}}{{CompatVersionUnknown}}{{CompatVersionUnknown}}{{CompatVersionUnknown}}
+
+ +
+ + + + + + + + + + + + + + + + + + + + + +
CaracterísticaAndroidChrome for AndroidFirefox Mobile (Gecko)IE MobileOpera MobileSafari Mobile
Suport bàsic{{CompatVersionUnknown}}{{CompatVersionUnknown}}{{CompatVersionUnknown}}{{CompatVersionUnknown}}{{CompatVersionUnknown}}{{CompatVersionUnknown}}
+
+ +

Vegeu també

+ + diff --git a/files/ca/web/javascript/reference/global_objects/date/utc/index.html b/files/ca/web/javascript/reference/global_objects/date/utc/index.html new file mode 100644 index 0000000000..37bb2bc369 --- /dev/null +++ b/files/ca/web/javascript/reference/global_objects/date/utc/index.html @@ -0,0 +1,142 @@ +--- +title: Date.UTC() +slug: Web/JavaScript/Referencia/Objectes_globals/Date/UTC +translation_of: Web/JavaScript/Reference/Global_Objects/Date/UTC +--- +
{{JSRef}}
+ +

El mètode Date.UTC() accepta els mateixos paràmetres que la forma més llarga del constructor, i retorna en un objecte de tipus {{jsxref("Date")}} el nombre de milisegons que han passat des de l'u de gener de 1970 a les 00:00:00, temps universal.

+ +

Sintaxi

+ +
Date.UTC(any, mes[, dia[, hora[, minuts[, segons[, milisegons]]]]])
+ +

Paràmetres

+ +
+
any
+
Un any major que 1900.
+
mes
+
Un nombre sencer entre 0 i 11 que representa el mes.
+
dia
+
Opcional. Un nombre sencer entre 1 i 31 que representa el dia del mes.
+
hora
+
Opcional. Un nombre sencer entre 0 i 23 que representa l'hora.
+
minuts
+
Opcional. Un nombre sencer entre 0 i 59 que representa els minuts.
+
segons
+
Opcional. Un nombre sencer entre 0 i 59 que representa els segons.
+
milisegons
+
Opcional. Un nombre sencer entre 0 i 999 que representa els milisegons.
+
+ +

Descripció

+ +

UTC() accepta una data en forma de paràmetres separats per comes i retorna el nombre de milisegons que han passat entre l'u de gener de 1970 a les 00:00:00 en temps universal, i el temps especificat pels paràmetres.

+ +

L'any ha de ser especificat plenament; per exemple, 1998. Si s'especifica un any entre 0 i 99, el mètode el converteix a un any del segle 20 (1900 + any); per exemple, si s'especifica 95, s'emprarà l'any 1995.

+ +

El mètode UTC() es diferencia del constructor {{jsxref("Date")}} en dues coses.

+ + + +

Si es passa un paràmetre que està fora del rang esperat, el mètode UTC() actualitza els altres paràmetres per a acceptar el nombre. Per exemple, si es passa 15 com a mes, l'any serà incrementat en 1 (any + 1), i s'emprarà 3 com a mes.

+ +

Com que UTC() és un mètode estàtic de {{jsxref("Date")}}, sempre es crida com a Date.UTC() en comptes de com un mètode d'una instància de {{jsxref("Date")}}.

+ +

Exemples

+ +

Utilitzar Date.UTC()

+ +

La instrucció següent crea un objecte {{jsxref("Date")}} utilitzant temps UTC en comptes del temps local:

+ +
var dataUTC = new Date(Date.UTC(96, 11, 1, 0, 0, 0));
+
+ +

Especificacions

+ + + + + + + + + + + + + + + + + + + + + + + + +
EspecificacióEstatComentaris
{{SpecName('ES6', '#sec-date.utc', 'Date.UTC')}}{{Spec2('ES6')}} 
{{SpecName('ES5.1', '#sec-15.9.4.3', 'Date.UTC')}}{{Spec2('ES5.1')}} 
{{SpecName('ES1')}}{{Spec2('ES1')}}Definició inicial. Implementat a JavaScript 1.0.
+ +

Compatibilitat amb navegadors

+ +
{{CompatibilityTable}}
+ +
+ + + + + + + + + + + + + + + + + + + +
CaracterísicaChromeFirefox (Gecko)Internet ExplorerOperaSafari
Suport bàsic{{CompatVersionUnknown}}{{CompatVersionUnknown}}{{CompatVersionUnknown}}{{CompatVersionUnknown}}{{CompatVersionUnknown}}
+
+ +
+ + + + + + + + + + + + + + + + + + + + + +
CaracterísicaAndroidChrome for AndroidFirefox Mobile (Gecko)IE MobileOpera MobileSafari Mobile
Suport bàsic{{CompatUnknown}}{{CompatUnknown}}{{CompatUnknown}}{{CompatUnknown}}{{CompatUnknown}}{{CompatUnknown}}
+
+ +

Vegeu també

+ + diff --git a/files/ca/web/javascript/reference/global_objects/date/valueof/index.html b/files/ca/web/javascript/reference/global_objects/date/valueof/index.html new file mode 100644 index 0000000000..6c5f810ead --- /dev/null +++ b/files/ca/web/javascript/reference/global_objects/date/valueof/index.html @@ -0,0 +1,118 @@ +--- +title: Date.prototype.valueOf() +slug: Web/JavaScript/Referencia/Objectes_globals/Date/valueOf +translation_of: Web/JavaScript/Reference/Global_Objects/Date/valueOf +--- +
{{JSRef}}
+ +

El mètode valueOf() retorna el valor primitiu d'un objecte de tipus {{jsxref("Date")}}.

+ +

Sintaxi

+ +
dateObj.valueOf()
+ +

Paràmetres

+ +

Cap.

+ +

Descripció

+ +

El mètode valueOf() retorna el valor primitiu d'un objecte de tipus {{jsxref("Date")}} en forma de nombre, el nombre de milisegons des de la mitjanit de l'ú de gener de 1970 UTC.

+ +

Aquest mètode és funcionalment equivalent al mètode {{jsxref("Date.prototype.getTime()")}}.

+ +

Aquest mètode és tot sovint emprat internament per JavaScript i no explícitament en codi.

+ +

Exemples

+ +

Utilitzar valueOf()

+ +
var x = new Date(56, 6, 17);
+var myVar = x.valueOf();      // assigna -424713600000 a myVar
+
+ +

Especificacions

+ + + + + + + + + + + + + + + + + + + + + + + + +
EspecificacióEstatComentaris
{{SpecName('ES1')}}{{Spec2('ES1')}}Definició inicial. Implementat a JavaScript 1.1.
{{SpecName('ES5.1', '#sec-15.9.5.8', 'Date.prototype.valueOf')}}{{Spec2('ES5.1')}} 
{{SpecName('ES6', '#sec-date.prototype.valueof', 'Date.prototype.valueOf')}}{{Spec2('ES6')}} 
+ +

Compatibilitat amb navegadors

+ +
{{CompatibilityTable}}
+ +
+ + + + + + + + + + + + + + + + + + + +
CaracterísticaChromeFirefox (Gecko)Internet ExplorerOperaSafari
Suport bàsic{{CompatVersionUnknown}}{{CompatVersionUnknown}}{{CompatVersionUnknown}}{{CompatVersionUnknown}}{{CompatVersionUnknown}}
+
+ +
+ + + + + + + + + + + + + + + + + + + + + +
CaracterísticaAndroidChrome for AndroidFirefox Mobile (Gecko)IE MobileOpera MobileSafari Mobile
Suport bàsic{{CompatVersionUnknown}}{{CompatVersionUnknown}}{{CompatVersionUnknown}}{{CompatVersionUnknown}}{{CompatVersionUnknown}}{{CompatVersionUnknown}}
+
+ +

Vegeu també

+ + diff --git a/files/ca/web/javascript/reference/global_objects/error/columnnumber/index.html b/files/ca/web/javascript/reference/global_objects/error/columnnumber/index.html new file mode 100644 index 0000000000..377c797cd3 --- /dev/null +++ b/files/ca/web/javascript/reference/global_objects/error/columnnumber/index.html @@ -0,0 +1,83 @@ +--- +title: Error.prototype.columnNumber +slug: Web/JavaScript/Referencia/Objectes_globals/Error/columnNumber +translation_of: Web/JavaScript/Reference/Global_Objects/Error/columnNumber +--- +
{{JSRef("Global_Objects", "Error", "EvalError,InternalError,RangeError,ReferenceError,SyntaxError,TypeError,URIError")}} {{non-standard_header}}
+ +

Resum

+ +

La propietat columnNumber conté el nombre de la columna dins la línia del fitxer on s'ha produit l'error.

+ +

Exemples

+ +

Exemple: Utilitzar columnNumber

+ +
var e = new Error('Error interpretant les dades');
+throw e;
+console.log(e.columnNumber) // 0
+
+ +

Especificacions

+ +

No forma part de cap especificació. No és standard.

+ +

Compatibilitat amb navegadors

+ +
{{CompatibilityTable}}
+ +
+ + + + + + + + + + + + + + + + + + + +
CaracterísticaChromeFirefox (Gecko)Internet ExplorerOperaSafari
Suport bàsic{{CompatNo}}{{CompatVersionUnknown}}{{CompatNo}}{{CompatNo}}{{CompatNo}}
+
+ +
+ + + + + + + + + + + + + + + + + + + + + +
CaracterísticaAndroidChrome for AndroidFirefox Mobile (Gecko)IE MobileOpera MobileSafari Mobile
Suport bàsic{{CompatNo}}{{CompatNo}}{{CompatVersionUnknown}}{{CompatNo}}{{CompatNo}}{{CompatNo}}
+
+ +

Vegeu també

+ + diff --git a/files/ca/web/javascript/reference/global_objects/error/filename/index.html b/files/ca/web/javascript/reference/global_objects/error/filename/index.html new file mode 100644 index 0000000000..dcca532f86 --- /dev/null +++ b/files/ca/web/javascript/reference/global_objects/error/filename/index.html @@ -0,0 +1,87 @@ +--- +title: Error.prototype.fileName +slug: Web/JavaScript/Referencia/Objectes_globals/Error/fileName +translation_of: Web/JavaScript/Reference/Global_Objects/Error/fileName +--- +
{{JSRef("Global_Objects", "Error", "EvalError,InternalError,RangeError,ReferenceError,SyntaxError,TypeError,URIError")}} {{non-standard_header}}
+ +

Resum

+ +

La propietat fileName conté la ruta al fitxer que ha provocat aquest error.

+ +

Descripció

+ +

Aquesta propietat no standard conté la ruta al fitxer que ha provocat l'error. Si es crida des d'un contexte de depuració, com ara des de Firefox Developer Tools, retorna "debugger eval code".

+ +

Exemples

+ +

Exemple: Utilitzar fileName

+ +
var e = new Error('Dades no tractades');
+throw e;
+// e.fileName podria contrindre quelcom semblant a "file:///C:/example.html"
+
+ +

Especificacions.

+ +

No format part de cap especificació. No és standard.

+ +

Compatibilitat amb navegadors

+ +
{{CompatibilityTable}}
+ +
+ + + + + + + + + + + + + + + + + + + +
CaracterísticaChromeFirefox (Gecko)Internet ExplorerOperaSafari
Suport bàsic{{CompatNo}}{{CompatVersionUnknown}}{{CompatNo}}{{CompatNo}}{{CompatNo}}
+
+ +
+ + + + + + + + + + + + + + + + + + + + + +
CaracterísticaAndroidChrome for AndroidFirefox Mobile (Gecko)IE MobileOpera MobileSafari Mobile
Suport bàsic{{CompatNo}}{{CompatNo}}{{CompatVersionUnknown}}{{CompatNo}}{{CompatNo}}{{CompatNo}}
+
+ +

Vegeu també

+ + diff --git a/files/ca/web/javascript/reference/global_objects/error/index.html b/files/ca/web/javascript/reference/global_objects/error/index.html new file mode 100644 index 0000000000..2e1592edc5 --- /dev/null +++ b/files/ca/web/javascript/reference/global_objects/error/index.html @@ -0,0 +1,224 @@ +--- +title: Error +slug: Web/JavaScript/Referencia/Objectes_globals/Error +translation_of: Web/JavaScript/Reference/Global_Objects/Error +--- +
{{JSRef}}
+ +

Resum

+ +

El constructor Error crea un objecte que representa un error. Quan succeeix un error en temps d'execució JavaScript llença una instància de tipus Error. L'objecte Error també es pot emprar com a objecte base per a excepcions definides per l'usuari. Vegeu més abaix per a tipus d'errors standard que forment part del nucli.

+ +

Sintaxi

+ +
new Error([missatge[, fitxer[, numeroLinia]]])
+ +

Paràmetres

+ +
+
missatge
+
Opcional. Descripció entenible per persones de l'error.
+
fitxer {{non-standard_inline}}
+
Opcional. El valor de la propietat fitxer a l'objecte Error creat. Per defecte pren el valor del nom del fitxer que conté el codi que ha cridat el constructor Error().
+
numeroLinia {{non-standard_inline}}
+
Opcional. El valor de la propietat numeroLinia de l'objecte Error creat. Per defecte rep el valor del número de línia que conté la invocació al constructor Error().
+
+ +

Descripció

+ +

Els errors en temps d'execució esdevenen objectes Error nous que són creats i llençats.

+ +

Aquesta pàgina documenta l'ús de l'objecte Error en si mateix, així com el seu ús com funció constructora. Per a un llistat de les propietats i mètodes heretats per les instàncies de Error, vegeu {{jsxref("Error.prototype")}}.

+ +

Tipus d'errors

+ +

A més del construtor genèric Error hi ha altres sis constructors d'errors que formen part del nucli de JavaScript. Per a excepcions al cantó del client vegeu Sentències manegadores d'excepcions.

+ +
+
{{jsxref("Global_Objects/EvalError", "EvalError")}}
+
Crea una instància que representa un error que succeeix a l'emprar la funció global {{jsxref("Global_Objects/eval", "eval()")}}.
+
{{jsxref("Global_Objects/InternalError", "InternalError")}} {{non-standard_inline}}
+
Crea una instància que representa un error que succeeix quan es llença un error intern des del motor de JavaScript. Per exemple: "massa recursivitat".
+
{{jsxref("Global_Objects/RangeError", "RangeError")}}
+
Crea una instància que representa un error que succeeix quan una variable numèrica o paràmetre està fora del seu rang vàlid.
+
{{jsxref("Global_Objects/ReferenceError", "ReferenceError")}}
+
Crea una instància que representa un error que succeeix quan es deixa de referenciar una referència invàlida.
+
{{jsxref("Global_Objects/SyntaxError", "SyntaxError")}}
+
Crea una instància que representa un error de sintaxi que succeeix a l'interpretar codi dins {{jsxref("Global_Objects/eval", "eval()")}}.
+
{{jsxref("Global_Objects/TypeError", "TypeError")}}
+
Crea una instància que representa un error que succeeix quan una variable o paràmetre és d'un tipus no vàlid.
+
{{jsxref("Global_Objects/URIError", "URIError")}}
+
Crea un error que representa un error que succeeix quan {{jsxref("Global_Objects/encodeURI", "encodeURI()")}} o {{jsxref("Global_Objects/decodeURI", "decodeURl()")}} reben paràmetres invàlids.
+
+ +

Propietats

+ +
+
{{jsxref("Error.prototype")}}
+
Permet afegir propietats a instàncies Error.
+
+ +

Mètodes

+ +

L'objecte global Error no contè mètodes propis. Tot i així, hereta alguns mètodes a través de la cadena de prototipus.

+ +

Instàncies Error

+ +
{{page('ca/docs/JavaScript/Reference/Global_Objects/Error/prototype', 'Descripció')}}
+ +

Propietats

+ +
{{page('ca/docs/JavaScript/Reference/Global_Objects/Error/prototype', 'Propietats')}}
+ +

Mètodes

+ +
{{page('ca/docs/JavaScript/Reference/Global_Objects/Error/prototype', 'Mètodes')}}
+ +

Exemples

+ +

Exemple: Llençar un error genèric

+ +

Normalment hom crea un objecte Error amb la intenció de llençar-lo tot emprant la paraula clau {{jsxref("Statements/throw", "throw")}}. Els errors es poden manegar utilitzant la construcció {{jsxref("Statements/try...catch", "try...catch")}}:

+ +
try {
+  throw new Error('Oooops!');
+} catch (e) {
+  alert(e.name + ': ' + e.message);
+}
+
+ +

Exemple: Manegar un error específic

+ +

this should probably be removedEs pot escollir fer-se càrrec només de tipus d'errors específics comparant el tipus d'error amb la propietat {{jsxref("Object.prototype.constructor", "constructor")}} de l'error o bé, si s'està escrivint el codi per a motors JavaScript moderns, mitjançant la paraula clau {{jsxref("Operators/instanceof", "instanceof")}}:

+ +
try {
+  foo.bar();
+} catch (e) {
+  if (e instanceof EvalError) {
+    alert(e.name + ': ' + e.message);
+  } else if (e instanceof RangeError) {
+    alert(e.name + ': ' + e.message);
+  }
+  // ... etc
+}
+
+ +

Exemple: Tipus d'errors personalitzats

+ +

És possible definir tipus d'errors propis derivats de Error, llençar-los mitjançant throw new MyError()  i utilitzar instanceof MyError per a comprovarel tipus d'error al manegador d'excepcions. A sota trobareu la forma més comuna de fer això.

+ +
+

Advertim que la instància MyError llençada reportarà lineNumber i fileName invàlids, com a mínim a Firefox.

+
+ +

Vegeu també la discussió a StackOverflow "Quina és una bona forma d'extrendre Error a JavaScript?".

+ +
// Crea un nou objecte, que hereta del prototipus constructor Error.
+function MyError(message) {
+  this.name = 'MyError';
+  this.message = message || 'Missatge per defecte';
+}
+MyError.prototype = Object.create(Error.prototype);
+MyError.prototype.constructor = MyError;
+
+try {
+  throw new MyError();
+} catch (e) {
+  console.log(e.name);     // 'MyError'
+  console.log(e.message);  // 'Missatge per defecte'
+}
+
+try {
+  throw new MyError('custom message');
+} catch (e) {
+  console.log(e.name);     // 'MyError'
+  console.log(e.message);  // 'Missatge per defecte'
+}
+
+ +

Especificacions

+ + + + + + + + + + + + + + + + + + + + + + + + +
EspecificacióEstatComentaris
{{SpecName('ES1')}}{{Spec2('ES1')}}Definició inicial. Implementat a JavaScript 1.1.
{{SpecName('ES5.1', '#sec-15.11', 'Error')}}{{Spec2('ES5.1')}} 
{{SpecName('ES6', '#sec-error-objects', 'Error')}}{{Spec2('ES6')}} 
+ +

Compatibilitat amb navegadors

+ +
{{CompatibilityTable}}
+ +
+ + + + + + + + + + + + + + + + + + + +
CaracterísticaChromeFirefox (Gecko)Internet ExplorerOperaSafari
Suport bàsic{{CompatVersionUnknown}}{{CompatVersionUnknown}}{{CompatVersionUnknown}}{{CompatVersionUnknown}}{{CompatVersionUnknown}}
+
+ +
+ + + + + + + + + + + + + + + + + + + + + +
CaracterísticaAndroidChrome for AndroidFirefox Mobile (Gecko)IE MobileOpera MobileSafari Mobile
Suport bàsic{{CompatVersionUnknown}}{{CompatVersionUnknown}}{{CompatVersionUnknown}}{{CompatVersionUnknown}}{{CompatVersionUnknown}}{{CompatVersionUnknown}}
+
+ +

Vegeu també

+ + diff --git a/files/ca/web/javascript/reference/global_objects/error/linenumber/index.html b/files/ca/web/javascript/reference/global_objects/error/linenumber/index.html new file mode 100644 index 0000000000..7b85f29c19 --- /dev/null +++ b/files/ca/web/javascript/reference/global_objects/error/linenumber/index.html @@ -0,0 +1,94 @@ +--- +title: Error.prototype.lineNumber +slug: Web/JavaScript/Referencia/Objectes_globals/Error/lineNumber +translation_of: Web/JavaScript/Reference/Global_Objects/Error/lineNumber +--- +
{{JSRef("Global_Objects", "Error", "EvalError,InternalError,RangeError,ReferenceError,SyntaxError,TypeError,URIError")}} {{non-standard_header}}
+ +

Resum

+ +

La propietat lineNumber conté el nombre de la línia del fitxer que ha llençat aquest erro.

+ +

Exemples

+ +

Exemple: Utilitzar lineNumber

+ +
var e = new Error('No he pogut interpretar l\'entrada');
+throw e;
+console.log(e.lineNumber) // 2
+
+ +

Exemple: Exemple alternatiu usant l'event error

+ +
window.addEventListener('error', function(e) {
+  console.log(e.lineno); // 5
+});
+var e = new Error('No he pogut interpretar l\'entrada');
+throw e;
+
+ +

Això és standard i suportat per Chrome, Firefox i provablement altres.

+ +

Especificacions

+ +

No forma part de cap especificació. No és standard.

+ +

Compatibilitat amb navegadors

+ +
{{CompatibilityTable}}
+ +
+ + + + + + + + + + + + + + + + + + + +
CaracterísticaChromeFirefox (Gecko)Internet ExplorerOperaSafari
Suport bàsicOn error object in handled errors{{CompatVersionUnknown}}{{CompatNo}}{{CompatNo}}{{CompatNo}}
+
+ +
+ + + + + + + + + + + + + + + + + + + + + +
CaracterísticaAndroidChrome for AndroidFirefox Mobile (Gecko)IE MobileOpera MobileSafari Mobile
Suport bàsic{{CompatNo}}{{CompatNo}}{{CompatVersionUnknown}}{{CompatNo}}{{CompatNo}}{{CompatNo}}
+
+ +

Vegeu també

+ + diff --git a/files/ca/web/javascript/reference/global_objects/error/message/index.html b/files/ca/web/javascript/reference/global_objects/error/message/index.html new file mode 100644 index 0000000000..4aa07268fa --- /dev/null +++ b/files/ca/web/javascript/reference/global_objects/error/message/index.html @@ -0,0 +1,110 @@ +--- +title: Error.prototype.message +slug: Web/JavaScript/Referencia/Objectes_globals/Error/message +translation_of: Web/JavaScript/Reference/Global_Objects/Error/message +--- +
{{JSRef("Global_Objects", "Error", "EvalError,InternalError,RangeError,ReferenceError,SyntaxError,TypeError,URIError")}}
+ +

Resum

+ +

La propietat message és una descripció en un format amigable pels humans de l'error.

+ +

Descripció

+ +

Aquesta propietat conté una breu descripció de l'error sempre i quan estigui disponible o hagi sigut assignada. SpiderMonkey fa un ús extensiu de la propietat message per a excepcions. El mètode {{jsxref("Error.prototype.toString()")}} utilitza la propietat message combinada amb la propietat {{jsxref("Error.prototype.name", "name")}} per a crear una representació de l'error.

+ +

Per defecte la propietat message és un string buit, però aquest comportament pot ser sobreescrit per una instàcia simplement passant un missatge com a primer argument del {{jsxref("Error", "constructor Error")}}.

+ +

Exemples

+ +

Exemple: Llençar un error personalitzat

+ +
var e = new Error('No he pogut interpretar l\'entrada'); // e.message valdrà 'No he pogut interpretar l\'entrada'
+throw e;
+
+ +

Especificacions

+ + + + + + + + + + + + + + + + + + + + + + + + +
EspecificacióEstatComentaris
ECMAScript 1a Edició.StandardDefinició inicial.
{{SpecName('ES5.1', '#sec-15.11.4.3', 'Error.prototype.message')}}{{Spec2('ES5.1')}} 
{{SpecName('ES6', '#sec-error.prototype.message', 'Error.prototype.message')}}{{Spec2('ES6')}} 
+ +

Compatibilitat amb navegadors

+ +
{{CompatibilityTable}}
+ +
+ + + + + + + + + + + + + + + + + + + +
CaracterísticaChromeFirefox (Gecko)Internet ExplorerOperaSafari
Suport bàsic{{CompatVersionUnknown}}{{CompatVersionUnknown}}{{CompatVersionUnknown}}{{CompatVersionUnknown}}{{CompatVersionUnknown}}
+
+ +
+ + + + + + + + + + + + + + + + + + + + + +
CaracterísticaAndroidChrome for AndroidFirefox Mobile (Gecko)IE MobileOpera MobileSafari Mobile
Suport bàsic{{CompatVersionUnknown}}{{CompatVersionUnknown}}{{CompatVersionUnknown}}{{CompatVersionUnknown}}{{CompatVersionUnknown}}{{CompatVersionUnknown}}
+
+ +

Vegeu també

+ + diff --git a/files/ca/web/javascript/reference/global_objects/error/name/index.html b/files/ca/web/javascript/reference/global_objects/error/name/index.html new file mode 100644 index 0000000000..995ecafd5f --- /dev/null +++ b/files/ca/web/javascript/reference/global_objects/error/name/index.html @@ -0,0 +1,111 @@ +--- +title: Error.prototype.name +slug: Web/JavaScript/Referencia/Objectes_globals/Error/name +translation_of: Web/JavaScript/Reference/Global_Objects/Error/name +--- +
{{JSRef("Global_Objects", "Error", "EvalError,InternalError,RangeError,ReferenceError,SyntaxError,TypeError,URIError")}}
+ +

Resum

+ +

La propietat name representa un nom per al tipus de error. El valor que rep inicialment aquesta propietat és "Error".

+ +

Descripció

+ +

Per defecte, les instàncies de {{jsxref("Error")}} reben el nom "Error". El mètode Error.prototype.toString() utilitza la propietat name combinada amb la propietat message per a crear una representació de l'error.

+ +

Exemples

+ +

Exemple: Llençar un error personalitzat

+ +
var e = new Error('Entrada no vàlida'); // e.name is 'Error'
+
+e.name = 'ParseError';
+throw e;
+// e.toString() would return 'ParseError: Entrada no vàlida'
+
+ +

Especificacions

+ + + + + + + + + + + + + + + + + + + + + + + + +
EspecificacióEstatComentaris
ECMAScript 1a Edició.StandardDefinició inicial.
{{SpecName('ES5.1', '#sec-15.11.4.2', 'Error.prototype.name')}}{{Spec2('ES5.1')}} 
{{SpecName('ES6', '#sec-error.prototype.name', 'Error.prototype.name')}}{{Spec2('ES6')}} 
+ +

Compatibilitat amb navegadors

+ +
{{CompatibilityTable}}
+ +
+ + + + + + + + + + + + + + + + + + + +
CaracterísticaChromeFirefox (Gecko)Internet ExplorerOperaSafari
Suport bàsic{{CompatVersionUnknown}}{{CompatVersionUnknown}}{{CompatVersionUnknown}}{{CompatVersionUnknown}}{{CompatVersionUnknown}}
+
+ +
+ + + + + + + + + + + + + + + + + + + + + +
CaracterísticaAndroidChrome for AndroidFirefox Mobile (Gecko)IE MobileOpera MobileSafari Mobile
Suport bàsic{{CompatVersionUnknown}}{{CompatVersionUnknown}}{{CompatVersionUnknown}}{{CompatVersionUnknown}}{{CompatVersionUnknown}}{{CompatVersionUnknown}}
+
+ +

Vegeu també

+ + diff --git a/files/ca/web/javascript/reference/global_objects/error/stack/index.html b/files/ca/web/javascript/reference/global_objects/error/stack/index.html new file mode 100644 index 0000000000..aa41949423 --- /dev/null +++ b/files/ca/web/javascript/reference/global_objects/error/stack/index.html @@ -0,0 +1,161 @@ +--- +title: Error.prototype.stack +slug: Web/JavaScript/Referencia/Objectes_globals/Error/Stack +translation_of: Web/JavaScript/Reference/Global_Objects/Error/Stack +--- +
{{JSRef("Global_Objects", "Error", "EvalError,InternalError,RangeError,ReferenceError,SyntaxError,TypeError,URIError")}} {{non-standard_header}}
+ +

Resum

+ +

La propietat no standard stack dels objectes {{jsxref("Error")}} ofereix una traça de quines funcions han estat cridades, en quin ordre, des de quina línia i fitxer, i amb quins arguments. La stack, en forma de string, va de les crides més recent a les més antigues, fins a arribar a la crida original del context global.

+ +

Descripció

+ +

Cada pas estarà separat per una nova línia, on la primera part de cada línia és el nom de la funció (si no es tracta d'una crida des del context global), seguit per pel símbol arroba (@), la ruta del fitxer (excepte quan la funció és la funció constructora de l'error mentre s'està llençant l'error), un punt i coma, i, si hi ha una ruta de fitxer, el nombre de línia. Fixeu-vos que l'objecte {{jsxref("Error")}} també disposa de les propietats filename, lineNumber i columnNumber de l'error llençat (però no de la traça).

+ +

Cal remarcar que aquest és el format utilitzat per Firefox. No hi ha un formateig standard. Tot i així, Safari 6+ i Opera 12- utilitzen un format molt similar. Els navegadors que utilitzen el motor de JavaScript V8 (com ara Chrome, Opera 15+ i el navegador de Android), així com IE10+, d'altra banda, utilitzen un format diferent (vegeu el document de la MSDN error.stack).

+ +

Valors dels arguments a la pila: Abans del ({{bug("744842")}}) de Firefox 14, el nom de la funció anava seguit dels valors dels arguments convertits a string entre parèntesi immediatament abans de l'arroba (@). Un objecte (o un array, etc) apareixeria en la forma convertida "[object Object]", i en conseqüència no podria ser evaluada de nou en objectes. Si que es poden obtenir els valors escalars (tot i que resulta més senzill utilitzar arguments.callee.caller.arguments, així com es pot trobar el nom de la funció a arguments.callee.caller.name). "undefined" apareix com a "(void 0)". Cal tenir en compte que si s'han passat arguments de tipus string que continguin caracters com ara "@", "(", ")" (o bé noms de fitxers), resulta força complicat utiltizar-los per a trencar la línia en les diferents parts que la composen. Degut a això, a partir de Firefox 14 això deixa de ser un problema.

+ +

Exemple

+ +

El següent codi HTML mostra l'ús de la propietat stack.

+ +
<!DOCTYPE HTML>
+<meta charset="UTF-8">
+<title>Exemple de pila de traça</title>
+<body>
+<script>
+function trace() {
+  try {
+    throw new Error('myError');
+  }
+  catch(e) {
+    alert(e.stack);
+  }
+}
+function b() {
+  trace();
+}
+function a() {
+  b(3, 4, '\n\n', undefined, {});
+}
+a('primera crida, primerArgument');
+</script>
+
+ +

Assumint que el codi resideix al fitxer C:\exemple.html en un sistema de fitxers de Windows, aquest generarà un missatge d'alerta amb el text següent:

+ +

A partir de Firefox 30 contindrà el nombre de la columna ({{bug("762556")}}):

+ +
trace@file:///C:/exemple.html:9:17
+b@file:///C:/exemple.html:16:13
+a@file:///C:/exemple.html:19:13
+@file:///C:/exemple.html:21:9
+ +

Firefox 14 a Firefox 29:

+ +
trace@file:///C:/exemple.html:9
+b@file:///C:/exemple.html:16
+a@file:///C:/exemple.html:19
+@file:///C:/exemple.html:21
+ +

Per contra, Firefox 13 i versions prèvies produian el següent text:

+ +
Error("myError")@:0
+trace()@file:///C:/exemple.html:9
+b(3,4,"\n\n",(void 0),[object Object])@file:///C:/exemple.html:16
+a("primera crida, primerArgument")@file:///C:/exemple.html:19
+@file:///C:/exemple.html:21
+ +

Pila de codi evaluat

+ +

A partir de Firefox 30 {{geckoRelease("30")}}, la pila d'error pertanyent a codi dins de crides a Function() i eval() conté informació més detallada sobre la línia i la columna que ha produït l'error dins aquestes crides. Les crides a funcions s'indiquen amb "> Function" i les crides a eval amb "> eval". Vegeu {{bug("332176")}}.

+ +
try {
+  new Function('throw new Error()')();
+} catch (e) {
+  console.log(e.stack);
+}
+
+// anonymous@file:///C:/exemple.html line 7 > Function:1:1
+// @file:///C:/example.html:7:6
+
+
+try {
+  eval("eval('FAIL')");
+} catch (x) {
+  console.log(x.stack);
+}
+
+// @file:///C:/exemple.html line 7 > eval line 1 > eval:1:1
+// @file:///C:/exemple.html line 7 > eval:1:1
+// @file:///C:/exemple.html:7:6
+
+ +

També podeu utilitzar la directiva //# sourceURL per a donar nom a codi eval. Vegeu també Depurar codi eval als documents de Depurar així com en aquesta entrada d'un bloc.

+ +

Especificacions

+ +

No forma part de cap especificació. No és standard.

+ +

Compatibilitat amb navegadors

+ +
{{CompatibilityTable}}
+ +
+ + + + + + + + + + + + + + + + + + + +
CaracterísticaChromeFirefox (Gecko)Internet ExplorerOperaSafari
Suport bàsic{{CompatVersionUnknown}}{{CompatVersionUnknown}}{{CompatIE("10")}}{{CompatVersionUnknown}}{{CompatSafari("6")}}
+
+ +
+ + + + + + + + + + + + + + + + + + + + + +
CaracterísticaAndroidChrome for AndroidFirefox Mobile (Gecko)IE MobileOpera MobileSafari Mobile
Suport bàsicAndroid 4 (potser Android 3, però en cap cas Android 2){{CompatUnknown}}{{CompatUnknown}}{{CompatUnknown}}{{CompatUnknown}}{{CompatSafari("6")}}
+
+ +

Vegeu també

+ + diff --git a/files/ca/web/javascript/reference/global_objects/error/tosource/index.html b/files/ca/web/javascript/reference/global_objects/error/tosource/index.html new file mode 100644 index 0000000000..c766aa312b --- /dev/null +++ b/files/ca/web/javascript/reference/global_objects/error/tosource/index.html @@ -0,0 +1,91 @@ +--- +title: Error.prototype.toSource() +slug: Web/JavaScript/Referencia/Objectes_globals/Error/toSource +translation_of: Web/JavaScript/Reference/Global_Objects/Error/toSource +--- +
{{JSRef}} {{non-standard_header}}
+ +

El mètode toSource() reotrna codi capaç de generar el mateix error en case de ser evaluat.

+ +

Sintaxi

+ +
e.toSource()
+ +

Descripció

+ +

La crida al mètode toSource d'una instància d'{{jsxref("Error")}}(incloent NativeErrors) retorna un string que conté el codi font de l'error. Aquest string pot ser evaluat per a crear un objecte (aproximadament) igual. Per defecte la string contenint el codi font segueix l'estructura del construtor {{jsxref("Error")}}. Per exemple:

+ +
(newname(message ,fileName,lineNumber))
+
+ +

on aquests atributs corresponen a les propietats de la instància de l'error, respectivament.

+ +
+

Advertència: Cal tenir en compte que les propietats utilitzades pel mètode toSource a l'hora de crear l'string són mutables i per tant poden no representar de forma acurada la funció utilitzada per a crear la instància de l'error, el nom del fitxer o el nombre de la línia on l'error real ha tingut lloc.

+
+ +

Especificacions

+ +

No forma part de cap standard. Implementat a JavaScript 1.3.

+ +

Compatibilitat amb navegadors

+ +
{{CompatibilityTable}}
+ +
+ + + + + + + + + + + + + + + + + + + +
CaracterísticaChromeFirefox (Gecko)Internet ExplorerOperaSafari
Suport bàsic{{CompatUnknown}}{{CompatVersionUnknown}}{{CompatUnknown}}{{CompatUnknown}}{{CompatUnknown}}
+
+ +
+ + + + + + + + + + + + + + + + + + + + + +
CaracterísticaAndroidChrome for AndroidFirefox Mobile (Gecko)IE MobileOpera MobileSafari Mobile
Suport bàsic{{CompatUnknown}}{{CompatUnknown}}{{CompatVersionUnknown}}{{CompatUnknown}}{{CompatUnknown}}{{CompatUnknown}}
+
+ +

Vegeu també

+ + diff --git a/files/ca/web/javascript/reference/global_objects/error/tostring/index.html b/files/ca/web/javascript/reference/global_objects/error/tostring/index.html new file mode 100644 index 0000000000..79fd20f77f --- /dev/null +++ b/files/ca/web/javascript/reference/global_objects/error/tostring/index.html @@ -0,0 +1,146 @@ +--- +title: Error.prototype.toString() +slug: Web/JavaScript/Referencia/Objectes_globals/Error/toString +translation_of: Web/JavaScript/Reference/Global_Objects/Error/toString +--- +
{{JSRef("Global_Objects", "Error", "EvalError,InternalError,RangeError,ReferenceError,SyntaxError,TypeError,URIError")}}
+ +

Resum

+ +

El mètode toString() retorna un string que representa l'error especificat per l'objecte {{jsxref("Error")}}.

+ +

Sintaxi

+ +
e.toString()
+ +

Descripció

+ +

L'objecte {{jsxref("Error")}} sobreescriu el mètode {{jsxref("Object.prototype.toString()")}} heretat per tots els objectes. La seva semàntica és la següent (suposant que {{jsxref("Object")}} i {{jsxref("String")}} tenen els seus valors originals):

+ +
Error.prototype.toString = function() {
+  'use strict';
+
+  var obj = Object(this);
+  if (obj !== this) {
+    throw new TypeError();
+  }
+
+  var name = this.name;
+  name = (name === undefined) ? 'Error' : String(name);
+
+  var msg = this.message;
+  msg = (msg === undefined) ? '' : String(msg);
+
+  if (name === '') {
+    return msg;
+  }
+  if (msg === '') {
+    return name;
+  }
+
+  return name + ': ' + msg;
+};
+
+ +

Exemples

+ +
var e = new Error('fatal error');
+print(e.toString()); // 'Error: fatal error'
+
+e.name = undefined;
+print(e.toString()); // 'Error: fatal error'
+
+e.name = '';
+print(e.toString()); // 'fatal error'
+
+e.message = undefined;
+print(e.toString()); // 'Error'
+
+e.name = 'hello';
+print(e.toString()); // 'hello'
+
+ +

Especificacions

+ + + + + + + + + + + + + + + + + + + + + + + + +
EspecificacióEstatComentaris
ECMAScript 1a Edició.StandardDefinició inicial. Implementat a JavaScript 1.1.
{{SpecName('ES5.1', '#sec-15.11.4.4', 'Error.prototype.toString')}}{{Spec2('ES5.1')}} 
{{SpecName('ES6', '#sec-error.prototype.tostring', 'Error.prototype.toString')}}{{Spec2('ES6')}} 
+ +

Compatibilitat amb navegadors

+ +
{{CompatibilityTable}}
+ +
+ + + + + + + + + + + + + + + + + + + +
CaracterísticaChromeFirefox (Gecko)Internet ExplorerOperaSafari
Suport bàsic{{CompatVersionUnknown}}{{CompatVersionUnknown}}{{CompatVersionUnknown}}{{CompatVersionUnknown}}{{CompatVersionUnknown}}
+
+ +
+ + + + + + + + + + + + + + + + + + + + + +
CaracterísticaAndroidChrome for AndroidFirefox Mobile (Gecko)IE MobileOpera MobileSafari Mobile
Suport bàsic{{CompatVersionUnknown}}{{CompatVersionUnknown}}{{CompatVersionUnknown}}{{CompatVersionUnknown}}{{CompatVersionUnknown}}{{CompatVersionUnknown}}
+
+ +

Vegeu també

+ + 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 ---- -
{{JSRef}}
- -

La propietat EvalError.prototype representa el prototip del constructor {{jsxref("EvalError")}}.

- -
{{js_property_attributes(0, 0, 0)}}
- -

Descripció

- -

Totes les instàncies {{jsxref("EvalError")}} hereten de EvalError.prototype. Es pot utilitzar el prototip per afegir propietats o mètodes a totes les instàncies.

- -

Propietats

- -
-
EvalError.prototype.constructor
-
Especifica la funció que ha creat el prototip d'una instància.
-
{{jsxref("Error.prototype.message", "EvalError.prototype.message")}}
-
Missatge d'error. Tot i que l'ECMA-262 especifica que {{jsxref("EvalError")}} hauria de proveir la seva pròpia propietat message, en SpiderMonkey, hereta {{jsxref("Error.prototype.message")}}.
-
{{jsxref("Error.prototype.name", "EvalError.prototype.name")}}
-
Nom de l'error. Heretat de {{jsxref("Error")}}.
-
{{jsxref("Error.prototype.fileName", "EvalError.prototype.fileName")}}
-
Camí cap al fitxer que ha llançat aquest error. Heretat de {{jsxref("Error")}}.
-
{{jsxref("Error.prototype.lineNumber", "EvalError.prototype.lineNumber")}}
-
Número de línia en el fitxer que ha llançat aquest error. Heretat de {{jsxref("Error")}}.
-
{{jsxref("Error.prototype.columnNumber", "EvalError.prototype.columnNumber")}}
-
Número de columna en la línia que ha llançat aquest error. Heretat de {{jsxref("Error")}}.
-
{{jsxref("Error.prototype.stack", "EvalError.prototype.stack")}}
-
Traça de l'error. Heretat de {{jsxref("Error")}}.
-
- -

Mètodes

- -

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.

- -

Especificacions

- - - - - - - - - - - - - - - - - - - - - - - - -
EspecificacióEstatComentaris
{{SpecName('ES3')}}{{Spec2('ES3')}}Definició inicial
{{SpecName('ES5.1', '#sec-15.11.7.6', 'NativeError.prototype')}}{{Spec2('ES5.1')}}Definit com a NativeError.prototype.
{{SpecName('ES6', '#sec-nativeerror.prototype', 'NativeError.prototype')}}{{Spec2('ES6')}}Definit com a NativeError.prototype.
- -

Compatibilitat amb navegadors

- -
{{CompatibilityTable}}
- -
- - - - - - - - - - - - - - - - - - - -
CaracterísticaChromeFirefox (Gecko)Internet ExplorerOperaSafari
Suport bàsic{{CompatVersionUnknown}}{{CompatVersionUnknown}}{{CompatVersionUnknown}}{{CompatVersionUnknown}}{{CompatVersionUnknown}}
-
- -
- - - - - - - - - - - - - - - - - - - - - -
CaracterísticaAndroidChrome per AndroidFirefox Mobile (Gecko)IE MobileOpera MobileSafari Mobile
Suport bàsic{{CompatVersionUnknown}}{{CompatVersionUnknown}}{{CompatVersionUnknown}}{{CompatVersionUnknown}}{{CompatVersionUnknown}}{{CompatVersionUnknown}}
-
- -

Vegeu també

- - diff --git a/files/ca/web/javascript/reference/global_objects/index.html b/files/ca/web/javascript/reference/global_objects/index.html new file mode 100644 index 0000000000..60bd0333f7 --- /dev/null +++ b/files/ca/web/javascript/reference/global_objects/index.html @@ -0,0 +1,167 @@ +--- +title: Objectes Standard +slug: Web/JavaScript/Referencia/Objectes_globals +translation_of: Web/JavaScript/Reference/Global_Objects +--- +
+
{{jsSidebar("Objects")}}
+
+ +

Resum

+ +

Aquest capítol llista tots els objectes que Javascript proporciona per defecte, així com els seus mètodes i propietats.

+ +
+

És important no confondre el terme "objectes globals" (també anomenats objectes standard o built-in) amb objecte global. En aquesta pàgina objecte global es refereix a objectes en l'àmbit global (però només si no s'utilitza el mode estricte de ECMAScript 5! En qualsevol altre cas retorna undefined). Es pot accedir a l'objecte global en si mateix mitjançant l'operador {{jsxref("Referencia/Objectes_standard/this", "this")}} en l'àmbit global. De fet l'àmbit global consisteix  en les propietats de l'objecte global (propietats heredades incloses, si s'escau).

+ +

Altres objectes en l'àmbit global són o bé creats per l'script de l'usuari o bé proporcionats per l'aplicació del host. Els objectes proporcionats pel host disponibles en els àmbits del navegador estan documentats a la referència de la API.

+ +

Objectes standard (per categoria)

+ +

Propietats de valor

+ +

Propietats globals que retornen un valor simple.

+ + + +

Funcions globals

+ +

Funcions globals que retornen el resultat d'una rutina específica.

+ + + +

Objectes fonamentals

+ +

Objectes generals del llenguatge, funcions i errors.

+ + + +

Nombres i dates

+ +

Objectes que emmagatzemen nombres, dades i càlculs matemàtics.

+ + + +

Processament de text

+ +

Objectes per manipular text.

+ + + +

Col·leccions indexades

+ +

Col·leccions ordenades per un índex. Objectes de tipus array.

+ + + +

Diccionaris (mapes)

+ +

Col·leccions d'objectes de tipus diccionari (també coneguts com a mapes o col·leccions d'entrades clau-valor). Els elements són iterables per ordre d'inserció.

+ + + +

Dades estructurades

+ +

Buffers de dades i JavaScript Object Notation.

+ + + +

Objectes d'abstracció de control

+ + + +

Reflexió

+ + + +

Internacionalització

+ +

Adicions al nucli de ECMAScript per a funcionalitats sensibles a l'idioma.

+ + + +

Objectes no-standard

+ + + +

Altres

+ + +
+ +

 

diff --git a/files/ca/web/javascript/reference/global_objects/infinity/index.html b/files/ca/web/javascript/reference/global_objects/infinity/index.html new file mode 100644 index 0000000000..409609bfd2 --- /dev/null +++ b/files/ca/web/javascript/reference/global_objects/infinity/index.html @@ -0,0 +1,114 @@ +--- +title: Infinity +slug: Web/JavaScript/Referencia/Objectes_globals/Infinity +translation_of: Web/JavaScript/Reference/Global_Objects/Infinity +--- +
+
+
{{jsSidebar("Objects")}}
+
+
+ +

Resum

+ +

La propietat global Infinity és un valor numèric que representa l'infinit.

+ +

{{js_property_attributes(0,0,0)}}

+ +

Sintaxi

+ +
Infinity 
+ +

Descripció

+ +

Infinity és una propietat de l'objecte global, és a dir, és una variable dins l'àmbit global.

+ +

El valor inical de Infinity és {{jsxref("Number.POSITIVE_INFINITY")}}. El valor Infinity (infinit positiu) és major que qualsevol altre nombre. Aquest valor es comporta matemàticament com l'infinit; per exemple, qualsevol nombre positiu multiplicat per Infinity dóna com a resultat Infinity, qualsevol valor dividit per Infinity dóna 0.

+ +

Tal i com la especificació ECMAScript 5 defineix, Infinity no pot ser sobreescrit (implementat a JavaScript 1.8.5  / Firefox 4).

+ +

Especificacions

+ + + + + + + + + + + + + + + + + + + + + + + + +
EspecificacionsEstatComentaris
ECMAScript 1a Edició.StandardDefinició inicial. Implementat a JavaScript 1.3
{{SpecName('ES5.1', '#sec-15.1.1.2', 'Infinity')}}{{Spec2('ES5.1')}} 
{{SpecName('ES6', '#sec-value-properties-of-the-global-object-infinity', 'Infinity')}}{{Spec2('ES6')}} 
+ +

Compatibilitat amb navegadors

+ +

{{ CompatibilityTable() }}

+ +
+ + + + + + + + + + + + + + + + + + + +
CaracterísticaChromeFirefox (Gecko)Internet ExplorerOperaSafari
Suport bàsic{{ CompatVersionUnknown() }}{{ CompatVersionUnknown() }}{{ CompatVersionUnknown() }}{{ CompatVersionUnknown() }}{{ CompatVersionUnknown() }}
+
+ +
+ + + + + + + + + + + + + + + + + + + + + +
CaracterísticaAndroidChrome for AndroidFirefox Mobile (Gecko)IE MobileOpera MobileSafari Mobile
Suport bàsic{{ CompatVersionUnknown() }}{{ CompatVersionUnknown() }}{{ CompatVersionUnknown() }}{{ CompatVersionUnknown() }}{{ CompatVersionUnknown() }}{{ CompatVersionUnknown() }}
+
+ +

Vegeu també

+ + diff --git a/files/ca/web/javascript/reference/global_objects/json/index.html b/files/ca/web/javascript/reference/global_objects/json/index.html new file mode 100644 index 0000000000..efc86409e6 --- /dev/null +++ b/files/ca/web/javascript/reference/global_objects/json/index.html @@ -0,0 +1,242 @@ +--- +title: JSON +slug: Web/JavaScript/Referencia/Objectes_globals/JSON +translation_of: Web/JavaScript/Reference/Global_Objects/JSON +--- +
{{JSRef("Global_Objects", "JSON")}}
+ +

Resum

+ +

L'objecte JSON conté mètodes per a interpretar JavaScript Object Notation ({{glossary("JSON")}}) i convertir valors a JSON. Aquest objecte no pot ser cridat o construit, i a banda dels seus dos mètodes no té cap més funcionalitat o interès.

+ +

and converting values to JSON. It can't be called or constructed, and aside from its two method properties it has no interesting functionality of its own.

+ +

Descripció

+ +

JavaScript Object Notation

+ +

JSON és una sintaxi que permet serialitzar objectes, arrays, nombres, strings, booleans i {{jsxref("null")}}. Està basada en la sintaxi de JavaScript però és diferent: algunes parts de JavaScript no són convertibles a JSON i algunes de JSON no ho són a JavaScript. Vegeu també JSON: El subconjunt de JavaScript que no ho és.

+ + + + + + + + + + + + + + + + + + + + + + + +
Diferències entre JavaScript i JSON
Tipus a JavaScriptDiferències a JSON
Objectes i ArraysEls noms de les propietats han de estar embolcallats per cometes dobles; les cometes simples estan prohibides
NombresNo són permesos zeros a l'esquerra; els nombres decimals separent la part sencera amb un punt i han de tindre al menys un digit decimal.
Strings +

Només es pot escapar un grup limitat de caràcters; alguns caràcters de control no són permesos; el separador de línies Unicode (U+2028) i el separador de paràgrafs (U+2029) són permesos; les strings han d'estar embolcallades per cometes dobles. Vegeu l'exemple següent on {{jsxref("JSON.parse()")}} funciona correctament i es llença un {{jsxref("SyntaxError")}} a l'avaluar el codi com a JavaScript:

+ +
+var code = '"\u2028\u2029"';
+JSON.parse(code); // funciona correctament
+eval(code); // falla
+
+
+ +

La sintaxi completa de JSON és la següent:

+ +
JSON = null
+    o true o false
+    o JSONNumber
+    o JSONString
+    o JSONObject
+    o JSONArray
+
+JSONNumber = - PositiveNumber
+          o PositiveNumber
+PositiveNumber = DecimalNumber
+              o DecimalNumber . Digits
+              o DecimalNumber . Digits ExponentPart
+              o DecimalNumber ExponentPart
+DecimalNumber = 0
+             o OneToNine Digits
+ExponentPart = e Exponent
+            o E Exponent
+Exponent = Digits
+        o + Digits
+        o - Digits
+Digits = Digit
+      o Digits Digit
+Digit = 0 through 9
+OneToNine = 1 through 9
+
+JSONString = ""
+          o " StringCharacters "
+StringCharacters = StringCharacter
+                o StringCharacters StringCharacter
+StringCharacter = qualsevol caràcter excepte
+                  " o \ o U+0000 fins a U+001F
+               o EscapeSequence
+EscapeSequence = \" o \/ o \\ o \b o \f o \n o \r o \t
+              o \u HexDigit HexDigit HexDigit HexDigit
+HexDigit = 0 fins a 9
+        o A fins a F
+        o a fins a f
+
+JSONObject = { }
+          o { Members }
+Members = JSONString : JSON
+       o Members , JSONString : JSON
+
+JSONArray = [ ]
+         o [ ArrayElements ]
+ArrayElements = JSON
+             o ArrayElements , JSON
+
+ +

Pot haver-hi espais en blanc sense significat a qualsevol lloc excepte dins un JSONNumber (el nombres no poden contenir espais) o JSONString (on s'interpreta com el caràcter corrsponen dins l'string, o causaria un error). Els caràcters tabulador (U+0009), retorn de carro (U+000D), nova línia (U+000A), i l'espai (U+0020) són els únics caràcters d'espai en blanc acceptats.

+ +

Mètodes

+ +
+
{{jsxref("JSON.parse()")}}
+
Interpreta una string com a JSON, opcionalment transforma el valor produït i les seves propietats, i retorna el valor.
+
{{jsxref("JSON.stringify()")}}
+
Retorna un JSON string corresponent al valor especificat, opcionalment només inclou determinades propietats o reemplaça el valor de propietats tal i com defineixi l'usuari.
+
+ +

Polyfill

+ +

L'objecte JSON no és suportat a navegadors antics. Aquest problema pot solventar-se insertant el codi següent al principi dels scripts, permetent l'ús de l'objecte JSON en implementacions on no hi ha suport natiu (com ara Internet Explorer 6).

+ +

El següent algorisme emula l'objecte JSON natiu:

+ +
if (!window.JSON) {
+  window.JSON = {
+    parse: function(sJSON) { return eval('(' + sJSON + ')'); },
+    stringify: (function () {
+      var toString = Object.prototype.toString;
+      var isArray = Array.isArray || function (a) { return toString.call(a) === '[object Array]'; };
+      var escMap = {'"': '\\"', '\\': '\\\\', '\b': '\\b', '\f': '\\f', '\n': '\\n', '\r': '\\r', '\t': '\\t'};
+      var escFunc = function (m) { return escMap[m] || '\\u' + (m.charCodeAt(0) + 0x10000).toString(16).substr(1); };
+      var escRE = /[\\"\u0000-\u001F\u2028\u2029]/g;
+      return function stringify(value) {
+        if (value == null) {
+          return 'null';
+        } else if (typeof value === 'number') {
+          return isFinite(value) ? value.toString() : 'null';
+        } else if (typeof value === 'boolean') {
+          return value.toString();
+        } else if (typeof value === 'object') {
+          if (typeof value.toJSON === 'function') {
+            return stringify(value.toJSON());
+          } else if (isArray(value)) {
+            var res = '[';
+            for (var i = 0; i < value.length; i++)
+              res += (i ? ', ' : '') + stringify(value[i]);
+            return res + ']';
+          } else if (toString.call(value) === '[object Object]') {
+            var tmp = [];
+            for (var k in value) {
+              if (value.hasOwnProperty(k))
+                tmp.push(stringify(k) + ': ' + stringify(value[k]));
+            }
+            return '{' + tmp.join(', ') + '}';
+          }
+        }
+        return '"' + value.toString().replace(escRE, escFunc) + '"';
+      };
+    })()
+  };
+}
+
+ +

Dos polyfills complexos coneguts per a l'objecte JSON són JSON2 i JSON3.

+ +

Especificacions

+ + + + + + + + + + + + + + + + + + + +
EspecificacióEstatComentaris
{{SpecName('ES5.1', '#sec-15.12', 'JSON')}}{{Spec2('ES5.1')}} 
{{SpecName('ES6', '#sec-json-object', 'JSON')}}{{Spec2('ES6')}} 
+ +

Compatibilitat amb navegadors

+ +
{{CompatibilityTable}}
+ +
+ + + + + + + + + + + + + + + + + + + +
CaracterísticaChromeFirefox (Gecko)Internet ExplorerOperaSafari
Suport bàsic{{CompatVersionUnknown}}{{CompatGeckoDesktop("1.9.1")}}{{CompatIE("8.0")}}{{CompatOpera("10.5")}}{{CompatSafari("4.0")}}
+
+ +
+ + + + + + + + + + + + + + + + + + + + + +
CaracterísticaAndroidChrome for AndroidFirefox Mobile (Gecko)IE MobileOpera MobileSafari Mobile
Suport bàsic{{CompatVersionUnknown}}{{CompatVersionUnknown}}{{CompatGeckoMobile("1.0")}}{{CompatVersionUnknown}}{{CompatVersionUnknown}}{{CompatVersionUnknown}}
+
+ +

Basat en la taula de compatibilitat de Kangax.

+ +

Vegeu també

+ + diff --git a/files/ca/web/javascript/reference/global_objects/map/clear/index.html b/files/ca/web/javascript/reference/global_objects/map/clear/index.html new file mode 100644 index 0000000000..f29cc93eef --- /dev/null +++ b/files/ca/web/javascript/reference/global_objects/map/clear/index.html @@ -0,0 +1,104 @@ +--- +title: Map.prototype.clear() +slug: Web/JavaScript/Referencia/Objectes_globals/Map/clear +translation_of: Web/JavaScript/Reference/Global_Objects/Map/clear +--- +
{{JSRef}}
+ +

El mètode clear() esborra tots els elements d'un objecte de tipus Map.

+ +

Sintaxi

+ +
myMap.clear();
+ +

Exemples

+ +

Utilitzar el mètode clear

+ +
var myMap = new Map();
+myMap.set("bar", "baz");
+myMap.set(1, "foo");
+
+myMap.size;       // 2
+myMap.has("bar"); // true
+
+myMap.clear();
+
+myMap.size;       // 0
+myMap.has("bar")  // false
+
+ +

Especificacions

+ + + + + + + + + + + + + + +
EspecificacióEstatComentaris
{{SpecName('ES6', '#sec-map.prototype.clear', 'Map.prototype.clear')}}{{Spec2('ES6')}}Definició inicial.
+ +

Compatibilitat amb navegadors

+ +

{{CompatibilityTable}}

+ +
+ + + + + + + + + + + + + + + + + + + +
CaracterísticaChromeFirefox (Gecko)Internet ExplorerOperaSafari
Suport bàsic38{{CompatGeckoDesktop("19.0")}}11257.1
+
+ +
+ + + + + + + + + + + + + + + + + + + + + +
CaracterísticaAndroidChrome for AndroidFirefox Mobile (Gecko)IE MobileOpera MobileSafari Mobile
Suport bàsic{{CompatNo}}38{{CompatGeckoMobile("19.0")}}{{CompatNo}}{{CompatNo}}8
+
+ +

Vegeu també

+ + diff --git a/files/ca/web/javascript/reference/global_objects/map/delete/index.html b/files/ca/web/javascript/reference/global_objects/map/delete/index.html new file mode 100644 index 0000000000..01c1b2cf28 --- /dev/null +++ b/files/ca/web/javascript/reference/global_objects/map/delete/index.html @@ -0,0 +1,109 @@ +--- +title: Map.prototype.delete() +slug: Web/JavaScript/Referencia/Objectes_globals/Map/delete +translation_of: Web/JavaScript/Reference/Global_Objects/Map/delete +--- +
{{JSRef}}
+ +

El mètode delete() elimina l'element especificat de l'objecte Map.

+ +

Sintaxi

+ +
myMap.delete(clau);
+ +

Paràmetres

+ +
+
clau
+
Necessari. La clau de l'element a eliminar de l'objecte Map.
+
+ +

valor Return

+ +

Retorna true si un element de l'objecte Map s'ha eleminat amb èxit.

+ +

Exemples

+ +

Utilitzar el mètode delete

+ +
var myMap = new Map();
+myMap.set("bar", "foo");
+
+myMap.delete("bar"); // Retorna true. Eliminat satisfactòriament.
+myMap.has("bar");    // Retorna false. L'element "bar" ja no és present.
+
+ +

Especificacions

+ + + + + + + + + + + + + + +
EspecificacióEstatComentaris
{{SpecName('ES6', '#sec-map.prototype.delete', 'Map.prototype.delete')}}{{Spec2('ES6')}}Definició inicial.
+ +

Compatibilitat amb navegadors

+ +

{{CompatibilityTable}}

+ +
+ + + + + + + + + + + + + + + + + + + +
CaracterísticaChromeFirefox (Gecko)Internet ExplorerOperaSafari
Suport bàsic38{{CompatGeckoDesktop("13.0")}}11257.1
+
+ +
+ + + + + + + + + + + + + + + + + + + + + +
CaracterísticaAndroidChrome per AndroidFirefox Mobile (Gecko)IE MobileOpera MobileSafari Mobile
Suport bàsic{{CompatNo}}38{{CompatGeckoMobile("13.0")}}{{CompatNo}}{{CompatNo}}8
+
+ +

Vegeu també

+ + diff --git a/files/ca/web/javascript/reference/global_objects/map/entries/index.html b/files/ca/web/javascript/reference/global_objects/map/entries/index.html new file mode 100644 index 0000000000..d5f6942695 --- /dev/null +++ b/files/ca/web/javascript/reference/global_objects/map/entries/index.html @@ -0,0 +1,104 @@ +--- +title: Map.prototype.entries() +slug: Web/JavaScript/Referencia/Objectes_globals/Map/entries +translation_of: Web/JavaScript/Reference/Global_Objects/Map/entries +--- +
{{JSRef}}
+ +

El mètode entries()retorna un nou objecte Iterator que conté la parella [clau, valor] per cadascun dels elements de l'objecte Map en l'ordre d'inserció.

+ +

Sintaxi

+ +
myMap.entries()
+ +

Exemples

+ +

Utilitzar entries()

+ +
var myMap = new Map();
+myMap.set("0", "foo");
+myMap.set(1, "bar");
+myMap.set({}, "baz");
+
+var mapIter = myMap.entries();
+
+console.log(mapIter.next().value); // ["0", "foo"]
+console.log(mapIter.next().value); // [1, "bar"]
+console.log(mapIter.next().value); // [Object, "baz"]
+
+ +

Especificacions

+ + + + + + + + + + + + + + +
EspecificacióEstatComentaris
{{SpecName('ES6', '#sec-map.prototype.entries', 'Map.prototype.entries')}}{{Spec2('ES6')}}Definició inicial.
+ +

Compatibilitat amb navegadors

+ +

{{CompatibilityTable}}

+ +
+ + + + + + + + + + + + + + + + + + + +
CaracterísticaChromeFirefox (Gecko)Internet ExplorerOperaSafari
Suport bàsic38{{ CompatGeckoDesktop("20") }}{{CompatNo}}257.1
+
+ +
+ + + + + + + + + + + + + + + + + + + + + +
CaracterísticaAndroidChrome per AndroidFirefox Mobile (Gecko)IE MobileOpera MobileSafari Mobile
Suport bàsic{{CompatNo}}38{{CompatGeckoMobile("20")}}{{CompatNo}}{{CompatNo}}8
+
+ +

Vegeu també

+ + diff --git a/files/ca/web/javascript/reference/global_objects/map/foreach/index.html b/files/ca/web/javascript/reference/global_objects/map/foreach/index.html new file mode 100644 index 0000000000..7097bbee3d --- /dev/null +++ b/files/ca/web/javascript/reference/global_objects/map/foreach/index.html @@ -0,0 +1,136 @@ +--- +title: Map.prototype.forEach() +slug: Web/JavaScript/Referencia/Objectes_globals/Map/forEach +translation_of: Web/JavaScript/Reference/Global_Objects/Map/forEach +--- +
{{JSRef}}
+ +

El mètode forEach() executa la funció proporcionada un cop epr cada parell clau/valor dins l'objecte Map, seguint l'ordre en el que han estat inserits.

+ +

Sintaxi

+ +
myMap.forEach(callback[, thisArg])
+ +

Paràmetres

+ +
+
callback
+
Funció a executar per a cada element.
+
thisArg
+
Valor a utilitzar com a this mentre s'estigui executant executing callback.
+
+ +

Descripció

+ +

El mètode forEach executa la funció callback  proporcionada un cop per a cada clau que existeixi dins el mapa. No s'invocarà la funció per a claus que hagin estat esborrades. Tanmateix si que s'executarà per a valors amb clau present però que el seu valor sigui undefined.

+ +

callback s'invocarà amb tres arguments:

+ + + +

Si es proporciona el paràmetre thisArg a la crida de forEach, aquest es passarà a callback quan s'invoqui per a ser utilitzat com a this dins la funció.  En qualsevol altre cas el valor que rebrà this dins la funció callback serà undefined. El valor de this que serà finalment observable dins de callback és determinat d'acord a les regles habituals per a determinar el valor de this observat dins d'una funció.

+ +

Cada valor serà visitat un cop, a no ser que hagi estat eliminat o tornar a afegir abans que el mètode forEach acabi. No s'invocarà callback per a valors eliminats abans de ser visitats. Si que es visitaran, però, valors nous afegits abans forEach no hagi acabat.

+ +

forEach executa la funció callback un cop per cada element de l'objecte Map; no retorna cap valor.

+ +

Exemples

+ +

Mostrar els continguts d'un objecte Map

+ +

El codi següent mostra una línia per cada element d'un objecte Map:

+ +
function logMapElements(value, key, map) {
+    console.log("m[" + key + "] = " + value);
+}
+Map([["foo", 3], ["bar", {}], ["baz", undefined]]).forEach(logMapElements);
+// mostra:
+// "m[foo] = 3"
+// "m[bar] = [object Object]"
+// "m[baz] = undefined"
+
+ +

Especificacions

+ + + + + + + + + + + + + + + + + + + +
EspecificacióEstatComentaris
{{SpecName('ES6', '#sec-map.prototype.foreach', 'Map.prototype.forEach')}}{{Spec2('ES6')}}Definició inicial.
{{SpecName('ESDraft', '#sec-map.prototype.foreach', 'Map.prototype.forEach')}}{{Spec2('ESDraft')}} 
+ +

Compatibilitat amb navegadors

+ +

{{CompatibilityTable}}

+ +
+ + + + + + + + + + + + + + + + + + + +
CaracterísticaChromeFirefox (Gecko)Internet ExplorerOperaSafari
Suport bàsic38{{CompatGeckoDesktop("25.0")}}11257.1
+
+ +
+ + + + + + + + + + + + + + + + + + + + + +
CaracterísticaAndroidChrome for AndroidFirefox Mobile (Gecko)IE MobileOpera MobileSafari Mobile
Suport bàsic{{CompatNo}}38{{CompatGeckoMobile("25.0")}}{{CompatNo}}{{CompatNo}}8
+
+ +

Vegeu també

+ + diff --git a/files/ca/web/javascript/reference/global_objects/map/get/index.html b/files/ca/web/javascript/reference/global_objects/map/get/index.html new file mode 100644 index 0000000000..ec345df059 --- /dev/null +++ b/files/ca/web/javascript/reference/global_objects/map/get/index.html @@ -0,0 +1,116 @@ +--- +title: Map.prototype.get() +slug: Web/JavaScript/Referencia/Objectes_globals/Map/get +translation_of: Web/JavaScript/Reference/Global_Objects/Map/get +--- +
{{JSRef}}
+ +

El mètode get() retorna l'element especifciat d'un objecte Map.

+ +

Sintaxi

+ +
myMap.get(clau);
+ +

Paràmetres

+ +
+
clau
+
Obligatori. La clau de l'element a retorna de l'objecte Map.
+
+ +

Valor a retornar

+ +

Retorna l'element associat a la clau especificada o bé undefined si no s'ha pogut trobar la clau dins l'objecte Map.

+ +

Exemples

+ +

Utilitzar el mètode get

+ +
var myMap = new Map();
+myMap.set("bar", "foo");
+
+myMap.get("bar");  // Retorna "foo".
+myMap.get("baz");  // Retorna undefined.
+
+ +

Especificacions

+ + + + + + + + + + + + + + + + + + + +
EspecificacióEstatComentaris
{{SpecName('ES6', '#sec-map.prototype.get', 'Map.prototype.get')}}{{Spec2('ES6')}}Definició inicial.
{{SpecName('ESDraft', '#sec-map.prototype.get', 'Map.prototype.get')}}{{Spec2('ESDraft')}} 
+ +

Compatibilitat amb navegadors

+ +

{{CompatibilityTable}}

+ +
+ + + + + + + + + + + + + + + + + + + +
CaracterísticaChromeFirefox (Gecko)Internet ExplorerOperaSafari
Suport bàsic38{{CompatGeckoDesktop("13.0")}}11257.1
+
+ +
+ + + + + + + + + + + + + + + + + + + + + +
CaracterísticaAndroidChrome for AndroidFirefox Mobile (Gecko)IE MobileOpera MobileSafari Mobile
Suport bàsic{{CompatNo}}38{{CompatGeckoMobile("13.0")}}{{CompatNo}}{{CompatNo}}8
+
+ +

Vegeu també

+ + diff --git a/files/ca/web/javascript/reference/global_objects/map/has/index.html b/files/ca/web/javascript/reference/global_objects/map/has/index.html new file mode 100644 index 0000000000..d0ce1bec54 --- /dev/null +++ b/files/ca/web/javascript/reference/global_objects/map/has/index.html @@ -0,0 +1,114 @@ +--- +title: Map.prototype.has() +slug: Web/JavaScript/Referencia/Objectes_globals/Map/has +translation_of: Web/JavaScript/Reference/Global_Objects/Map/has +--- +
{{JSRef}}
+ +

El mètode has() retorna un booleà que indica si existeix un element amb la clau especificada o no.

+ +

Sintaxi

+ +
myMap.has(clau);
+ +

Paràmetres

+ +
+
clau
+
Obligatori. La clau de l'element que es comprovarà si existeix o no dins l'objecte Map.
+
+ +

Valor retornat

+ +
+
Booleà
+
Retorna true si existeix un element amb la clau proporcionada dins l'objecte Map; retorna false en qualsevol altre cas.
+
+ +

Exemples

+ +

Utilitzar el mètode has

+ +
var myMap = new Map();
+myMap.set("bar", "foo");
+
+myMap.has("bar");  // retorn true
+myMap.has("baz");  // retorn false
+
+ +

Especificacions

+ + + + + + + + + + + + + + +
EspecificacióEstatComentaris
{{SpecName('ES6', '#sec-map.prototype.has', 'Map.prototype.has')}}{{Spec2('ES6')}}Definició inicial.
+ +

Compatibilitat amb navegadors

+ +

{{CompatibilityTable}}

+ +
+ + + + + + + + + + + + + + + + + + + +
CaracterísticaChromeFirefox (Gecko)Internet ExplorerOperaSafari
Suport bàsic38{{CompatGeckoDesktop("13.0")}}11257.1
+
+ +
+ + + + + + + + + + + + + + + + + + + + + +
CaracterísticaAndroidChrome for AndroidFirefox Mobile (Gecko)IE MobileOpera MobileSafari Mobile
Suport bàsic{{CompatNo}}38{{CompatGeckoMobile("13.0")}}{{CompatNo}}{{CompatNo}}8
+
+ +

Vegeu també

+ + diff --git a/files/ca/web/javascript/reference/global_objects/map/index.html b/files/ca/web/javascript/reference/global_objects/map/index.html new file mode 100644 index 0000000000..8e2bb647bd --- /dev/null +++ b/files/ca/web/javascript/reference/global_objects/map/index.html @@ -0,0 +1,385 @@ +--- +title: Map +slug: Web/JavaScript/Referencia/Objectes_globals/Map +translation_of: Web/JavaScript/Reference/Global_Objects/Map +--- +
{{JSRef("Global_Objects", "Map")}}
+ +

Resum

+ +

L'objecte Map és un simple mapa de parelles clau/valor. Qualsevol valor (tant objectes com {{Glossary("Primitive", "primitive values")}}) poden fer-se servir tant com a clau com a valor.

+ +

Sintaxi

+ +
new Map([iterable])
+
+ +

Paràmetres

+ +
+
iterable
+
Iterable és un Array o un altre objecte iterable els quals els seus elements són parelles clau/valor (Arrays de 2 elements). Cada parella clau/valor serà afegida al nou mapa. nul és tracta com a indefinit.
+
+ +

Descripció

+ +

Un objecte Map pot iterar els seus elements en ordre d'inserció - un bucle for..of retornarà un array de [key, value] per cada iteració.

+ +

Igualtat de claus

+ +

La igualtat de claus es basa en l'algorisme "mateix valor": NaN es considera igual a NaN (tot i que NaN !== NaN) i tots els altres valors es consideren iguals d'acord amb la semàntica de l'operador ===. En versions anteriors a l'esborrany de l'ECMAScript 6 -0 i +0 es consideraven diferents (tot i que -0 === +0), aquest comportament s'ha canviat en versions posteriors i ha sigut adaptat al {{geckoRelease("29")}} ({{bug("952870")}}) i una versió diària de Chrome.

+ +

Comparació d'objectes amb mapes

+ +

Els {{jsxref("Object", "Objects")}} son similars als Maps en el sentit que tots dos permeten assignar valors a claus, obtenir aquests valors, esborrar claus i detectar si una clau té un valor assignat o no. Degut a això, històricament s'han fet anar Objects com a Maps; tot i això existeixen diferències importants entre Objects i Maps que fan que l'ús de Map sigui millor.

+ + + +

Utilitzeu mapes en comptes d'objejctes quan les claus no se sàpiguin en temps d'execució, o bé quan totes les claus o els valors siguin del mateix tipus.

+ +

Utilitzeu objectes quan hi hagi una lògica que operi els elements individualment.

+ +

Propietats

+ +
+
Map.length
+
El valor de la propietat length és 1.
+
{{jsxref("Map.prototype")}}
+
Representa el prototipus pel constructor Map. Permet afegir propietats a tots els objectes de tipus Map.
+
+ +

Instàncies de Map

+ +

Totes les instàncies de Map hereten de {{jsxref("Map.prototype")}}.

+ +

Propietats

+ +

{{page('ca/Web/JavaScript/Reference/Global_Objects/Map/prototype','Propietats')}}

+ +

Mètodes

+ +

{{page('ca/Web/JavaScript/Reference/Global_Objects/Map/prototype','Mètodes')}}

+ +

Exemples

+ +

Exemple: Utilitzar l'objecte Map

+ +
var myMap = new Map();
+
+var keyObj = {},
+    keyFunc = function () {},
+    keyString = "a string";
+
+// preparar els valors
+myMap.set(keyString, "valor associat a amb 'un string'");
+myMap.set(keyObj, "valor associat amb keyObj");
+myMap.set(keyFunc, "valor associat amb with keyFunc");
+
+myMap.size; // 3
+
+// obtenir els valors
+myMap.get(keyString);    // "valor associat amb 'un string'"
+myMap.get(keyObj);       // "valor associat amb keyObj"
+myMap.get(keyFunc);      // "valor associat amb keyFunc"
+
+myMap.get("a string");   // "valor associat amb 'un string'"
+                         // com que keyString === 'un string'
+myMap.get({});           // undefined, perquè keyObj !== {}
+myMap.get(function() {}) // undefined, perquè keyFunc !== function () {}
+
+ +

Exemple: Utilitzar NaN com a claus en un Map

+ +

NaN també pot emprar-se com a clau. Tot i que NaN no és igual a si mateix (NaN !== NaN és cert), l'exemple següent funciona perquè els NaNs són indistinguibles entre ells:

+ +
var myMap = new Map();
+myMap.set(NaN, "no un nombre");
+
+myMap.get(NaN); // "no un nombre"
+
+var altreNaN = Number("foo");
+myMap.get(altreNaN); // "no un nombre"
+
+ +

Exemple: Iterar Maps amb for..of

+ +

Els mapes es poden iterar fent servir un bucle for..of :

+ +
var myMap = new Map();
+myMap.set(0, "zero");
+myMap.set(1, "un");
+for (var [key, value] of myMap) {
+  alert(key + " = " + value);
+}
+// Mostrarà 2 alertes; el primer amb "0 = zero" i el segon amb "1 = one"
+
+for (var key of myMap.keys()) {
+  alert(key);
+}
+// Mostrarà 2 alertes; el primer amb "0" i el segon amb "1"
+
+for (var value of myMap.values()) {
+  alert(value);
+}
+// Mostrarà 2 alertes; el primer amb "zero" i el segon amb "un"
+
+for (var [key, value] of myMap.entries()) {
+  alert(key + " = " + value);
+}
+// Mostrarà 2 alertes; el primer amb "0 = zero" i el segon amb "1 = un"
+
+myMap.forEach(function(value, key) {
+  alert(key + " = " + value);
+}, myMap)
+// Mostrarà 2 alertes; el primer amb "0 = zero" i el segon amb "1 = un"
+
+ +

Exemple: Relació amb els objectes Array

+ +
var kvArray = [["clau1", "valor1"], ["clau2", "valor2"]];
+
+// Utilitzeu el constructor de Map normal per a transformar un Array 2D clau-valor en un mapa
+var myMap = new Map(kvArray);
+
+myMap.get("valor1"); // retorna "valor1"
+
+// Utilitzeu l'operador spread per a transformar un mapa en un Array 2D clau-valor.
+alert(uneval([...myMap])); // Mostrarà exactament el mateix Array que kvArray
+
+// O bé utilitzeu l'operador spread a l'iterador de les claus o els valor per a obtenir
+// un array de només les claus o els valors
+alert(uneval([...myMap.keys()])); // Mostrarà ["clau1", "clau2"]
+
+ +

Especificacions

+ + + + + + + + + + + + + + +
EspecificacióEstatComentaris
{{SpecName('ES6', '#sec-map-objects', 'Map')}}{{Spec2('ES6')}}Definició inicial.
+ +

Compatibilitat amb navegadors

+ +

{{ CompatibilityTable() }}

+ +
+ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +
CaracterísticaChromeFirefox (Gecko)Internet ExplorerOperaSafari
Suport bàsic +

{{ CompatChrome(31) }} [1]
+ {{ CompatChrome(38) }}

+
{{ CompatGeckoDesktop("13") }}11257.1
Argument del constructor: new Map(iterable){{ CompatChrome(38) }}{{ CompatGeckoDesktop("13") }}{{ CompatNo() }}25{{ CompatNo() }}
iterable{{ CompatChrome(38) }}{{ CompatGeckoDesktop("17") }}{{ CompatNo() }}257.1
Map.clear(){{ CompatChrome(31) }} [1]
+ {{ CompatChrome(38) }}
{{CompatGeckoDesktop("19")}}11257.1
Map.keys(), Map.values(), Map.entries(){{ CompatChrome(37) }} [1]
+ {{ CompatChrome(38) }}
{{CompatGeckoDesktop("20")}}{{ CompatNo() }}257.1
Map.forEach(){{ CompatChrome(36) }} [1]
+ {{ CompatChrome(38) }}
{{CompatGeckoDesktop("25")}}11257.1
Igualtat de claus per a -0 i 0{{ CompatChrome(34) }} [1]
+ {{ CompatChrome(38) }}
{{CompatGeckoDesktop("29")}}{{ CompatNo() }}25{{ CompatNo() }}
Argument del constructor: new Map(null){{ CompatVersionUnknown() }}{{CompatGeckoDesktop("37")}}{{ CompatUnknown() }}{{ CompatUnknown() }}{{ CompatUnknown() }}
Monkey-patched set() al Constructor{{ CompatVersionUnknown() }}{{CompatGeckoDesktop("37")}}{{ CompatUnknown() }}{{ CompatUnknown() }}{{ CompatUnknown() }}
+
+ +
+ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +
CaracterísticaAndroidChrome per AndroidFirefox Mobile (Gecko)IE MobileOpera MobileSafari Mobile
Basic support{{ CompatNo() }}{{ CompatChrome(31) }} [1]
+ {{ CompatChrome(38) }}
{{ CompatGeckoMobile("13") }}{{ CompatNo() }}{{ CompatNo() }}iOS 8
Argument del constructor: new Map(iterable){{ CompatNo() }}{{ CompatChrome(38) }}{{ CompatGeckoMobile("13") }}{{ CompatNo() }}{{ CompatNo() }}{{ CompatNo }}
iterable{{ CompatNo() }}{{ CompatNo() }}{{ CompatGeckoMobile("17") }}{{ CompatNo() }}{{ CompatNo() }}iOS 8
Map.clear(){{ CompatNo() }}{{ CompatChrome(31) }} [1]
+ {{ CompatChrome(38) }}
{{CompatGeckoMobile("19")}}{{ CompatNo() }}{{ CompatNo() }}iOS 8
Map.keys(), Map.values(), Map.entries(){{ CompatNo() }}{{ CompatChrome(37) }} [1]
+ {{ CompatChrome(38) }}
{{CompatGeckoMobile("20")}}{{ CompatNo() }}{{ CompatNo() }}iOS 8
Map.forEach(){{ CompatNo() }}{{ CompatChrome(36) }} [1]
+ {{ CompatChrome(38) }}
{{CompatGeckoMobile("25")}}{{ CompatNo() }}{{ CompatNo() }}iOS 8
Igualtat per a -0 i 0{{ CompatNo() }}{{ CompatChrome(34) }} [1]
+ {{ CompatChrome(38) }}
{{CompatGeckoMobile("29")}}{{ CompatNo() }}{{ CompatNo() }}{{ CompatNo() }}
Argument del constructor: new Map(null){{ CompatUnknown() }}{{ CompatVersionUnknown() }}{{CompatGeckoMobile("37")}}{{ CompatUnknown() }}{{ CompatUnknown() }}{{ CompatUnknown() }}
Monkey-patched set() al Constructor{{ CompatUnknown() }}{{ CompatVersionUnknown() }}{{CompatGeckoMobile("37")}}{{ CompatUnknown() }}{{ CompatUnknown() }}{{ CompatUnknown() }}
+
+ +

[1] The feature is available behind a preference. In chrome://flags, activate the entry “Enable Experimental JavaScript”.

+ +

Vegeu també

+ + diff --git a/files/ca/web/javascript/reference/global_objects/map/keys/index.html b/files/ca/web/javascript/reference/global_objects/map/keys/index.html new file mode 100644 index 0000000000..47c975a891 --- /dev/null +++ b/files/ca/web/javascript/reference/global_objects/map/keys/index.html @@ -0,0 +1,104 @@ +--- +title: Map.prototype.keys() +slug: Web/JavaScript/Referencia/Objectes_globals/Map/keys +translation_of: Web/JavaScript/Reference/Global_Objects/Map/keys +--- +
{{JSRef}}
+ +

El mètode keys() retorna un nou objecte Iterator que conté les claus per cadascún dels elements de l'objecte Map en l'ordre d'insersió.

+ +

Sintaxi

+ +
myMap.keys()
+ +

Exemples

+ +

Utilitzar keys()

+ +
var myMap = new Map();
+myMap.set("0", "foo");
+myMap.set(1, "bar");
+myMap.set({}, "baz");
+
+var mapIter = myMap.keys();
+
+console.log(mapIter.next().value); // "0"
+console.log(mapIter.next().value); // 1
+console.log(mapIter.next().value); // Objecte
+
+ +

Especificacions

+ + + + + + + + + + + + + + +
EspecificacióEstatComentaris
{{SpecName('ES6', '#sec-map.prototype.keys', 'Map.prototype.keys')}}{{Spec2('ES6')}}Definició inicial.
+ +

Compatibilitat amb navegadors

+ +

{{CompatibilityTable}}

+ +
+ + + + + + + + + + + + + + + + + + + +
CaracterísticaChromeFirefox (Gecko)Internet ExplorerOperaSafari
Suport bàsic38{{CompatGeckoDesktop("20")}}{{CompatNo}}257.1
+
+ +
+ + + + + + + + + + + + + + + + + + + + + +
CaracterísticaAndroidChrome per AndroidFirefox Mobile (Gecko)IE MobileOpera MobileSafari Mobile
Suport bàsic{{CompatNo}}38{{CompatGeckoMobile("20") }}{{CompatNo}}{{CompatNo}}8
+
+ +

Vegeu també

+ + diff --git a/files/ca/web/javascript/reference/global_objects/map/set/index.html b/files/ca/web/javascript/reference/global_objects/map/set/index.html new file mode 100644 index 0000000000..3b77060831 --- /dev/null +++ b/files/ca/web/javascript/reference/global_objects/map/set/index.html @@ -0,0 +1,122 @@ +--- +title: Map.prototype.set() +slug: Web/JavaScript/Referencia/Objectes_globals/Map/set +translation_of: Web/JavaScript/Reference/Global_Objects/Map/set +--- +
{{JSRef}}
+ +

El mètode set() afegeig un nou element amb la clau i el valor especificats a un objecte de tipus Map.

+ +

Sintaxi

+ +
myMap.set(clau, valor);
+ +

Paràmetres

+ +
+
clau
+
Obligatori. La clau de l'element a afegir a l'objecte Map.
+
valor
+
Obligatori. El valor de l'element a afegir a l'objecte Map.
+
+ +

Valor retornat

+ +

L'objecte Map.

+ +

Exemples

+ +

Utilitzar el mètode set

+ +
var myMap = new Map();
+
+// Afegim nous elements al mapa
+myMap.set("bar", "foo");
+myMap.set(1, "foobar");
+
+// Actualitzem un element amb una clau ja existent al mapa
+myMap.set("bar", "fuuu");
+
+ +

Especificacions

+ + + + + + + + + + + + + + +
EspecificacióEstatComentaris
{{SpecName('ES6', '#sec-map.prototype.set', 'Map.prototype.set')}}{{Spec2('ES6')}}Definició inicial.
+ +

Compatibilitat amb navegadors

+ +

{{CompatibilityTable}}

+ +
+ + + + + + + + + + + + + + + + + + + +
CaracterísticaChromeFirefox (Gecko)Internet ExplorerOperaSafari
Suport bàsic38{{CompatGeckoDesktop("13.0")}}11257.1
+
+ +
+ + + + + + + + + + + + + + + + + + + + + +
CaracterísticaAndroidChrome for AndroidFirefox Mobile (Gecko)IE MobileOpera MobileSafari Mobile
Suport bàsic{{CompatNo}}38{{CompatGeckoMobile("13.0")}}{{CompatNo}}{{CompatNo}}8
+
+ +

Notes sobre compatibilitat

+ + + +

Vegeu també

+ + diff --git a/files/ca/web/javascript/reference/global_objects/map/size/index.html b/files/ca/web/javascript/reference/global_objects/map/size/index.html new file mode 100644 index 0000000000..aa70c7d84b --- /dev/null +++ b/files/ca/web/javascript/reference/global_objects/map/size/index.html @@ -0,0 +1,105 @@ +--- +title: Map.prototype.size +slug: Web/JavaScript/Referencia/Objectes_globals/Map/size +translation_of: Web/JavaScript/Reference/Global_Objects/Map/size +--- +
{{JSRef}}
+ +

La propietat d'accés size retorna el número d'elements en un objecte {{jsxref("Map")}}.

+ +

Descripció

+ +

El valor de size és un nombre sencer que representa quantes entrades té l'objecte Map. Una funció d'accés establerta per size és undefined; aquesta propietat no es pot canviar.

+ +

Exemples

+ +

Utilitzar size

+ +
var myMap = new Map();
+myMap.set("a", "alpha");
+myMap.set("b", "beta");
+myMap.set("g", "gamma");
+
+myMap.size // 3
+
+ +

Especificacions

+ + + + + + + + + + + + + + +
EspecificacióEstatComentaris
{{SpecName('ES6', '#sec-get-map.prototype.size', 'Map.prototype.size')}}{{Spec2('ES6')}}Definició inicial.
+ +

Compatibilitat amb navegadors

+ +

{{CompatibilityTable}}

+ +
+ + + + + + + + + + + + + + + + + + + +
FeatureChromeFirefox (Gecko)Internet ExplorerOperaSafari
Basic support38{{ CompatGeckoDesktop("19") }}{{ CompatIE("11") }}257.1
+
+ +
+ + + + + + + + + + + + + + + + + + + + + +
FeatureAndroidChrome for AndroidFirefox Mobile (Gecko)IE MobileOpera MobileSafari Mobile
Basic support{{CompatNo}}38{{CompatGeckoMobile("19")}}{{CompatNo}}{{CompatNo}}8
+
+ +

Notes específiques de Gecko

+ + + +

Vegeu també

+ + diff --git a/files/ca/web/javascript/reference/global_objects/map/values/index.html b/files/ca/web/javascript/reference/global_objects/map/values/index.html new file mode 100644 index 0000000000..f1b23be7e7 --- /dev/null +++ b/files/ca/web/javascript/reference/global_objects/map/values/index.html @@ -0,0 +1,103 @@ +--- +title: Map.prototype.values() +slug: Web/JavaScript/Referencia/Objectes_globals/Map/values +translation_of: Web/JavaScript/Reference/Global_Objects/Map/values +--- +
{{JSRef}}
+ +

El mètode values() retorna un nou objecte Iterator que conté els valor per cadascún dels elements de l'objecte Map en l'ordre d'inserció.

+ +

Sintaxi

+ +
myMap.values()
+ +

Exemples

+ +

Utilitzar values()

+ +
var myMap = new Map();
+myMap.set("0", "foo");
+myMap.set(1, "bar");
+myMap.set({}, "baz");
+
+var mapIter = myMap.values();
+
+console.log(mapIter.next().value); // "foo"
+console.log(mapIter.next().value); // "bar"
+console.log(mapIter.next().value); // "baz"
+ +

Especificacions

+ + + + + + + + + + + + + + +
EspecificacióEstatComentaris
{{SpecName('ES6', '#sec-map.prototype.values', 'Map.prototype.values')}}{{Spec2('ES6')}}Definició inicial.
+ +

Compatibilitat amb navegadors

+ +

{{CompatibilityTable}}

+ +
+ + + + + + + + + + + + + + + + + + + +
CaracterísticaChromeFirefox (Gecko)Internet ExplorerOperaSafari
Suport bàsic38{{ CompatGeckoDesktop("20") }}{{CompatNo}}257.1
+
+ +
+ + + + + + + + + + + + + + + + + + + + + +
CaracterísticaAndroidChrome per AndroidFirefox Mobile (Gecko)IE MobileOpera MobileSafari Mobile
Suport bàsic{{CompatNo}}38{{ CompatGeckoMobile("20") }}{{CompatNo}}{{CompatNo}}8
+
+ +

Vegeu també

+ + diff --git a/files/ca/web/javascript/reference/global_objects/math/abs/index.html b/files/ca/web/javascript/reference/global_objects/math/abs/index.html new file mode 100644 index 0000000000..34d3e5beb9 --- /dev/null +++ b/files/ca/web/javascript/reference/global_objects/math/abs/index.html @@ -0,0 +1,129 @@ +--- +title: Math.abs() +slug: Web/JavaScript/Referencia/Objectes_globals/Math/abs +translation_of: Web/JavaScript/Reference/Global_Objects/Math/abs +--- +
{{JSRef("Global_Objects", "Math")}}
+ +

Resum

+ +

La funció Math.abs() retorna el valor absolut d'un nombre. És a dir:

+ +

Math.abs(x)=|x|={xifx>00ifx=0-xifx<0{\mathtt{\operatorname{Math.abs}(x)}} = {|x|} = \begin{cases} x & \text{if} \quad x \geq 0 \\ -x & \text{if} \quad x < 0 \end{cases}

+ +

Sintaxi

+ +
Math.abs(x)
+ +

Paràmetres

+ +
+
x
+
Un nombre.
+
+ +

Descripció

+ +

Degut a que abs() és un mètode estàtic de Math, sempre s'utilitza com a Math.abs(), en comptes de com a mètode d'una instància de Math (Math no és un constructor).

+ +

Exemples

+ +

Exemple: Comportament de Math.abs()

+ +

Si li passem una string no numèric o bé una variable {{jsxref("undefined")}}/buida retorna {{jsxref("NaN")}}. Passar {{jsxref("null")}} retorna 0.

+ +
Math.abs('-1');     // 1
+Math.abs(-2);       // 2
+Math.abs(null);     // 0
+Math.abs('string'); // NaN
+Math.abs();         // NaN
+
+ +

Especificacions

+ + + + + + + + + + + + + + + + + + + + + + + + +
EspecificacióEstatComentaris
ECMAScript 1a Edició.StandardDefinició inicial. Implementat a JavaScript 1.0.
{{SpecName('ES5.1', '#sec-15.8.2.1', 'Math.abs')}}{{Spec2('ES5.1')}} 
{{SpecName('ES6', '#sec-math.abs', 'Math.abs')}}{{Spec2('ES6')}} 
+ +

Compatibilitat amb navegadors

+ +
{{CompatibilityTable}}
+ +
+ + + + + + + + + + + + + + + + + + + +
CaracterísticaChromeFirefox (Gecko)Internet ExplorerOperaSafari
Suport bàsic{{CompatVersionUnknown}}{{CompatVersionUnknown}}{{CompatVersionUnknown}}{{CompatVersionUnknown}}{{CompatVersionUnknown}}
+
+ +
+ + + + + + + + + + + + + + + + + + + + + +
CaracterísticaAndroidChrome for AndroidFirefox Mobile (Gecko)IE MobileOpera MobileSafari Mobile
Suport bàsic{{CompatVersionUnknown}}{{CompatVersionUnknown}}{{CompatVersionUnknown}}{{CompatVersionUnknown}}{{CompatVersionUnknown}}{{CompatVersionUnknown}}
+
+ +

Vegeu també

+ + diff --git a/files/ca/web/javascript/reference/global_objects/math/acos/index.html b/files/ca/web/javascript/reference/global_objects/math/acos/index.html new file mode 100644 index 0000000000..fdf781a4e2 --- /dev/null +++ b/files/ca/web/javascript/reference/global_objects/math/acos/index.html @@ -0,0 +1,131 @@ +--- +title: Math.acos() +slug: Web/JavaScript/Referencia/Objectes_globals/Math/acos +translation_of: Web/JavaScript/Reference/Global_Objects/Math/acos +--- +
{{JSRef("Global_Objects", "Math")}}
+ +

Resum

+ +

La funció Math.acos() retorna l'arccosinus (mesurat en radians) d'un nombre, és a dir:x[-1;1],Math.acos(x)=arccos(x)= l'únic y[0;π]tal quecos(y)=x\forall x \in [{-1};1],\;\mathtt{\operatorname{Math.acos}(x)} = \arccos(x) = \text{ the unique } \; y \in [0; \pi] \, \text{such that} \; \cos(y) = x

+ +

Sintaxi

+ +
Math.acos(x)
+ +

Paràmetres

+ +
+
x
+
Un nombre.
+
+ +

Descripció

+ +

El mètode Math.acos() retorna un valor numèric entre 0 i π radians per a x entre -1 i 1. Si el valor de x està fora d'aquest rang, retorna {{jsxref("NaN")}}.

+ +

Degut a que acos() és un mètode estàtic de Math, sempre s'utilitza com a Math.acos(), en comptes de com a mètode d'una instància de Math (Math no és un constructor).

+ +

Exemples

+ +

Exemple: Utilitzar Math.acos()

+ +
Math.acos(-2);  // NaN
+Math.acos(-1);  // 3.141592653589793
+Math.acos(0);   // 1.5707963267948966
+Math.acos(0.5); // 1.0471975511965979
+Math.acos(1);   // 0
+Math.acos(2);   // NaN
+
+ +

Per a valors menors que -1 o majors que 1, Math.acos() retorna {{jsxref("NaN")}}.

+ +

Especificacions

+ + + + + + + + + + + + + + + + + + + + + + + + +
EspecificacióEstatComentaris
ECMAScript 1a Edició.StandardDefinició inicial. Implementat a JavaScript 1.0.
{{SpecName('ES5.1', '#sec-15.8.2.2', 'Math.acos')}}{{Spec2('ES5.1')}} 
{{SpecName('ES6', '#sec-math.acos', 'Math.acos')}}{{Spec2('ES6')}} 
+ +

Compatibilitat amb navegadors

+ +
{{CompatibilityTable}}
+ +
+ + + + + + + + + + + + + + + + + + + +
CaracterísticaChromeFirefox (Gecko)Internet ExplorerOperaSafari
Suport bàsic{{CompatVersionUnknown}}{{CompatVersionUnknown}}{{CompatVersionUnknown}}{{CompatVersionUnknown}}{{CompatVersionUnknown}}
+
+ +
+ + + + + + + + + + + + + + + + + + + + + +
CaracterísticaAndroidChrome for AndroidFirefox Mobile (Gecko)IE MobileOpera MobileSafari Mobile
Suport bàsic{{CompatVersionUnknown}}{{CompatVersionUnknown}}{{CompatVersionUnknown}}{{CompatVersionUnknown}}{{CompatVersionUnknown}}{{CompatVersionUnknown}}
+
+ +

Vegeu també

+ + diff --git a/files/ca/web/javascript/reference/global_objects/math/acosh/index.html b/files/ca/web/javascript/reference/global_objects/math/acosh/index.html new file mode 100644 index 0000000000..edfe1dd8c0 --- /dev/null +++ b/files/ca/web/javascript/reference/global_objects/math/acosh/index.html @@ -0,0 +1,126 @@ +--- +title: Math.acosh() +slug: Web/JavaScript/Referencia/Objectes_globals/Math/acosh +translation_of: Web/JavaScript/Reference/Global_Objects/Math/acosh +--- +
{{JSRef}}
+ +

La funció Math.acosh() retorna l'accosinus hiperbòlic d'un nombre, és a dir

+ +

x1,Math.acosh(x)=arcosh(x)= l'única y0tal quecosh(y)=x\forall x \geq 1, \mathtt{\operatorname{Math.acosh}(x)} = \operatorname{arcosh}(x) = \text{ the unique } \; y \geq 0 \; \text{such that} \; \cosh(y) = x

+ +

Sintaxi

+ +
Math.acosh(x)
+ +

Paràmetres

+ +
+
x
+
Un nombre.
+
+ +

Descripció

+ +

Com que que acosh() és un mètode estàtic de Math, sempre s'utilitza com a Math.acosh(), en comptes de com a mètode d'una instància de Math (Math no és un constructor).

+ +

Exemples

+ +

Utilitzar Math.acosh()

+ +
Math.acosh(-1); // NaN
+Math.acosh(0);  // NaN
+Math.acosh(0.5) // NaN
+Math.acosh(1);  // 0
+Math.acosh(2);  // 1.3169578969248166
+
+ +

Math.acosh() retorna {{jsxref("NaN")}} per a valors menors que 1.

+ +

Polyfill

+ +

Per a tot x1x \geq 1, tenim que arcosh(x)=ln(x+x2-1)\operatorname {arcosh} (x) = \ln \left(x + \sqrt{x^{2} - 1} \right) i, per tant, es pot emular mitjançant la funció següent:

+ +
Math.acosh = Math.acosh || function(x) {
+  return Math.log(x + Math.sqrt(x * x - 1));
+};
+
+ +

Especificacions

+ + + + + + + + + + + + + + +
EspecificacionsEstatComentaris
{{SpecName('ES6', '#sec-math.acosh', 'Math.acosh')}}{{Spec2('ES6')}}Definició inicial.
+ +

Compatibilitat amb navegadors

+ +
{{CompatibilityTable}}
+ +
+ + + + + + + + + + + + + + + + + + + +
CaracterísticaChromeFirefox (Gecko)Internet ExplorerOperaSafari
Suport bàsic{{CompatChrome("38")}}{{CompatGeckoDesktop("25")}}{{CompatNo}}{{CompatOpera("25")}}{{CompatSafari("7.1")}}
+
+ +
+ + + + + + + + + + + + + + + + + + + + + +
CaracterísticaAndroidChrome for AndroidFirefox Mobile (Gecko)IE MobileOpera MobileSafari Mobile
Suport bàsic{{CompatNo}}{{CompatNo}}{{CompatGeckoMobile("25")}}{{CompatNo}}{{CompatNo}}8
+
+ +

Vegeu també

+ + diff --git a/files/ca/web/javascript/reference/global_objects/math/asin/index.html b/files/ca/web/javascript/reference/global_objects/math/asin/index.html new file mode 100644 index 0000000000..81288af5b6 --- /dev/null +++ b/files/ca/web/javascript/reference/global_objects/math/asin/index.html @@ -0,0 +1,133 @@ +--- +title: Math.asin() +slug: Web/JavaScript/Referencia/Objectes_globals/Math/asin +translation_of: Web/JavaScript/Reference/Global_Objects/Math/asin +--- +
{{JSRef("Global_Objects", "Math")}}
+ +

Resum

+ +

La funció Math.asin() retorna l'arcsinus (en radians) d'un nombre, és a dir:

+ +

x[-1;1],Math.asin(x)=arcsin(x)= l'únic y[-π2;π2]tal que  sin(y)=x\forall x \in [{-1};1],\;\mathtt{\operatorname{Math.asin}(x)} = \arcsin(x) = \text{ the unique } \; y \in \left[-\frac{\pi}{2}; \frac{\pi}{2}\right] \, \text{such that} \; \sin(y) = x

+ +

Sintaxi

+ +
Math.asin(x)
+ +

Paràmetres

+ +
+
x
+
Un nombre.
+
+ +

Descripció

+ +

El mètode Math.asin() retorna un valor numèric entre -π2-\frac{\pi}{2} i π2\frac{\pi}{2} radians per a x entre -1 i 1. Si el valor de x està fora d'aquest rang la funció retorna {{jsxref("NaN")}}.

+ +

Degut a que asin() és un mètode estàtic de Math, sempre s'utilitza com a Math.asin(), en comptes de com a mètode d'una instància de Math (Math no és un constructor).

+ +

Exemples

+ +

Exemple: Ús de Math.asin()

+ +
Math.asin(-2);  // NaN
+Math.asin(-1);  // -1.5707963267948966 (-pi/2)
+Math.asin(0);   // 0
+Math.asin(0.5); // 0.5235987755982989
+Math.asin(1);   // 1.570796326794897 (pi/2)
+Math.asin(2);   // NaN
+
+ +

Per a valors menors que -1 o majors que 1, Math.asin() retorna {{jsxref("NaN")}}.

+ +

Especificacions

+ + + + + + + + + + + + + + + + + + + + + + + + +
EspecificacióEstatComentaris
ECMAScript 1a Edició.StandardDefinició inicial. Implementat a JavaScript 1.0.
{{SpecName('ES5.1', '#sec-15.8.2.3', 'Math.asin')}}{{Spec2('ES5.1')}} 
{{SpecName('ES6', '#sec-math.asin', 'Math.asin')}}{{Spec2('ES6')}} 
+ +

Compatibilitat amb navegadors

+ +
{{CompatibilityTable}}
+ +
+ + + + + + + + + + + + + + + + + + + +
CaracterísticaChromeFirefox (Gecko)Internet ExplorerOperaSafari
Suport bàsic{{CompatVersionUnknown}}{{CompatVersionUnknown}}{{CompatVersionUnknown}}{{CompatVersionUnknown}}{{CompatVersionUnknown}}
+
+ +
+ + + + + + + + + + + + + + + + + + + + + +
CaracterísticaAndroidChrome for AndroidFirefox Mobile (Gecko)IE MobileOpera MobileSafari Mobile
Suport bàsic{{CompatVersionUnknown}}{{CompatVersionUnknown}}{{CompatVersionUnknown}}{{CompatVersionUnknown}}{{CompatVersionUnknown}}{{CompatVersionUnknown}}
+
+ +

Vegeu també

+ + diff --git a/files/ca/web/javascript/reference/global_objects/math/asinh/index.html b/files/ca/web/javascript/reference/global_objects/math/asinh/index.html new file mode 100644 index 0000000000..9a249bb202 --- /dev/null +++ b/files/ca/web/javascript/reference/global_objects/math/asinh/index.html @@ -0,0 +1,125 @@ +--- +title: Math.asinh() +slug: Web/JavaScript/Referencia/Objectes_globals/Math/asinh +translation_of: Web/JavaScript/Reference/Global_Objects/Math/asinh +--- +
{{JSRef}}
+ +

La funció Math.asinh() retorna l'arcsinus hiperbòlic d'un nombre, és a dir

+ +

Math.asinh(x)=arsinh(x)= l'única ytal quesinh(y)=x\mathtt{\operatorname{Math.asinh}(x)} = \operatorname{arsinh}(x) = \text{ the unique } \; y \; \text{such that} \; \sinh(y) = x

+ +

Sintaxi

+ +
Math.asinh(x)
+ +

Paràmetres

+ +
+
x
+
Un nombre.
+
+ +

Descripció

+ +

Com que que asinh() és un mètode estàtic de Math, sempre s'utilitza com a Math.asinh(), en comptes de com a mètode d'una instància de Math (Math no és un constructor).

+ +

Exemples

+ +

Utilitzar Math.asinh()

+ +
Math.asinh(1);  // 0.881373587019543
+Math.asinh(0);  // 0
+
+ +

Polyfill

+ +

Tenim que arsinh(x)=ln(x+x2+1)\operatorname {arsinh} (x) = \ln \left(x + \sqrt{x^{2} + 1} \right) amb el que podem emular el comportament amb la funció següent:

+ +
Math.asinh = Math.asinh || function(x) {
+  if (x === -Infinity) {
+    return x;
+  } else {
+    return Math.log(x + Math.sqrt(x * x + 1));
+  }
+};
+
+ +

Especificacions

+ + + + + + + + + + + + + + +
EspecificacióEstatComentaris
{{SpecName('ES6', '#sec-math.asinh', 'Math.asinh')}}{{Spec2('ES6')}}Definició inicial.
+ +

Compatibilitat amb navegadors

+ +
{{CompatibilityTable}}
+ +
+ + + + + + + + + + + + + + + + + + + +
CaracterísticaChromeFirefox (Gecko)Internet ExplorerOperaSafari
Suport bàsic{{CompatChrome("38")}}{{CompatGeckoDesktop("25")}}{{CompatNo}}{{CompatOpera("25")}}{{CompatSafari("7.1")}}
+
+ +
+ + + + + + + + + + + + + + + + + + + + + +
CaracterísticaAndroidChrome for AndroidFirefox Mobile (Gecko)IE MobileOpera MobileSafari Mobile
Suport bàsic{{CompatNo}}{{CompatNo}}{{CompatGeckoMobile("25")}}{{CompatNo}}{{CompatNo}}8
+
+ +

Vegeu també

+ + diff --git a/files/ca/web/javascript/reference/global_objects/math/atan/index.html b/files/ca/web/javascript/reference/global_objects/math/atan/index.html new file mode 100644 index 0000000000..034578fd54 --- /dev/null +++ b/files/ca/web/javascript/reference/global_objects/math/atan/index.html @@ -0,0 +1,127 @@ +--- +title: Math.atan() +slug: Web/JavaScript/Referencia/Objectes_globals/Math/atan +translation_of: Web/JavaScript/Reference/Global_Objects/Math/atan +--- +
{{JSRef("Global_Objects", "Math")}}
+ +

Resum

+ +

La funció Math.atan() retorna l'arctangent (en radians) d'un nombre, és a dir:

+ +

Math.atan(x)=arctan(x)= l'unic y[-π2;π2]tal quetan(y)=x\mathtt{\operatorname{Math.atan}(x)} = \arctan(x) = \text{ the unique } \; y \in \left[-\frac{\pi}{2}; \frac{\pi}{2}\right] \, \text{such that} \; \tan(y) = x

+ +

Sintaxi

+ +
Math.atan(x)
+ +

Paràmetres

+ +
+
x
+
Un nombre.
+
+ +

Descripció

+ +

El mètode Math.atan() retorna un valor numèric entre -π2-\frac{\pi}{2} i π2\frac{\pi}{2} radians.

+ +

Degut a que atan() és un mètode estàtic de Math, sempre s'utilitza com a Math.atan(), en comptes de com a mètode d'una instància de Math (Math no és un constructor).

+ +

Exemples

+ +

Exemple: Utilitzar Math.atan()

+ +
Math.atan(1);  // 0.7853981633974483
+Math.atan(0);  // 0
+
+ +

Especificacions

+ + + + + + + + + + + + + + + + + + + + + + + + +
EspecificacióEstatComentaris
ECMAScript 1a Edició.StandardDefinició inicial. Implementat a JavaScript 1.0.
{{SpecName('ES5.1', '#sec-15.8.2.4', 'Math.atan')}}{{Spec2('ES5.1')}} 
{{SpecName('ES6', '#sec-math.atan', 'Math.atan')}}{{Spec2('ES6')}} 
+ +

Compatibilitat amb navegadors

+ +
{{CompatibilityTable}}
+ +
+ + + + + + + + + + + + + + + + + + + +
CaracterísticaChromeFirefox (Gecko)Internet ExplorerOperaSafari
Suport bàsic{{CompatVersionUnknown}}{{CompatVersionUnknown}}{{CompatVersionUnknown}}{{CompatVersionUnknown}}{{CompatVersionUnknown}}
+
+ +
+ + + + + + + + + + + + + + + + + + + + + +
CaracterísticaAndroidChrome for AndroidFirefox Mobile (Gecko)IE MobileOpera MobileSafari Mobile
Suport bàsic{{CompatVersionUnknown}}{{CompatVersionUnknown}}{{CompatVersionUnknown}}{{CompatVersionUnknown}}{{CompatVersionUnknown}}{{CompatVersionUnknown}}
+
+ +

Vegeu també

+ + diff --git a/files/ca/web/javascript/reference/global_objects/math/atan2/index.html b/files/ca/web/javascript/reference/global_objects/math/atan2/index.html new file mode 100644 index 0000000000..2816bb40b8 --- /dev/null +++ b/files/ca/web/javascript/reference/global_objects/math/atan2/index.html @@ -0,0 +1,139 @@ +--- +title: Math.atan2() +slug: Web/JavaScript/Referencia/Objectes_globals/Math/atan2 +translation_of: Web/JavaScript/Reference/Global_Objects/Math/atan2 +--- +
{{JSRef}}
+ +

La funció Math.atan2() retorna l'arctangent del quocient dels arguments passats.

+ +

Sintaxi

+ +
Math.atan2(y, x)
+ +

Paràmetres

+ +
+
y
+
Primer nombre.
+
x
+
Segon nombre.
+
+ +

Descripció

+ +

El mètode Math.atan2() retorn aun valor numèric entre -π i π que representa l'angle theta d'un punt (x, y). Aquest angle es representa en radiants, en sentit contrari a les agulles del rellotge, entre l'eix positiu X i el punt (x, y). Cal destacar que els arguments d'aquesta funció representen les coordenades del punt, on el primer argument representa la coordenada y i el segon argument representa la coordenada x.

+ +

Math.atan2() rep els arguments x i y de forma separada mentre que Math.atan() rep la relació (ratio) entre aquests dos arguments.

+ +

Com que que atan2() és un mètode estàtic de Math, sempre s'utilitza com a Math.atan2(), en comptes de com a mètode d'una instància de Math (Math no és un constructor).

+ +

Exemples

+ +

Utilitzar Math.atan2()

+ +
Math.atan2(90, 15); // 1.4056476493802699
+Math.atan2(15, 90); // 0.16514867741462683
+
+Math.atan2(±0, -0);               // ±PI.
+Math.atan2(±0, +0);               // ±0.
+Math.atan2(±0, -x);               // ±PI for x > 0.
+Math.atan2(±0, x);                // ±0 for x > 0.
+Math.atan2(-y, ±0);               // -PI/2 for y > 0.
+Math.atan2(y, ±0);                // PI/2 for y > 0.
+Math.atan2(±y, -Infinity);        // ±PI for finite y > 0.
+Math.atan2(±y, +Infinity);        // ±0 for finite y > 0.
+Math.atan2(±Infinity, x);         // ±PI/2 for finite x.
+Math.atan2(±Infinity, -Infinity); // ±3*PI/4.
+Math.atan2(±Infinity, +Infinity); // ±PI/4.
+
+ +

Especificacions

+ + + + + + + + + + + + + + + + + + + + + + + + +
EspecificacióEstatComentaris
{{SpecName('ES1')}}{{Spec2('ES1')}}Definició inicial. Implementat a JavaScript 1.0.
{{SpecName('ES5.1', '#sec-15.8.2.5', 'Math.atan2')}}{{Spec2('ES5.1')}} 
{{SpecName('ES6', '#sec-math.atan2', 'Math.atan2')}}{{Spec2('ES6')}} 
+ +

Compatibilitat amb navegadors

+ +
{{CompatibilityTable}}
+ +
+ + + + + + + + + + + + + + + + + + + +
CaracterísticaChromeFirefox (Gecko)Internet ExplorerOperaSafari
Suport bàsic{{CompatVersionUnknown}}{{CompatVersionUnknown}}{{CompatVersionUnknown}}{{CompatVersionUnknown}}{{CompatVersionUnknown}}
+
+ +
+ + + + + + + + + + + + + + + + + + + + + +
CaracterísticaAndroidChrome for AndroidFirefox Mobile (Gecko)IE MobileOpera MobileSafari Mobile
Suport bàsic{{CompatVersionUnknown}}{{CompatVersionUnknown}}{{CompatVersionUnknown}}{{CompatVersionUnknown}}{{CompatVersionUnknown}}{{CompatVersionUnknown}}
+
+ +

Vegeu també

+ + diff --git a/files/ca/web/javascript/reference/global_objects/math/atanh/index.html b/files/ca/web/javascript/reference/global_objects/math/atanh/index.html new file mode 100644 index 0000000000..8a6b7cc2c8 --- /dev/null +++ b/files/ca/web/javascript/reference/global_objects/math/atanh/index.html @@ -0,0 +1,127 @@ +--- +title: Math.atanh() +slug: Web/JavaScript/Referencia/Objectes_globals/Math/atanh +translation_of: Web/JavaScript/Reference/Global_Objects/Math/atanh +--- +
{{JSRef}}
+ +

La funció Math.atanh() retorna l'arctangent hiperbòlica d'un nombre, és a dir

+ +

x(-1,1),Math.atanh(x)=arctanh(x)= l'única ytal quetanh(y)=x\forall x \in \left( -1, 1 \right), \mathtt{\operatorname{Math.atanh}(x)} = \operatorname{arctanh}(x) = \text{ the unique } \; y \; \text{such that} \; \tanh(y) = x

+ +

Sintaxi

+ +
Math.atanh(x)
+ +

Paràmetres

+ +
+
x
+
Un nombre.
+
+ +

Descripció

+ +

Com que que atanh() és un mètode estàtic de Math, sempre s'utilitza com a Math.atanh(), en comptes de com a mètode d'una instància de Math (Math no és un constructor).

+ +

Exemples

+ +

Utilitzar Math.atanh()

+ +
Math.atanh(-2);  // NaN
+Math.atanh(-1);  // -Infinity
+Math.atanh(0);   // 0
+Math.atanh(0.5); // 0.5493061443340548
+Math.atanh(1);   // Infinity
+Math.atanh(2);   // NaN
+
+ +

Es retorna {{jsxref("NaN")}} per a valors més grans que 1 o més petits que -1.

+ +

Polyfill

+ +

Per a |x|<1\left|x\right| < 1, tenim que artanh(x)=12ln(1+x1-x)\operatorname {artanh} (x) = \frac{1}{2}\ln \left( \frac{1 + x}{1 - x} \right) , que podem emular amb la funció següent:

+ +
Math.atanh = Math.atanh || function(x) {
+  return Math.log((1+x)/(1-x)) / 2;
+};
+
+ +

Especificacions

+ + + + + + + + + + + + + + +
EspecificacióEstatComentaris
{{SpecName('ES6', '#sec-math.atanh', 'Math.atanh')}}{{Spec2('ES6')}}Definició inicial.
+ +

Compatibilitat amb navegadors

+ +
{{CompatibilityTable}}
+ +
+ + + + + + + + + + + + + + + + + + + +
CaracterísticaChromeFirefox (Gecko)Internet ExplorerOperaSafari
Suport bàsic{{CompatChrome("38")}}{{CompatGeckoDesktop("25")}}{{CompatNo}}{{CompatOpera("25")}}{{CompatSafari("7.1")}}
+
+ +
+ + + + + + + + + + + + + + + + + + + + + +
CaracterísticaAndroidChrome for AndroidFirefox Mobile (Gecko)IE MobileOpera MobileSafari Mobile
Suport bàsic{{CompatNo}}{{CompatNo}}{{CompatGeckoMobile("25")}}{{CompatNo}}{{CompatNo}}8
+
+ +

Vegeu també

+ + diff --git a/files/ca/web/javascript/reference/global_objects/math/cbrt/index.html b/files/ca/web/javascript/reference/global_objects/math/cbrt/index.html new file mode 100644 index 0000000000..70d6767183 --- /dev/null +++ b/files/ca/web/javascript/reference/global_objects/math/cbrt/index.html @@ -0,0 +1,122 @@ +--- +title: Math.cbrt() +slug: Web/JavaScript/Referencia/Objectes_globals/Math/cbrt +translation_of: Web/JavaScript/Reference/Global_Objects/Math/cbrt +--- +
{{JSRef}}
+ +

La funció Math.cbrt() retorna la rel cúbica d'un nombre, és a dir

+ +

Math.cbrt(x)=x3=la únicaytal quey3=x\mathtt{Math.cbrt(x)} = \sqrt[3]{x} = \text{the unique} \; y \; \text{such that} \; y^3 = x

+ +

Sintaxi

+ +
Math.cbrt(x)
+ +

Paràmetres

+ +
+
x
+
Un nombre.
+
+ +

Descripció

+ +

Degut a que cbrt() és un mètode estàtic de Math, sempre s'utilitza com a Math.cbrt(), en comptes de com a mètode d'una instància de Math (Math no és un constructor).

+ +

Exemples

+ +

Utilitzar Math.cbrt()

+ +
Math.cbrt(-1); // -1
+Math.cbrt(0);  // 0
+Math.cbrt(1);  // 1
+
+Math.cbrt(2);  // 1.2599210498948734
+
+ +

Polyfill

+ +

Per a tot x0x \geq 0, tenim que x3=x1/3\sqrt[3]{x} = x^{1/3} , podem llavors emular aquest comportament amb la funció següent:

+ +
Math.cbrt = Math.cbrt || function(x) {
+  var y = Math.pow(Math.abs(x), 1/3);
+  return x < 0 ? -y : y;
+};
+
+ +

Especificacions

+ + + + + + + + + + + + + + +
EspecificacióEstatComentaris
{{SpecName('ES6', '#sec-math.cbrt', 'Math.cbrt')}}{{Spec2('ES6')}}Definició inicial.
+ +

Compatibilitat amb navegadors

+ +
{{CompatibilityTable}}
+ +
+ + + + + + + + + + + + + + + + + + + +
CaracterísticaChromeFirefox (Gecko)Internet ExplorerOperaSafari
Suport bàsic{{CompatChrome("38")}}{{CompatGeckoDesktop("25")}}{{CompatNo}}{{CompatOpera("25")}}{{CompatSafari("7.1")}}
+
+ +
+ + + + + + + + + + + + + + + + + + + + + +
CaracterísticaAndroidChrome for AndroidFirefox Mobile (Gecko)IE MobileOpera MobileSafari Mobile
Suport bàsic{{CompatNo}}{{CompatNo}}{{CompatGeckoMobile("25")}}{{CompatNo}}{{CompatNo}}8
+
+ +

Vegeu també

+ + diff --git a/files/ca/web/javascript/reference/global_objects/math/ceil/index.html b/files/ca/web/javascript/reference/global_objects/math/ceil/index.html new file mode 100644 index 0000000000..a96880eecd --- /dev/null +++ b/files/ca/web/javascript/reference/global_objects/math/ceil/index.html @@ -0,0 +1,197 @@ +--- +title: Math.ceil() +slug: Web/JavaScript/Referencia/Objectes_globals/Math/ceil +translation_of: Web/JavaScript/Reference/Global_Objects/Math/ceil +--- +
{{JSRef("Global_Objects", "Math")}}
+ +

Resum

+ +

La funció Math.ceil() retorna el més petit dels nombres sencers més grans o iguals a un nombre donat.

+ +

Sintaxi

+ +
Math.ceil(x)
+ +

Paràmetres

+ +
+
x
+
Un nombre.
+
+ +

Descripció

+ +

Degut a que ceil() és un mètode estàtic de Math, sempre s'utilitza com a Math.ceil(), ren comptes de com a mètode d'una instància de Math (Math no és un constructor).

+ +

Exemples

+ +

Exemple: Ús de Math.ceil()

+ +

L'exemple següent mostra l'ús de Math.ceil().

+ +
Math.ceil(.95);   // 1
+Math.ceil(4);     // 4
+Math.ceil(7.004); // 8
+
+ +

Exemple: Ajust decimal

+ +
// Closure
+(function() {
+  /**
+   * Decimal adjustment of a number.
+   *
+   * @param {String}  type  The type of adjustment.
+   * @param {Number}  value The number.
+   * @param {Integer} exp   The exponent (the 10 logarithm of the adjustment base).
+   * @returns {Number} The adjusted value.
+   */
+  function decimalAdjust(type, value, exp) {
+    // If the exp is undefined or zero...
+    if (typeof exp === 'undefined' || +exp === 0) {
+      return Math[type](value);
+    }
+    value = +value;
+    exp = +exp;
+    // If the value is not a number or the exp is not an integer...
+    if (isNaN(value) || !(typeof exp === 'number' && exp % 1 === 0)) {
+      return NaN;
+    }
+    // Shift
+    value = value.toString().split('e');
+    value = Math[type](+(value[0] + 'e' + (value[1] ? (+value[1] - exp) : -exp)));
+    // Shift back
+    value = value.toString().split('e');
+    return +(value[0] + 'e' + (value[1] ? (+value[1] + exp) : exp));
+  }
+
+  // Decimal round
+  if (!Math.round10) {
+    Math.round10 = function(value, exp) {
+      return decimalAdjust('round', value, exp);
+    };
+  }
+  // Decimal floor
+  if (!Math.floor10) {
+    Math.floor10 = function(value, exp) {
+      return decimalAdjust('floor', value, exp);
+    };
+  }
+  // Decimal ceil
+  if (!Math.ceil10) {
+    Math.ceil10 = function(value, exp) {
+      return decimalAdjust('ceil', value, exp);
+    };
+  }
+})();
+
+// Round
+Math.round10(55.55, -1);   // 55.6
+Math.round10(55.549, -1);  // 55.5
+Math.round10(55, 1);       // 60
+Math.round10(54.9, 1);     // 50
+Math.round10(-55.55, -1);  // -55.5
+Math.round10(-55.551, -1); // -55.6
+Math.round10(-55, 1);      // -50
+Math.round10(-55.1, 1);    // -60
+// Floor
+Math.floor10(55.59, -1);   // 55.5
+Math.floor10(59, 1);       // 50
+Math.floor10(-55.51, -1);  // -55.6
+Math.floor10(-51, 1);      // -60
+// Ceil
+Math.ceil10(55.51, -1);    // 55.6
+Math.ceil10(51, 1);        // 60
+Math.ceil10(-55.59, -1);   // -55.5
+Math.ceil10(-59, 1);       // -50
+
+ +

Especificacions

+ + + + + + + + + + + + + + + + + + + + + + + + +
EspecificacióEstatComentaris
ECMAScript 1a Edició.StandardDefinició inicial. Implementat a JavaScript 1.0.
{{SpecName('ES5.1', '#sec-15.8.2.6', 'Math.ceil')}}{{Spec2('ES5.1')}} 
{{SpecName('ES6', '#sec-math.ceil', 'Math.ceil')}}{{Spec2('ES6')}} 
+ +

Compatibilitat amb navegadors

+ +
{{CompatibilityTable}}
+ +
+ + + + + + + + + + + + + + + + + + + +
CaracterísticaChromeFirefox (Gecko)Internet ExplorerOperaSafari
Suport bàsic{{CompatVersionUnknown}}{{CompatVersionUnknown}}{{CompatVersionUnknown}}{{CompatVersionUnknown}}{{CompatVersionUnknown}}
+
+ +
+ + + + + + + + + + + + + + + + + + + + + +
CaracterísticaAndroidChrome for AndroidFirefox Mobile (Gecko)IE MobileOpera MobileSafari Mobile
Suport bàsic{{CompatVersionUnknown}}{{CompatVersionUnknown}}{{CompatVersionUnknown}}{{CompatVersionUnknown}}{{CompatVersionUnknown}}{{CompatVersionUnknown}}
+
+ +

Vegeu també

+ + diff --git a/files/ca/web/javascript/reference/global_objects/math/clz32/index.html b/files/ca/web/javascript/reference/global_objects/math/clz32/index.html new file mode 100644 index 0000000000..5cde08c7a8 --- /dev/null +++ b/files/ca/web/javascript/reference/global_objects/math/clz32/index.html @@ -0,0 +1,155 @@ +--- +title: Math.clz32() +slug: Web/JavaScript/Referencia/Objectes_globals/Math/clz32 +translation_of: Web/JavaScript/Reference/Global_Objects/Math/clz32 +--- +
{{JSRef}}
+ +

La funció Math.clz32() retorna el nombre de zeros a l'esquerra que apareixen en una representació binària de 32 bits per a un nombre.

+ +

Sintaxi

+ +
Math.clz32(x)
+ +

Paràmetres

+ +
+
x
+
Un nombre.
+
+ +

Descripció

+ +

"clz32" és una abreviació de CountLeadingZeroes32.

+ +

Si x no és un nombre, primer es convertirà a un nombre, i després es convertirà a un nombre sencer de 32 bits sense signe.

+ +

Si el nombre sencer sense signe de 32 bits és 0, la funció retornarà 32 ja que tots els bits són 0.

+ +

Aquesta funció és particulament útil per a sistemes que compilin en JavaScript, com ara Emscripten.

+ +

Exemples

+ +

Utilitzar Math.clz32()

+ +
Math.clz32(1);                // 31
+Math.clz32(1000);             // 22
+Math.clz32();                 // 32
+
+[NaN, Infinity, -Infinity, 0, -0, null, undefined, 'foo', {}, []].filter(
+function(n) {
+  return Math.clz32(n) !== 32
+});                           // []
+
+Math.clz32(true);             // 31
+Math.clz32(3.5);              // 30
+
+ +

Polyfill

+ +

Aquesta funció polyfill utilitza {{jsxref("Math.imul")}}.

+ +
Math.clz32 = Math.clz32 || (function () {
+  'use strict';
+
+  var table = [
+    32, 31,  0, 16,  0, 30,  3,  0, 15,  0,  0,  0, 29, 10,  2,  0,
+     0,  0, 12, 14, 21,  0, 19,  0,  0, 28,  0, 25,  0,  9,  1,  0,
+    17,  0,  4,   ,  0,  0, 11,  0, 13, 22, 20,  0, 26,  0,  0, 18,
+     5,  0,  0, 23,  0, 27,  0,  6,  0, 24,  7,  0,  8,  0,  0,  0]
+
+  // Adaptat d'un algorisme trobat a Hacker's Delight, pàgina 103.
+  return function (x) {
+    // Tingueu en compte que les variables no tenen perquè ser les mateixes.
+
+    // 1. On n = ToUint32(x).
+    var v = Number(x) >>> 0
+
+    // 2. On p és el nombre de zeros a l'esquerra en la representació binària de 32 bits de n.
+    v |= v >>> 1
+    v |= v >>> 2
+    v |= v >>> 4
+    v |= v >>> 8
+    v |= v >>> 16
+    v = table[Math.imul(v, 0x06EB14F9) >>> 26]
+
+    // Retorna p.
+    return v
+  }
+})();
+
+ +

Especificacions

+ + + + + + + + + + + + + + +
EspecificacióEstatComentaris
{{SpecName('ES6', '#sec-math.clz32', 'Math.clz32')}}{{Spec2('ES6')}}Definició inicial.
+ +

Compatibilitat amb navegadors

+ +
{{CompatibilityTable}}
+ +
+ + + + + + + + + + + + + + + + + + + +
CaracterísticaChromeFirefox (Gecko)Internet ExplorerOperaSafari
Suport bàsic{{CompatChrome("38")}}{{CompatGeckoDesktop("31")}}{{CompatNo}}{{CompatOpera("25")}}{{CompatNo}}
+
+ +
+ + + + + + + + + + + + + + + + + + + + + +
CaracterísticaAndroidChrome for AndroidFirefox Mobile (Gecko)IE MobileOpera MobileSafari Mobile
Suport bàsic{{CompatNo}}{{CompatNo}}{{CompatGeckoMobile("31")}}{{CompatNo}}{{CompatNo}}{{CompatNo}}
+
+ +

Vegeu també

+ + diff --git a/files/ca/web/javascript/reference/global_objects/math/cos/index.html b/files/ca/web/javascript/reference/global_objects/math/cos/index.html new file mode 100644 index 0000000000..0236b38c9c --- /dev/null +++ b/files/ca/web/javascript/reference/global_objects/math/cos/index.html @@ -0,0 +1,128 @@ +--- +title: Math.cos() +slug: Web/JavaScript/Referencia/Objectes_globals/Math/cos +translation_of: Web/JavaScript/Reference/Global_Objects/Math/cos +--- +
{{JSRef("Global_Objects", "Math")}}
+ +

Resum

+ +

La funció Math.cos() retorna el cosinus d'un nombre.

+ +

Sintaxi

+ +
Math.cos(x)
+ +

Paràmetres

+ +
+
x
+
Un nombre, mesurat en radians.
+
+ +

Descripció

+ +

El mètode Math.cos() retorna un valor numèric entre -1 i 1, que representa el cosinus d'un angle.

+ +

Degut a que cos() és un mètode estàtic de Math, sempre s'utilitza com a Math.cos(), en comptes de com a mètode d'una instància de Math (Math no és un constructor).

+ +

Exemples

+ +

Exemple: Utilitzar Math.cos()

+ +
Math.cos(0);           // 1
+Math.cos(1);           // 0.5403023058681398
+
+Math.cos(Math.PI);     // -1
+Math.cos(2 * Math.PI); // 1
+
+ +

Especificacions

+ + + + + + + + + + + + + + + + + + + + + + + + +
EspecificacióEstatComentaris
ECMAScript 1a Edició.StandardDefinició inicial. Implementat a JavaScript 1.0.
{{SpecName('ES5.1', '#sec-15.8.2.7', 'Math.cos')}}{{Spec2('ES5.1')}} 
{{SpecName('ES6', '#sec-math.cos', 'Math.cos')}}{{Spec2('ES6')}} 
+ +

Compatibilitat amb navegadors

+ +
{{CompatibilityTable}}
+ +
+ + + + + + + + + + + + + + + + + + + +
CaracterísticaChromeFirefox (Gecko)Internet ExplorerOperaSafari
Suport bàsic{{CompatVersionUnknown}}{{CompatVersionUnknown}}{{CompatVersionUnknown}}{{CompatVersionUnknown}}{{CompatVersionUnknown}}
+
+ +
+ + + + + + + + + + + + + + + + + + + + + +
CaracterísticaAndroidChrome for AndroidFirefox Mobile (Gecko)IE MobileOpera MobileSafari Mobile
Suport bàsic{{CompatVersionUnknown}}{{CompatVersionUnknown}}{{CompatVersionUnknown}}{{CompatVersionUnknown}}{{CompatVersionUnknown}}{{CompatVersionUnknown}}
+
+ +

Vegeu també

+ + diff --git a/files/ca/web/javascript/reference/global_objects/math/cosh/index.html b/files/ca/web/javascript/reference/global_objects/math/cosh/index.html new file mode 100644 index 0000000000..00ebc259b9 --- /dev/null +++ b/files/ca/web/javascript/reference/global_objects/math/cosh/index.html @@ -0,0 +1,130 @@ +--- +title: Math.cosh() +slug: Web/JavaScript/Referencia/Objectes_globals/Math/cosh +translation_of: Web/JavaScript/Reference/Global_Objects/Math/cosh +--- +
{{JSRef}}
+ +

La funció Math.cosh() retorna el cosinus hiperbòlic d'un nombre, això es pot expressar utilitzant la {{jsxref("Math.E", "constant e", "", 1)}}:

+ +

Math.cosh(x)=ex+e-x2\mathtt{\operatorname{Math.cosh(x)}} = \frac{e^x + e^{-x}}{2}

+ +

Sintaxi

+ +
Math.cosh(x)
+ +

Paràmetres

+ +
+
x
+
Un nombre.
+
+ +

Descripció

+ +

Com que que cosh() és un mètode estàtic de Math, sempre s'utilitza com a Math.cosh(), en comptes de com a mètode d'una instància de Math (Math no és un constructor).

+ +

Exemples

+ +

Utilitzar Math.cosh()

+ +
Math.cosh(0);  // 1
+Math.cosh(1);  // 1.5430806348152437
+Math.cosh(-1); // 1.5430806348152437
+
+ +

Polyfill

+ +

Aquesta funció es pot emular amb l'ajuda de la funció {{jsxref("Math.exp()")}}:

+ +
Math.cosh = Math.cosh || function(x) {
+  return (Math.exp(x) + Math.exp(-x)) / 2;
+}
+
+ +

o bé utilitzant només una crida a la funció {{jsxref("Math.exp()")}}:

+ +
Math.cosh = Math.cosh || function(x) {
+  var y = Math.exp(x);
+  return (y + 1 / y) / 2;
+};
+
+ +

Especificacions

+ + + + + + + + + + + + + + +
EspecificacióEstatComentaris
{{SpecName('ES6', '#sec-math.cosh', 'Math.cosh')}}{{Spec2('ES6')}}Definició inicial.
+ +

Compatibilitat amb navegadors

+ +
{{CompatibilityTable}}
+ +
+ + + + + + + + + + + + + + + + + + + +
CaracterísticaChromeFirefox (Gecko)Internet ExplorerOperaSafari
Suport bàsic{{CompatChrome("38")}}{{CompatGeckoDesktop("25")}}{{CompatNo}}{{CompatOpera("25")}}{{CompatSafari("7.1")}}
+
+ +
+ + + + + + + + + + + + + + + + + + + + + +
CaracterísticaAndroidChrome for AndroidFirefox Mobile (Gecko)IE MobileOpera MobileSafari Mobile
Suport bàsic{{CompatNo}}{{CompatNo}}{{CompatGeckoMobile("25")}}{{CompatNo}}{{CompatNo}}8
+
+ +

Vegeu també

+ + diff --git a/files/ca/web/javascript/reference/global_objects/math/e/index.html b/files/ca/web/javascript/reference/global_objects/math/e/index.html new file mode 100644 index 0000000000..efe7476396 --- /dev/null +++ b/files/ca/web/javascript/reference/global_objects/math/e/index.html @@ -0,0 +1,118 @@ +--- +title: Math.E +slug: Web/JavaScript/Referencia/Objectes_globals/Math/E +translation_of: Web/JavaScript/Reference/Global_Objects/Math/E +--- +
{{JSRef("Global_Objects", "Math")}}
+ +

Resum

+ +

La propietat Math.E representa la base dels logaritmes naturals, e, el seu valor aproximat és de 2.718.

+ +

Math.E=e2.718\mathtt{\mi{Math.E}} = e \approx 2.718

+ +
{{js_property_attributes(0, 0, 0)}}
+ +

Descripció

+ +

Com que E és una propietat estàtica de Math, sempre s'utilitza com Math.E en comptes de com una propietat d'un objecte Math creat (Math no és un constructor).

+ +

Exemples

+ +

Exemple: Utilitzar Math.E

+ +

La funció que trobareu a continuació retorna e:

+ +
function getNapier() {
+  return Math.E;
+}
+
+getNapier(); // 2.718281828459045
+
+ +

Especificacions

+ + + + + + + + + + + + + + + + + + + + + + + + +
EspecificacióEstatComentaris
ECMAScript 1a Edició.StandardDefinició inicial. Implementat en JavaScript 1.0.
{{SpecName('ES5.1', '#sec-15.8.1.1', 'Math.E')}}{{Spec2('ES5.1')}} 
{{SpecName('ES6', '#sec-math.e', 'Math.E')}}{{Spec2('ES6')}} 
+ +

Compatibilitat amb navegadors

+ +
{{CompatibilityTable}}
+ +
+ + + + + + + + + + + + + + + + + + + +
CaracterísticaChromeFirefox (Gecko)Internet ExplorerOperaSafari
Suport bàsic{{CompatVersionUnknown}}{{CompatVersionUnknown}}{{CompatVersionUnknown}}{{CompatVersionUnknown}}{{CompatVersionUnknown}}
+
+ +
+ + + + + + + + + + + + + + + + + + + + + +
CaracterísticaAndroidChrome for AndroidFirefox Mobile (Gecko)IE MobileOpera MobileSafari Mobile
Suport bàsic{{CompatVersionUnknown}}{{CompatVersionUnknown}}{{CompatVersionUnknown}}{{CompatVersionUnknown}}{{CompatVersionUnknown}}{{CompatVersionUnknown}}
+
+ +

Vegeu també

+ + diff --git a/files/ca/web/javascript/reference/global_objects/math/exp/index.html b/files/ca/web/javascript/reference/global_objects/math/exp/index.html new file mode 100644 index 0000000000..c6d6c6c098 --- /dev/null +++ b/files/ca/web/javascript/reference/global_objects/math/exp/index.html @@ -0,0 +1,123 @@ +--- +title: Math.exp() +slug: Web/JavaScript/Referencia/Objectes_globals/Math/exp +translation_of: Web/JavaScript/Reference/Global_Objects/Math/exp +--- +
{{JSRef}}
+ +

La funció Math.exp() retorna ex, on x és l'argument, i e és {{jsxref("Math.E", "la constant d'Euler", "", 1)}}, la base dels logaritmes naturals.

+ +

Sintaxi

+ +
Math.exp(x)
+ +

Paràmetres

+ +
+
x
+
Un nombre.
+
+ +

Descripció

+ +

Deguat a que exp() és un mètode estàtic de Math, aquest pot emprar-se com a Math.exp(), en comptes de cridar-lo com un mètode d'un objecte de tipus Math (Math no és un constructor).

+ +

Exemples

+ +

Utilitzar Math.exp()

+ +
Math.exp(-1); // 0.36787944117144233
+Math.exp(0);  // 1
+Math.exp(1);  // 2.718281828459045
+
+ +

Especificacions

+ + + + + + + + + + + + + + + + + + + + + + + + +
EspecificacióEstatComentaris
{{SpecName('ES1')}}{{Spec2('ES1')}}Definició inicial. Implementat a JavaScript 1.0.
{{SpecName('ES5.1', '#sec-15.8.2.8', 'Math.exp')}}{{Spec2('ES5.1')}} 
{{SpecName('ES6', '#sec-math.exp', 'Math.exp')}}{{Spec2('ES6')}} 
+ +

Compatibilitat amb navegadors

+ +
{{CompatibilityTable}}
+ +
+ + + + + + + + + + + + + + + + + + + +
CaracterísticaChromeFirefox (Gecko)Internet ExplorerOperaSafari
Suport bàsic{{CompatVersionUnknown}}{{CompatVersionUnknown}}{{CompatVersionUnknown}}{{CompatVersionUnknown}}{{CompatVersionUnknown}}
+
+ +
+ + + + + + + + + + + + + + + + + + + + + +
CaracterísticaAndroidChrome for AndroidFirefox Mobile (Gecko)IE MobileOpera MobileSafari Mobile
Suport bàsic{{CompatVersionUnknown}}{{CompatVersionUnknown}}{{CompatVersionUnknown}}{{CompatVersionUnknown}}{{CompatVersionUnknown}}{{CompatVersionUnknown}}
+
+ +

Vegeu també

+ + diff --git a/files/ca/web/javascript/reference/global_objects/math/expm1/index.html b/files/ca/web/javascript/reference/global_objects/math/expm1/index.html new file mode 100644 index 0000000000..b8055fba45 --- /dev/null +++ b/files/ca/web/javascript/reference/global_objects/math/expm1/index.html @@ -0,0 +1,122 @@ +--- +title: Math.expm1() +slug: Web/JavaScript/Referencia/Objectes_globals/Math/expm1 +translation_of: Web/JavaScript/Reference/Global_Objects/Math/expm1 +--- +
{{JSRef}}
+ +

La funció Math.expm1() retorna ex - 1, on x és l'argument i {{jsxref("Math.E", "e", "", 1)}} és la base dels logaritmes naturals.

+ +

Sintaxi

+ +
Math.expm1(x)
+ +

Paràmetres

+ +
+
x
+
Un nombre.
+
+ +

Descripció

+ +

Com que expm1() és un mètode estàtic de Math, sempre s'utilitza com Math.expm1() en comptes de com un mètode d'un objecte Math creat (Math no és un constructor).

+ +

Exemples

+ +

Utilitzar Math.expm1()

+ +
Math.expm1(-1); // -0.6321205588285577
+Math.expm1(0);  // 0
+Math.expm1(1);  // 1.718281828459045
+
+ +

Polyfill

+ +

Aquesta funció pot ser emulada amb l'ajuda de la funció {{jsxref("Math.exp()")}}:

+ +
Math.expm1 = Math.expm1 || function(x) {
+  return Math.exp(x) - 1;
+};
+
+ +

Especificacions

+ + + + + + + + + + + + + + +
EspecificacióEstatComentaris
{{SpecName('ES6', '#sec-math.expm1', 'Math.expm1')}}{{Spec2('ES6')}}Definició inicial.
+ +

Compatibilitat amb navegadors

+ +
{{CompatibilityTable}}
+ +
+ + + + + + + + + + + + + + + + + + + +
CaracterísticaChromeFirefox (Gecko)Internet ExplorerOperaSafari
Suport bàsic{{CompatChrome("38")}}{{CompatGeckoDesktop("25")}}{{CompatNo}}{{CompatOpera("25")}}{{CompatSafari("7.1")}}
+
+ +
+ + + + + + + + + + + + + + + + + + + + + +
CaracterísticaAndroidChrome for AndroidFirefox Mobile (Gecko)IE MobileOpera MobileSafari Mobile
Suport bàsic{{CompatNo}}{{CompatNo}}{{CompatGeckoMobile("25")}}{{CompatNo}}{{CompatNo}}8
+
+ +

Vegeu també

+ + diff --git a/files/ca/web/javascript/reference/global_objects/math/floor/index.html b/files/ca/web/javascript/reference/global_objects/math/floor/index.html new file mode 100644 index 0000000000..4a83b8d0e8 --- /dev/null +++ b/files/ca/web/javascript/reference/global_objects/math/floor/index.html @@ -0,0 +1,194 @@ +--- +title: Math.floor() +slug: Web/JavaScript/Referencia/Objectes_globals/Math/floor +translation_of: Web/JavaScript/Reference/Global_Objects/Math/floor +--- +
{{JSRef("Global_Objects", "Math")}}
+ +

Resum

+ +

La funció Math.floor() retorna el nombre més gran dels nombres més petits o iguals a un nombre donat.

+ +

Sintaxi

+ +
Math.floor(x)
+ +

Paràmetres

+ +
+
x
+
Un nombre.
+
+ +

Descripció

+ +

Degut a que floor() és un mètode estàtic de Math, sempre s'utilitza com a Math.floor(), en comptes de com a mètode d'una instància de Math (Math no és un constructor).

+ +

Exemples

+ +

Exemple: Utilitzar Math.floor()

+ +
Math.floor( 45.95); //  45
+Math.floor(-45.95); // -46
+
+ +

Exemple: Ajust decimal

+ +
// Closure
+(function() {
+  /**
+   * Ajust decimal d'un nombre.
+   *
+   * @param {String}  type  El tipus d'ajust.
+   * @param {Number}  value El nombre.
+   * @param {Integer} exp   L'exponent (L'algoritme en base 10  de la base d'ajust
+   * @returns {Number} El valor ajustat.
+   */
+  function decimalAdjust(type, value, exp) {
+    // Si exp és undefined o zero...
+    if (typeof exp === 'undefined' || +exp === 0) {
+      return Math[type](value);
+    }
+    value = +value;
+    exp = +exp;
+    // Si value no és un nombre o exp no és un nombre sencer...
+    if (isNaN(value) || !(typeof exp === 'number' && exp % 1 === 0)) {
+      return NaN;
+    }
+    // Desplaçament
+    value = value.toString().split('e');
+    value = Math[type](+(value[0] + 'e' + (value[1] ? (+value[1] - exp) : -exp)));
+    // Desfer el desplaçament
+    value = value.toString().split('e');
+    return +(value[0] + 'e' + (value[1] ? (+value[1] + exp) : exp));
+  }
+
+  // Arrodoniment decimal
+  if (!Math.round10) {
+    Math.round10 = function(value, exp) {
+      return decimalAdjust('round', value, exp);
+    };
+  }
+  // Arrodoniment decimal a la baixa
+  if (!Math.floor10) {
+    Math.floor10 = function(value, exp) {
+      return decimalAdjust('floor', value, exp);
+    };
+  }
+  // Arrodoniment decimal a l'alça
+  if (!Math.ceil10) {
+    Math.ceil10 = function(value, exp) {
+      return decimalAdjust('ceil', value, exp);
+    };
+  }
+})();
+
+// Arrodoniments
+Math.round10(55.55, -1);   // 55.6
+Math.round10(55.549, -1);  // 55.5
+Math.round10(55, 1);       // 60
+Math.round10(54.9, 1);     // 50
+Math.round10(-55.55, -1);  // -55.5
+Math.round10(-55.551, -1); // -55.6
+Math.round10(-55, 1);      // -50
+Math.round10(-55.1, 1);    // -60
+// Arrodoniments a la baixa
+Math.floor10(55.59, -1);   // 55.5
+Math.floor10(59, 1);       // 50
+Math.floor10(-55.51, -1);  // -55.6
+Math.floor10(-51, 1);      // -60
+// Arrodoniments a l'alça
+Math.ceil10(55.51, -1);    // 55.6
+Math.ceil10(51, 1);        // 60
+Math.ceil10(-55.59, -1);   // -55.5
+Math.ceil10(-59, 1);       // -50
+
+ +

Especificacions

+ + + + + + + + + + + + + + + + + + + + + + + + +
EspecificacióEstatComentaris
ECMAScript 1a EdicióStandardDefinició inicial. Implementat a JavaScript 1.0.
{{SpecName('ES5.1', '#sec-15.8.2.9', 'Math.floor')}}{{Spec2('ES5.1')}} 
{{SpecName('ES6', '#sec-math.floor', 'Math.floor')}}{{Spec2('ES6')}} 
+ +

Compatibilitat amb navegadors

+ +
{{CompatibilityTable}}
+ +
+ + + + + + + + + + + + + + + + + + + +
CaracterísticaChromeFirefox (Gecko)Internet ExplorerOperaSafari
Suport bàsic{{CompatVersionUnknown}}{{CompatVersionUnknown}}{{CompatVersionUnknown}}{{CompatVersionUnknown}}{{CompatVersionUnknown}}
+
+ +
+ + + + + + + + + + + + + + + + + + + + + +
CaracterísticaAndroidChrome for AndroidFirefox Mobile (Gecko)IE MobileOpera MobileSafari Mobile
Suport bàsic{{CompatVersionUnknown}}{{CompatVersionUnknown}}{{CompatVersionUnknown}}{{CompatVersionUnknown}}{{CompatVersionUnknown}}{{CompatVersionUnknown}}
+
+ +

Vegeu també

+ + diff --git a/files/ca/web/javascript/reference/global_objects/math/fround/index.html b/files/ca/web/javascript/reference/global_objects/math/fround/index.html new file mode 100644 index 0000000000..7411993dbc --- /dev/null +++ b/files/ca/web/javascript/reference/global_objects/math/fround/index.html @@ -0,0 +1,118 @@ +--- +title: Math.fround() +slug: Web/JavaScript/Referencia/Objectes_globals/Math/fround +translation_of: Web/JavaScript/Reference/Global_Objects/Math/fround +--- +
{{JSRef}}
+ +

La funció Math.fround() retorna la representació en coma flotant de precisió simple més propera d'un nombre.

+ +

Sintaxi

+ +
Math.fround(x)
+ +

Paràmetres

+ +
+
x
+
Un nombre.
+
+ +

Descripció

+ +

Com que fround() és un mètode estàtic de Math, sempre s'utilitza com Math.fround() en comptes de com un mètode d'un objecte Math creat (Math no és un constructor).

+ +

Exemples

+ +

Utilitzar Math.fround()

+ +
Math.fround(0);     // 0
+Math.fround(1);     // 1
+Math.fround(1.337); // 1.3370000123977661
+Math.fround(1.5);   // 1.5
+Math.fround(NaN);   // NaN
+
+ +

Polyfill

+ +

El comportament d'aquesta funció pot ser emulat amb la funció següent, si {{jsxref("Float32Array")}} està suportat:

+ +
Math.fround = Math.fround || function(x) {
+  return new Float32Array([x])[0];
+};
+
+ +

Especificacions

+ + + + + + + + + + + + + + +
EspecificacióEstatComentaris
{{SpecName('ES6', '#sec-math.fround', 'Math.fround')}}{{Spec2('ES6')}}Definició inicial.
+ +

Compatibilitat amb navegadors

+ +
{{CompatibilityTable}}
+ +
+ + + + + + + + + + + + + + + + + + + +
CaracterísticaChromeFirefox (Gecko)Internet ExplorerOperaSafari
Suport bàsic{{CompatChrome("38")}}{{CompatGeckoDesktop("26")}}{{CompatNo}}{{CompatOpera("25")}}{{CompatSafari("7.1")}}
+
+ +
+ + + + + + + + + + + + + + + + + + + + + +
CaracterísticaAndroidChrome for AndroidFirefox Mobile (Gecko)IE MobileOpera MobileSafari Mobile
Suport bàsic{{CompatNo}}{{CompatUnknown}}{{CompatVersionUnknown}}{{CompatNo}}{{CompatNo}}8
+
+ +

Vegeu també

+ + diff --git a/files/ca/web/javascript/reference/global_objects/math/hypot/index.html b/files/ca/web/javascript/reference/global_objects/math/hypot/index.html new file mode 100644 index 0000000000..e29bb754f1 --- /dev/null +++ b/files/ca/web/javascript/reference/global_objects/math/hypot/index.html @@ -0,0 +1,139 @@ +--- +title: Math.hypot() +slug: Web/JavaScript/Referencia/Objectes_globals/Math/hypot +translation_of: Web/JavaScript/Reference/Global_Objects/Math/hypot +--- +
{{JSRef}}
+ +

La funció Math.hypot() retorna la rel quadrada de la suma dels quadrats dels seus arguments, és a dir:

+ +

Math.hypot(v1,v2,,vn)=i=1nvi2=v12+v22++vn2\mathtt{\operatorname{Math.hypot}(v_1, v_2, \dots, v_n)} = \sqrt{\sum_{i=1}^n v_i^2} = \sqrt{v_1^2 + v_2^2 + \dots + v_n^2}

+ +

Sintaxi

+ +
Math.hypot([valor1[, valor2[, ...]]])
+ +

Paràmetres

+ +
+
valor1, valor2, ...
+
Nombres.
+
+ +

Descripció

+ +

Com que que hypot() és un mètode estàtic de Math, sempre s'utilitza com a Math.hypot(), en comptes de com a mètode d'una instància de Math (Math no és un constructor).

+ +

Si no es passa cap argument, el resultat és +0.

+ +

Si al menys un dels arguments no pot ser convertit a nombre el resultat és {{jsxref("Global_Objects/NaN", "NaN")}}.

+ +

Quan se li passa només un argument, Math.hypot() retorna el mateix valor que retornaria Math.abs().

+ +

Exemples

+ +

Utilitzar Math.hypot()

+ +
Math.hypot(3, 4);        // 5
+Math.hypot(3, 4, 5);     // 7.0710678118654755
+Math.hypot();            // 0
+Math.hypot(NaN);         // NaN
+Math.hypot(3, 4, 'foo'); // NaN, +'foo' => NaN
+Math.hypot(3, 4, '5');   // 7.0710678118654755, +'5' => 5
+Math.hypot(-3);          // 3, el mateix que Math.abs(-3)
+
+ +

Polyfill

+ +

Aquest mètode pot emular-se mitjançant la funció següent:

+ +
Math.hypot = Math.hypot || function() {
+  var y = 0;
+  var length = arguments.length;
+
+  for (var i = 0; i < length; i++) {
+    if (arguments[i] === Infinity || arguments[i] === -Infinity) {
+      return Infinity;
+    }
+    y += arguments[i] * arguments[i];
+  }
+  return Math.sqrt(y);
+};
+
+ +

Especificacions

+ + + + + + + + + + + + + + +
EspecificacióEstatComentaris
{{SpecName('ES6', '#sec-math.hypot', 'Math.hypot')}}{{Spec2('ES6')}}Definició inicial.
+ +

Compatibilitat amb navegadors

+ +
{{CompatibilityTable}}
+ +
+ + + + + + + + + + + + + + + + + + + +
CaracterísticaChromeFirefox (Gecko)Internet ExplorerOperaSafari
Suport bàsic{{CompatChrome("38")}}{{CompatGeckoDesktop("27")}}{{CompatNo}}{{CompatOpera("25")}}{{CompatSafari("7.1")}}
+
+ +
+ + + + + + + + + + + + + + + + + + + + + +
CaracterísticaAndroidChrome for AndroidFirefox Mobile (Gecko)IE MobileOpera MobileSafari Mobile
Suport bàsic{{CompatNo}}{{CompatNo}}{{CompatGeckoMobile("27")}}{{CompatNo}}{{CompatNo}}8
+
+ +

Vegeu també

+ + diff --git a/files/ca/web/javascript/reference/global_objects/math/imul/index.html b/files/ca/web/javascript/reference/global_objects/math/imul/index.html new file mode 100644 index 0000000000..53050a9cd6 --- /dev/null +++ b/files/ca/web/javascript/reference/global_objects/math/imul/index.html @@ -0,0 +1,120 @@ +--- +title: Math.imul() +slug: Web/JavaScript/Referencia/Objectes_globals/Math/imul +translation_of: Web/JavaScript/Reference/Global_Objects/Math/imul +--- +
{{JSRef}}
+ +

La funció Math.imul() retorna el resultat de la multiplicació de 32 bits similar a la de C dels dos paràmetres.

+ +

Sintaxi

+ +
Math.imul(a, b)
+ +

Paràmetres

+ +
+
a
+
Primer nombre.
+
b
+
Segon nombre.
+
+ +

Descripció

+ +

Math.imul() permet una multiplicació ràpida de nombres sencers de 32 bits amb una semàtica similar a la de C. Aquesta característica esdevé útil per a projectes com Emscripten. Com que imul() és un mètode estàtic de Math, sempre s'utilitza com Math.imul() en comptes de com un mètode d'un objecte Math creat (Math no és un constructor).

+ +

Exemples

+ +

Utilitzar Math.imul()

+ +
Math.imul(2, 4);          // 8
+Math.imul(-1, 8);         // -8
+Math.imul(-2, -2);        // 4
+Math.imul(0xffffffff, 5); // -5
+Math.imul(0xfffffffe, 5); // -10
+
+ +

Polyfill

+ +

Aquesta funció pot ser emulada mitjançant la següent funció:

+ +
Math.imul = Math.imul || function(a, b) {
+  var ah = (a >>> 16) & 0xffff;
+  var al = a & 0xffff;
+  var bh = (b >>> 16) & 0xffff;
+  var bl = b & 0xffff;
+  // el desplaçament de zero posicions solventa el signe a la part més significativa
+  // el |0 del final converteix el valor sense signe en un valor amb signe
+  return ((al * bl) + (((ah * bl + al * bh) << 16) >>> 0)|0);
+};
+
+ +

Especificacions

+ + + + + + + + + + + + + + +
EspecificacióEstatComentaris
{{SpecName('ES6', '#sec-math.imul', 'Math.imul')}}{{Spec2('ES6')}}Definició inicial.
+ +

Compatibilitat amb navegadors

+ +
{{CompatibilityTable}}
+ +
+ + + + + + + + + + + + + + + + + + + +
CaracterísticaChromeFirefox (Gecko)Internet ExplorerOperaSafari
Suport bàsic{{CompatChrome("28")}}{{CompatGeckoDesktop("20")}}{{CompatUnknown}}{{CompatOpera("16")}}{{CompatSafari("7")}}
+
+ +
+ + + + + + + + + + + + + + + + + + + + + +
CaracterísticaAndroidChrome for AndroidFirefox Mobile (Gecko)IE MobileOpera MobileSafari Mobile
Suport bàsic{{CompatUnknown}}{{CompatUnknown}}{{CompatGeckoMobile("20")}}{{CompatUnknown}}{{CompatUnknown}}7
+
diff --git a/files/ca/web/javascript/reference/global_objects/math/index.html b/files/ca/web/javascript/reference/global_objects/math/index.html new file mode 100644 index 0000000000..d493f51b40 --- /dev/null +++ b/files/ca/web/javascript/reference/global_objects/math/index.html @@ -0,0 +1,205 @@ +--- +title: Math +slug: Web/JavaScript/Referencia/Objectes_globals/Math +translation_of: Web/JavaScript/Reference/Global_Objects/Math +--- +
{{JSRef("Global_Objects", "Math")}}
+ +

Resum

+ +

Math és un objecte proporcionat pel llenguatge que té propietats i mètodes que pretenen ajudar en càlculs matemàtics. L'objecte conté constants i funcions matemàtiques.

+ +

Descripció

+ +

A diferència d'altres objectes globals, Math no és un constructor. Totes les propietats i mètodes de Math són estàtics. Per a utilitzar la constant pi es fa anar Math.PI i la funció sinus es crida Math.sin(x), on x és l'argument que rebrà el mètode. Les constants tenen la presició d'un nombre real de JavaScript.

+ +

Propietats

+ +
+
{{jsxref("Math.E")}}
+
La constant de Euler (també coneguda com a nombre E) i la base dels logaritmes naturals, el seu valor aproximat és de 2.718.
+
{{jsxref("Math.LN2")}}
+
El logaritme natural de 2, el seu valor aproximat és de 0.693.
+
{{jsxref("Math.LN10")}}
+
El logaritme natural de 10, el seu valor aproximat és de 2.303.
+
{{jsxref("Math.LOG2E")}}
+
El logaritme de E en base 2, el seu valor aproximat és de 1.443.
+
{{jsxref("Math.LOG10E")}}
+
El logaritme de E en base 10, el seu valor aproximat és de 0.434.
+
{{jsxref("Math.PI")}}
+
La proporció entre la circumferència d'un cercle i el seu diàmetre, el seu valor aproximat és de 3.14159.
+
{{jsxref("Math.SQRT1_2")}}
+
La rel quadrada de un mig (1/2); tanmateix 1 dividit per la rel quadrada de 2, el seu valor aproximat és de 0.707.
+
{{jsxref("Math.SQRT2")}}
+
La rel quadrada de 2, el seu valor aproximat és de 1.414.
+
+ +

Mètodes

+ +
+

Fixeu-vos que les funcions (sin(), cos(), tan(), asin(), acos(), atan(), atan2()) reben i retornen angles en radians. Per a convertir radians a graus cal dividir per (Math.PI / 180), o bé multiplicar si el que es pretèn es transformar graus a radians.

+
+ +
+

Cal destacar que la precisió de moltes de les funcions matemàtiques és depenent de la implementació. Això vol dir que el mateix codi pot donar resultats diferent en diferents navegadors, i fins i tot sota el mateix navegador o motor JS si es prova en diferents sistemes operatius or arquitectures.

+
+ +
+
{{jsxref("Global_Objects/Math/abs", "Math.abs(x)")}}
+
Retorna el valor absolut d'un nombre.
+
{{jsxref("Global_Objects/Math/acos", "Math.acos(x)")}}
+
Retorna l'arccosinus d'un nombre.
+
{{jsxref("Global_Objects/Math/acosh", "Math.acosh(x)")}} {{experimental_inline}}
+
Retorna l'arccosinus hiperbòlic d'un nombre.
+
{{jsxref("Global_Objects/Math/asin", "Math.asin(x)")}}
+
Tetorna l'arcsinus d'un nombre.
+
{{jsxref("Global_Objects/Math/asinh", "Math.asinh(x)")}} {{experimental_inline}}
+
Retorna l'arcsinus hiperbòlic d'un nombre.
+
{{jsxref("Global_Objects/Math/atan", "Math.atan(x)")}}
+
Retorna l'arctangent d'un nombre.
+
{{jsxref("Global_Objects/Math/atanh", "Math.atanh(x)")}} {{experimental_inline}}
+
Retorna l'arctangent hiperbòlic d'un nombre.
+
{{jsxref("Global_Objects/Math/atan2", "Math.atan2(y, x)")}}
+
Retorna l'arctangent del cocient dels paràmetres donats.
+
{{jsxref("Global_Objects/Math/cbrt", "Math.cbrt(x)")}} {{experimental_inline}}
+
Retorna la rel cúbica d'un nombre.
+
{{jsxref("Global_Objects/Math/ceil", "Math.ceil(x)")}}
+
Retorna el nombre sencer més petit que és més gran o igual al nombre donat.
+
{{jsxref("Global_Objects/Math/clz32", "Math.clz32(x)")}} {{experimental_inline}}
+
Retorna el nombre de zeros a l'esquerra que el nombre donat tindria si fós emmagatzemat en 32 bits.
+
{{jsxref("Global_Objects/Math/cos", "Math.cos(x)")}}
+
Retorna el cosinus d'un nombre.
+
{{jsxref("Global_Objects/Math/cosh", "Math.cosh(x)")}} {{experimental_inline}}
+
Retorna el cosinus hiperbòlic d'un nombre.
+
{{jsxref("Global_Objects/Math/exp", "Math.exp(x)")}}
+
Retorna Ex, on x és el paràmetre i E és la constant de Euler (2.718 aproximadament).
+
{{jsxref("Global_Objects/Math/expm1", "Math.expm1(x)")}} {{experimental_inline}}
+
Retorna exp(x) - 1.
+
{{jsxref("Global_Objects/Math/floor", "Math.floor(x)")}}
+
Retorna el nombre sencer més gran que és igual o menor que el nombre donat.
+
{{jsxref("Global_Objects/Math/fround", "Math.fround(x)")}} {{experimental_inline}}
+
Retorna el nombre en coma float de precisió simple més proper al nombre donat.
+
{{jsxref("Global_Objects/Math/hypot", "Math.hypot([x[, y[, …]]])")}} {{experimental_inline}}
+
Retorna la rel quadrada del quadrat dels dos paràmetres donats.
+
{{jsxref("Global_Objects/Math/imul", "Math.imul(x, y)")}} {{experimental_inline}}
+
Retorna el resultat de multiplicar els dos paràmetres com a nombres sencers de 32 bits.
+
{{jsxref("Global_Objects/Math/log", "Math.log(x)")}}
+
Retorna el logaritme natural (loge, també ln) d'un nombre.
+
{{jsxref("Global_Objects/Math/log1p", "Math.log1p(x)")}} {{experimental_inline}}
+
Retorna el logaritme natural de 1 + x (loge, també ln) del nombre donat.
+
{{jsxref("Global_Objects/Math/log10", "Math.log10(x)")}} {{experimental_inline}}
+
Retorna el logaritme en base 10 d'un nombre.
+
{{jsxref("Global_Objects/Math/log2", "Math.log2(x)")}} {{experimental_inline}}
+
Retorna el logaritme en base 2 d'un nombre.
+
{{jsxref("Global_Objects/Math/max", "Math.max([x[, y[, …]]])")}}
+
Retorna el major de zero o més nombres donats.
+
{{jsxref("Global_Objects/Math/min", "Math.min([x[, y[, …]]])")}}
+
Retorna el menor de zero o més nombres donats.
+
{{jsxref("Global_Objects/Math/pow", "Math.pow(base, exponent)")}}
+
Retorna la base elevada a l'exponent, és a dir, baseexponent.
+
{{jsxref("Global_Objects/Math/random", "Math.random()")}}
+
Retorna un nombre pseudo aleatori comprés entre 0 i 1.
+
{{jsxref("Global_Objects/Math/round", "Math.round(x)")}}
+
Retorna el nombre sencer més proper al nombre donat.
+
{{jsxref("Global_Objects/Math/sign", "Math.sign(x)")}} {{experimental_inline}}
+
Retorna el signe de x, indicant si x és positiu, negatiu o zero.
+
{{jsxref("Global_Objects/Math/sin", "Math.sin(x)")}}
+
Retorna el sinus d'un nombre.
+
{{jsxref("Global_Objects/Math/sinh", "Math.sinh(x)")}} {{experimental_inline}}
+
Retorna el sinus hiperbòlic d'un nombre.
+
{{jsxref("Global_Objects/Math/sqrt", "Math.sqrt(x)")}}
+
Retorna el resultat positiu de la rel quadrada d'un nombre.
+
{{jsxref("Global_Objects/Math/tan", "Math.tan(x)")}}
+
Retorna la tangent d'un nombre.
+
{{jsxref("Global_Objects/Math/tanh", "Math.tanh(x)")}} {{experimental_inline}}
+
Retorna la tangent hiperbòlica d'un nombre.
+
Math.toSource() {{non-standard_inline}}
+
Retorna la cadena de caràcters "Math".
+
{{jsxref("Global_Objects/Math/trunc", "Math.trunc(x)")}} {{experimental_inline}}
+
Retorna la part sencera del nombre donat.
+
+ +

Especificacions

+ + + + + + + + + + + + + + + + + + + + + + + + +
EspecificacióEstatComentaris
ECMAScript 1a Edició.StandardDefinició inicial. Implementada a JavaScript 1.1.
{{SpecName('ES5.1', '#sec-15.8', 'Math')}}{{Spec2('ES5.1')}} 
{{SpecName('ES6', '#sec-math-object', 'Math')}}{{Spec2('ES6')}}Nous mètodes afegits: {{jsxref("Math.log10()", "log10()")}}, {{jsxref("Math.log2()", "log2()")}}, {{jsxref("Math.log1p()", "log1p()")}}, {{jsxref("Math.expm1()", "expm1()")}}, {{jsxref("Math.cosh()", "cosh()")}}, {{jsxref("Math.sinh()", "sinh()")}}, {{jsxref("Math.tanh()", "tanh()")}}, {{jsxref("Math.acosh()", "acosh()")}}, {{jsxref("Math.asinh()", "asinh()")}}, {{jsxref("Math.atanh()", "atanh()")}}, {{jsxref("Math.hypot()", "hypot()")}}, {{jsxref("Math.trunc()", "trunc()")}}, {{jsxref("Math.sign()", "sign()")}}, {{jsxref("Math.imul()", "imul()")}}, {{jsxref("Math.fround()", "fround()")}}, {{jsxref("Math.cbrt()", "cbrt()")}} i {{jsxref("Math.clz32()", "clz32()")}}.
+ +

Compatibilitat amb navegadors

+ +
{{CompatibilityTable}}
+ +
+ + + + + + + + + + + + + + + + + + + +
CaracterísticaChromeFirefox (Gecko)Internet ExplorerOperaSafari
Suport bàsic{{CompatVersionUnknown}}{{CompatVersionUnknown}}{{CompatVersionUnknown}}{{CompatVersionUnknown}}{{CompatVersionUnknown}}
+
+ +
+ + + + + + + + + + + + + + + + + + + + + +
CaracterísticaAndroidChrome for AndroidFirefox Mobile (Gecko)IE MobileOpera MobileSafari Mobile
Suport bàsic{{CompatVersionUnknown}}{{CompatVersionUnknown}}{{CompatVersionUnknown}}{{CompatVersionUnknown}}{{CompatVersionUnknown}}{{CompatVersionUnknown}}
+
+ +

Vegeu també

+ + diff --git a/files/ca/web/javascript/reference/global_objects/math/ln10/index.html b/files/ca/web/javascript/reference/global_objects/math/ln10/index.html new file mode 100644 index 0000000000..42107c85f5 --- /dev/null +++ b/files/ca/web/javascript/reference/global_objects/math/ln10/index.html @@ -0,0 +1,118 @@ +--- +title: Math.LN10 +slug: Web/JavaScript/Referencia/Objectes_globals/Math/LN10 +translation_of: Web/JavaScript/Reference/Global_Objects/Math/LN10 +--- +
{{JSRef("Global_Objects", "Math")}}
+ +

Resum

+ +

La propietat Math.LN10 representa el logaritme natural de 10, aproximadament 2.302:

+ +

Math.LN10=ln(10)2.302\mathtt{\mi{Math.LN10}} = \ln(10) \approx 2.302

+ +
{{js_property_attributes(0, 0, 0)}}
+ +

Descripció

+ +

Degut a que LN10 és una propietat estàtica de Math, aquesta sempre s'accedeix mitjançant el codi Math.LN10, en comptes de com una propietat d'un objecte Math creat (Math no és un constructor).

+ +

Exemples

+ +

Exemple: Utilitzar Math.LN10

+ +

La funció següent retorna el logaritme natural de 10:

+ +
function getNatLog10() {
+  return Math.LN10;
+}
+
+getNatLog10(); // 2.302585092994046
+
+ +

Especificacions

+ + + + + + + + + + + + + + + + + + + + + + + + +
EspecificacióEstatComentaris
ECMAScript 1a Edició.StandardDefinició inicial. Implementat a JavaScript 1.0.
{{SpecName('ES5.1', '#sec-15.8.1.2', 'Math.LN10')}}{{Spec2('ES5.1')}} 
{{SpecName('ES6', '#sec-math.ln10', 'Math.LN10')}}{{Spec2('ES6')}} 
+ +

Compatibilitat amb navegadors

+ +
{{CompatibilityTable}}
+ +
+ + + + + + + + + + + + + + + + + + + +
CaracterístiquesChromeFirefox (Gecko)Internet ExplorerOperaSafari
Suport bàsic{{CompatVersionUnknown}}{{CompatVersionUnknown}}{{CompatVersionUnknown}}{{CompatVersionUnknown}}{{CompatVersionUnknown}}
+
+ +
+ + + + + + + + + + + + + + + + + + + + + +
CaracterístiquesAndroidChrome for AndroidFirefox Mobile (Gecko)IE MobileOpera MobileSafari Mobile
Suport bàsic{{CompatVersionUnknown}}{{CompatVersionUnknown}}{{CompatVersionUnknown}}{{CompatVersionUnknown}}{{CompatVersionUnknown}}{{CompatVersionUnknown}}
+
+ +

Vegeu també

+ + diff --git a/files/ca/web/javascript/reference/global_objects/math/ln2/index.html b/files/ca/web/javascript/reference/global_objects/math/ln2/index.html new file mode 100644 index 0000000000..92cf2693f2 --- /dev/null +++ b/files/ca/web/javascript/reference/global_objects/math/ln2/index.html @@ -0,0 +1,118 @@ +--- +title: Math.LN2 +slug: Web/JavaScript/Referencia/Objectes_globals/Math/LN2 +translation_of: Web/JavaScript/Reference/Global_Objects/Math/LN2 +--- +
{{JSRef("Global_Objects", "Math")}}
+ +

Resum

+ +

La propietat Math.LN2 representa el logaritme natural de 2, aproximadament 0.693:

+ +

Math.LN2=ln(2)0.693\mathtt{\mi{Math.LN2}} = \ln(2) \approx 0.693

+ +
{{js_property_attributes(0, 0, 0)}}
+ +

Descripció

+ +

Degut a que LN2 és una propietat estàtica de Math, sempre s'accedeix a aquesta mitjançant el codi Math.LN2 en comptes d'accedir a la propietat d'un objecte de Math ja creat (Math no és un constructor).

+ +

Exemples

+ +

Exemple: Utilitzar Math.LN2

+ +

La següent funció retorna el logaritme natural de 2:

+ +
function getNatLog2() {
+  return Math.LN2;
+}
+
+getNatLog2(); // 0.6931471805599453
+
+ +

Especificacions

+ + + + + + + + + + + + + + + + + + + + + + + + +
EspecificacióEstatComentaris
ECMAScript 1a Edició.StandardDefinició inicial. Implementat a JavaScript 1.0.
{{SpecName('ES5.1', '#sec-15.8.1.3', 'Math.LN2')}}{{Spec2('ES5.1')}} 
{{SpecName('ES6', '#sec-math.ln2', 'Math.LN2')}}{{Spec2('ES6')}} 
+ +

Compatibilitat amb navegadors

+ +
{{CompatibilityTable}}
+ +
+ + + + + + + + + + + + + + + + + + + +
CaracterísticaChromeFirefox (Gecko)Internet ExplorerOperaSafari
Suport bàsic{{CompatVersionUnknown}}{{CompatVersionUnknown}}{{CompatVersionUnknown}}{{CompatVersionUnknown}}{{CompatVersionUnknown}}
+
+ +
+ + + + + + + + + + + + + + + + + + + + + +
CaracterísticaAndroidChrome for AndroidFirefox Mobile (Gecko)IE MobileOpera MobileSafari Mobile
Suport bàsic{{CompatVersionUnknown}}{{CompatVersionUnknown}}{{CompatVersionUnknown}}{{CompatVersionUnknown}}{{CompatVersionUnknown}}{{CompatVersionUnknown}}
+
+ +

Vegeu també

+ + diff --git a/files/ca/web/javascript/reference/global_objects/math/log/index.html b/files/ca/web/javascript/reference/global_objects/math/log/index.html new file mode 100644 index 0000000000..a3d8467ae5 --- /dev/null +++ b/files/ca/web/javascript/reference/global_objects/math/log/index.html @@ -0,0 +1,137 @@ +--- +title: Math.log() +slug: Web/JavaScript/Referencia/Objectes_globals/Math/log +translation_of: Web/JavaScript/Reference/Global_Objects/Math/log +--- +
{{JSRef}}
+ +

La funció Math.log() retorna el logaritme natural (base {{jsxref("Math.E", "e")}}) d'un nombre, és a dir

+ +

x>0,Math.log(x)=ln(x)=la únicaytal queey=x\forall x > 0, \mathtt{\operatorname{Math.log}(x)} = \ln(x) = \text{the unique} \; y \; \text{such that} \; e^y = x

+ +

Sintaxi

+ +
Math.log(x)
+ +

Paràmetres

+ +
+
x
+
Un nombre.
+
+ +

Descripció

+ +

Si el valor de x és negatiu, el valor retornat sempre serà {{jsxref("NaN")}}.

+ +

Degut a que log() és un mètode estàtic de Math, sempre s'utilitza com a Math.log(), en comptes de com a mètode d'una instància de Math (Math no és un constructor).

+ +

Exemples

+ +

Utilitzar Math.log()

+ +
Math.log(-1); // NaN, fora de rang
+Math.log(0);  // -Infinit
+Math.log(1);  // 0
+Math.log(10); // 2.302585092994046
+
+ +

Utilitzar Math.log() amb una base diferent

+ +

La funció següent retorna el logaritme de y amb base x (és a dir, logxy\log_x y):

+ +
function getBaseLog(x, y) {
+  return Math.log(y) / Math.log(x);
+}
+
+ +

Si es crida getBaseLog(10, 1000) retornarà 2.9999999999999996 degut a l'arrodoniment de punt flotant, el qual és molt proper a la resposta real: 3.

+ +

Especificacions

+ + + + + + + + + + + + + + + + + + + + + + + + +
EspecificacionsEstatComentaris
{{SpecName('ES1')}}{{Spec2('ES1')}}Definició inicial. Implementat a JavaScript 1.0.
{{SpecName('ES5.1', '#sec-15.8.2.10', 'Math.log')}}{{Spec2('ES5.1')}} 
{{SpecName('ES6', '#sec-math.log', 'Math.log')}}{{Spec2('ES6')}} 
+ +

Compatibilitat amb navegadors

+ +
{{CompatibilityTable}}
+ +
+ + + + + + + + + + + + + + + + + + + +
CaracterísticaChromeFirefox (Gecko)Internet ExplorerOperaSafari
Suport bàsic{{CompatVersionUnknown}}{{CompatVersionUnknown}}{{CompatVersionUnknown}}{{CompatVersionUnknown}}{{CompatVersionUnknown}}
+
+ +
+ + + + + + + + + + + + + + + + + + + + + +
CaracterísticaAndroidChrome for AndroidFirefox Mobile (Gecko)IE MobileOpera MobileSafari Mobile
Suport bàsic{{CompatVersionUnknown}}{{CompatVersionUnknown}}{{CompatVersionUnknown}}{{CompatVersionUnknown}}{{CompatVersionUnknown}}{{CompatVersionUnknown}}
+
+ +

Vegeu també

+ + diff --git a/files/ca/web/javascript/reference/global_objects/math/log10/index.html b/files/ca/web/javascript/reference/global_objects/math/log10/index.html new file mode 100644 index 0000000000..1a82f34848 --- /dev/null +++ b/files/ca/web/javascript/reference/global_objects/math/log10/index.html @@ -0,0 +1,126 @@ +--- +title: Math.log10() +slug: Web/JavaScript/Referencia/Objectes_globals/Math/log10 +translation_of: Web/JavaScript/Reference/Global_Objects/Math/log10 +--- +
{{JSRef}}
+ +

La funció Math.log10() retorna el logaritme en base 10 d'un nombre, és a dir

+ +

x>0,Math.log10(x)=log10(x)=la únicaytal que10y=x\forall x > 0, \mathtt{\operatorname{Math.log10}(x)} = \log_10(x) = \text{the unique} \; y \; \text{such that} \; 10^y = x

+ +

Sintaxi

+ +
Math.log10(x)
+ +

Paràmetres

+ +
+
x
+
Un nombre.
+
+ +

Descripció

+ +

Si el valor de x és menor que 0, el valor retornat sempre és {{jsxref("NaN")}}.

+ +

Com que log10() és un mètode estàtic de Math, sempre s'utilitza com Math.log10() en comptes de com un mètode d'un objecte Math creat (Math no és un constructor).

+ +

Exemples

+ +

Utilitzar Math.log10()

+ +
Math.log10(2);      // 0.3010299956639812
+Math.log10(1);      // 0
+Math.log10(0);      // -Infinit
+Math.log10(-2);     // NaN
+Math.log10(100000); // 5
+
+ +

Polyfill

+ +

Aquesta funció pot ser emulada mitjançant el següent codi:

+ +
Math.log10 = Math.log10 || function(x) {
+  return Math.log(x) / Math.LN10;
+};
+
+ +

Especificacions

+ + + + + + + + + + + + + + +
EspecificacióEstatComentaris
{{SpecName('ES6', '#sec-math.log10', 'Math.log10')}}{{Spec2('ES6')}}Definició inicial.
+ +

Compatibilitat amb navegadors

+ +
{{CompatibilityTable}}
+ +
+ + + + + + + + + + + + + + + + + + + +
CaracterísticaChromeFirefox (Gecko)Internet ExplorerOperaSafari
Suport bàsic{{CompatChrome("38")}}{{CompatGeckoDesktop("25")}}{{CompatNo}}{{CompatOpera("25")}}{{CompatSafari("7.1")}}
+
+ +
+ + + + + + + + + + + + + + + + + + + + + +
CaracterísticaAndroidChrome for AndroidFirefox Mobile (Gecko)IE MobileOpera MobileSafari Mobile
Suport bàsic{{CompatNo}}{{CompatNo}}{{CompatGeckoMobile("25")}}{{CompatNo}}{{CompatNo}}8
+
+ +

Vegeu també

+ + diff --git a/files/ca/web/javascript/reference/global_objects/math/log10e/index.html b/files/ca/web/javascript/reference/global_objects/math/log10e/index.html new file mode 100644 index 0000000000..299c8d12ed --- /dev/null +++ b/files/ca/web/javascript/reference/global_objects/math/log10e/index.html @@ -0,0 +1,118 @@ +--- +title: Math.LOG10E +slug: Web/JavaScript/Referencia/Objectes_globals/Math/LOG10E +translation_of: Web/JavaScript/Reference/Global_Objects/Math/LOG10E +--- +
{{JSRef("Global_Objects", "Math")}}
+ +

Resum

+ +

La propietat Math.LOG10E representa el logaritme en base 10 de e, el valor del qual és aproximadament 0.434:

+ +

Math.LOG10E=log10(e)0.434\mathtt{\mi{Math.LOG10E}} = \log_10(e) \approx 0.434

+ +
{{js_property_attributes(0, 0, 0)}}
+ +

Descripció

+ +

Degut a que LOG10E és una propietat estàtica de l'objecte Math, sempre s'obté el seu valor mitjançant Math.LOG10E en comptes d'accedir a la propietat d'un objecte instanciat de Math (Math no és un constructor).

+ +

Exemples

+ +

Exemple: Utilitzar Math.LOG10E

+ +

La funció següent retorna el logaritme en base 10 de e:

+ +
function getLog10e() {
+  return Math.LOG10E;
+}
+
+getLog10e(); // 0.4342944819032518
+
+ +

Especificacions

+ + + + + + + + + + + + + + + + + + + + + + + + +
EspecificacióEstatComentaris
ECMAScript 1a Edició.StandardDefinició inicial. Implementat a JavaScript 1.0.
{{SpecName('ES5.1', '#sec-15.8.1.5', 'Math.LOG10E')}}{{Spec2('ES5.1')}} 
{{SpecName('ES6', '#sec-math.log10e', 'Math.LOG10E')}}{{Spec2('ES6')}} 
+ +

Compatibilitat amb navegadors

+ +
{{CompatibilityTable}}
+ +
+ + + + + + + + + + + + + + + + + + + +
CaracterísticaChromeFirefox (Gecko)Internet ExplorerOperaSafari
Suport bàsic{{CompatVersionUnknown}}{{CompatVersionUnknown}}{{CompatVersionUnknown}}{{CompatVersionUnknown}}{{CompatVersionUnknown}}
+
+ +
+ + + + + + + + + + + + + + + + + + + + + +
CaracterísticaAndroidChrome for AndroidFirefox Mobile (Gecko)IE MobileOpera MobileSafari Mobile
Suport bàsic{{CompatVersionUnknown}}{{CompatVersionUnknown}}{{CompatVersionUnknown}}{{CompatVersionUnknown}}{{CompatVersionUnknown}}{{CompatVersionUnknown}}
+
+ +

Vegeu també

+ + diff --git a/files/ca/web/javascript/reference/global_objects/math/log1p/index.html b/files/ca/web/javascript/reference/global_objects/math/log1p/index.html new file mode 100644 index 0000000000..1a0eb32cd5 --- /dev/null +++ b/files/ca/web/javascript/reference/global_objects/math/log1p/index.html @@ -0,0 +1,125 @@ +--- +title: Math.log1p() +slug: Web/JavaScript/Referencia/Objectes_globals/Math/log1p +translation_of: Web/JavaScript/Reference/Global_Objects/Math/log1p +--- +
{{JSRef}}
+ +

La funció Math.log1p() retorna el logaritme natural (base {{jsxref("Math.E", "e")}}) de 1 + un nombre, és a dir

+ +

x>-1,Math.log1p(x)=ln(1+x)\forall x > -1, \mathtt{\operatorname{Math.log1p}(x)} = \ln(1 + x)

+ +

Sintaxi

+ +
Math.log1p(x)
+ +

Paràmetres

+ +
+
x
+
Un nombre.
+
+ +

Descripció

+ +

Si el valor de x és menor que -1, el valor retornat sempre serà {{jsxref("NaN")}}.

+ +

Com que log1p() és un mètode estàtic de Math, sempre s'utilitza com Math.log1p() en comptes de com un mètode d'un objecte Math creat (Math no és un constructor).

+ +

Exemples

+ +

Utilitzar Math.log1p()

+ +
Math.log1p(1);  // 0.6931471805599453
+Math.log1p(0);  // 0
+Math.log1p(-1); // -Infinit
+Math.log1p(-2); // NaN
+
+ +

Polyfill

+ +

Aquesta funció pot ser emulada mitjançant la funció següent:

+ +
Math.log1p = Math.log1p || function(x) {
+  return Math.log(1 + x);
+};
+
+ +

Especificacions

+ + + + + + + + + + + + + + +
EspecificacióEstatComentaris
{{SpecName('ES6', '#sec-math.log1p', 'Math.log1p')}}{{Spec2('ES6')}}Definició inicial.
+ +

Compatibilitat amb navegadors

+ +
{{CompatibilityTable}}
+ +
+ + + + + + + + + + + + + + + + + + + +
CaracterísticaChromeFirefox (Gecko)Internet ExplorerOperaSafari
Suport bàsic{{CompatChrome("38")}}{{CompatGeckoDesktop("25")}}{{CompatNo}}{{CompatOpera("25")}}{{CompatSafari("7.1")}}
+
+ +
+ + + + + + + + + + + + + + + + + + + + + +
CaracterísticaAndroidChrome for AndroidFirefox Mobile (Gecko)IE MobileOpera MobileSafari Mobile
Suport bàsic{{CompatNo}}{{CompatNo}}{{CompatGeckoMobile("25")}}{{CompatNo}}{{CompatNo}}8
+
+ +

Vegeu també

+ + diff --git a/files/ca/web/javascript/reference/global_objects/math/log2/index.html b/files/ca/web/javascript/reference/global_objects/math/log2/index.html new file mode 100644 index 0000000000..0806bd75ff --- /dev/null +++ b/files/ca/web/javascript/reference/global_objects/math/log2/index.html @@ -0,0 +1,127 @@ +--- +title: Math.log2() +slug: Web/JavaScript/Referencia/Objectes_globals/Math/log2 +translation_of: Web/JavaScript/Reference/Global_Objects/Math/log2 +--- +
{{JSRef}}
+ +

La funció Math.log2() retorna el logaritme en base 2 d'un nombre, és a dir

+ +

x>0,Math.log2(x)=log2(x)=la únicaytal que2y=x\forall x > 0, \mathtt{\operatorname{Math.log2}(x)} = \log_2(x) = \text{the unique} \; y \; \text{such that} \; 2^y = x

+ +

Sintaxi

+ +
Math.log2(x)
+ +

Paràmetres

+ +
+
x
+
Un nombre.
+
+ +

Descripció

+ +

Si el valor de x és menor que 0, el valor retornat sempre serà {{jsxref("NaN")}}.

+ +

Com que log2() és un mètode estàtic de Math, sempre s'utilitza com Math.log2() en comptes de com un mètode d'un objecte Math creat (Math no és un constructor).

+ +

Exemples

+ +

Utilitzar Math.log2()

+ +
Math.log2(3);    // 1.584962500721156
+Math.log2(2);    // 1
+Math.log2(1);    // 0
+Math.log2(0);    // -Infinit
+Math.log2(-2);   // NaN
+Math.log2(1024); // 10
+
+ +

Polyfill

+ +

Aquest Polyfill emula la funció Math.log2. Cal destacar que retorna valors imprecisos per a algunes entrades (com ara 1 << 29), embolcalleu-la amb {{jsxref("Math.round()")}} si esteu treballant amb màscares de bits.

+ +
Math.log2 = Math.log2 || function(x) {
+  return Math.log(x) / Math.LN2;
+};
+
+ +

Especificacions

+ + + + + + + + + + + + + + +
EspecificacióEstatComentaris
{{SpecName('ES6', '#sec-math.log2', 'Math.log2')}}{{Spec2('ES6')}}Definició inicial.
+ +

Compatibilitat amb navegadors

+ +
{{CompatibilityTable}}
+ +
+ + + + + + + + + + + + + + + + + + + +
CaracterísticaChromeFirefox (Gecko)Internet ExplorerOperaSafari
Suport bàsic{{CompatChrome("38")}}{{CompatGeckoDesktop("25")}}{{CompatNo}}{{CompatOpera("25")}}{{CompatSafari("7.1")}}
+
+ +
+ + + + + + + + + + + + + + + + + + + + + +
CaracterísticaAndroidChrome for AndroidFirefox Mobile (Gecko)IE MobileOpera MobileSafari Mobile
Suport bàsic{{CompatNo}}{{CompatNo}}{{CompatGeckoMobile("25")}}{{CompatNo}}{{CompatNo}}8
+
+ +

Vegeu també

+ + diff --git a/files/ca/web/javascript/reference/global_objects/math/log2e/index.html b/files/ca/web/javascript/reference/global_objects/math/log2e/index.html new file mode 100644 index 0000000000..2f37ae44c1 --- /dev/null +++ b/files/ca/web/javascript/reference/global_objects/math/log2e/index.html @@ -0,0 +1,118 @@ +--- +title: Math.LOG2E +slug: Web/JavaScript/Referencia/Objectes_globals/Math/LOG2E +translation_of: Web/JavaScript/Reference/Global_Objects/Math/LOG2E +--- +
{{JSRef("Global_Objects", "Math")}}
+ +

Resum

+ +

La propietat Math.LOG2E representa el logaritme de e en base 2, el valor del qual és aproximadament 1.442:

+ +

Math.LOG2E=log2(e)1.442\mathtt{\mi{Math.LOG2E}} = \log_2(e) \approx 1.442

+ +
{{js_property_attributes(0, 0, 0)}}
+ +

Descripció

+ +

Com que LOG2E és una propietat estàtica de Math, sempre s'utilitza mitjançant la forma Math.LOG2E, en comptes d'accedir a la propietat d'un objecte Math creat (Math no és un constructor).

+ +

Exemples

+ +

Exemple: Utilitzar Math.LOG2E

+ +

La següent funció retorna el logaritme de e en base 2:

+ +
function getLog2e() {
+  return Math.LOG2E;
+}
+
+getLog2e(); // 1.4426950408889634
+
+ +

Especificacions

+ + + + + + + + + + + + + + + + + + + + + + + + +
EspecificacióEstatComentaris
ECMAScript 1a Edició.StandardDefinició inicial. Implementat a JavaScript 1.0.
{{SpecName('ES5.1', '#sec-15.8.1.4', 'Math.LOG2E')}}{{Spec2('ES5.1')}} 
{{SpecName('ES6', '#sec-math.log2e', 'Math.LOG2E')}}{{Spec2('ES6')}} 
+ +

Compatibilitat amb navegadors

+ +
{{CompatibilityTable}}
+ +
+ + + + + + + + + + + + + + + + + + + +
CaracterísticaChromeFirefox (Gecko)Internet ExplorerOperaSafari
Suport bàsic{{CompatVersionUnknown}}{{CompatVersionUnknown}}{{CompatVersionUnknown}}{{CompatVersionUnknown}}{{CompatVersionUnknown}}
+
+ +
+ + + + + + + + + + + + + + + + + + + + + +
CaracterísticaAndroidChrome for AndroidFirefox Mobile (Gecko)IE MobileOpera MobileSafari Mobile
Suport bàsic{{CompatVersionUnknown}}{{CompatVersionUnknown}}{{CompatVersionUnknown}}{{CompatVersionUnknown}}{{CompatVersionUnknown}}{{CompatVersionUnknown}}
+
+ +

Vegeu també

+ + diff --git a/files/ca/web/javascript/reference/global_objects/math/max/index.html b/files/ca/web/javascript/reference/global_objects/math/max/index.html new file mode 100644 index 0000000000..791b5dfdfe --- /dev/null +++ b/files/ca/web/javascript/reference/global_objects/math/max/index.html @@ -0,0 +1,134 @@ +--- +title: Math.max() +slug: Web/JavaScript/Referencia/Objectes_globals/Math/max +translation_of: Web/JavaScript/Reference/Global_Objects/Math/max +--- +
{{JSRef}}
+ +

La funció Math.max() retorna el nombre més gran de zero o més nombres.

+ +

Sintaxi

+ +
Math.max([valor1[, valor2[, ...]]])
+ +

Paràmetres

+ +
+
valor1, valor2, ...
+
Nombres.
+
+ +

Descripció

+ +

Com que max() és un mètode estàtic de Math, sempre s'utilitza com Math.max() en comptes de com un mètode d'un objecte Math creat (Math no és un constructor).

+ +

Si no es proporciona cap argument, el resultat és -{{jsxref("Infinity")}}.

+ +

Si al menys un dels arguments no pot convertir-se a un nombre, el resultat és {{jsxref("NaN")}}.

+ +

Exemples

+ +

Utilitzar Math.max()

+ +
Math.max(10, 20);   //  20
+Math.max(-10, -20); // -10
+Math.max(-10, 20);  //  20
+
+ +

La següent funció utilitza {{jsxref("Function.prototype.apply()")}} per a trobar l'element màxim d'un array numèric. getMaxOfArray([1, 2, 3]) és equivalent a Math.max(1, 2, 3), però getMaxOfArray() pot emprar-se en arrays de qualsevol mida construits programàticament.

+ +
function getMaxOfArray(numArray) {
+  return Math.max.apply(null, numArray);
+}
+
+ +

O bé amb el nou {{jsxref("Operators/Spread_operator", "operador spread")}}, obtenir el nombre màxim d'un array és molt més simple.

+ +
var arr = [1, 2, 3];
+var max = Math.max(...arr);
+
+ +

Especificacions

+ + + + + + + + + + + + + + + + + + + + + + + + +
EspecificacióEstatComentaris
{{SpecName('ES1')}}{{Spec2('ES1')}}Definició inicial. Implementat a JavaScript 1.0.
{{SpecName('ES5.1', '#sec-15.8.2.11', 'Math.max')}}{{Spec2('ES5.1')}} 
{{SpecName('ES6', '#sec-math.max', 'Math.max')}}{{Spec2('ES6')}} 
+ +

Compatibilitat amb navegadors

+ +
{{CompatibilityTable}}
+ +
+ + + + + + + + + + + + + + + + + + + +
CaracterísticaChromeFirefox (Gecko)Internet ExplorerOperaSafari
Suport bàsic{{CompatVersionUnknown}}{{CompatVersionUnknown}}{{CompatVersionUnknown}}{{CompatVersionUnknown}}{{CompatVersionUnknown}}
+
+ +
+ + + + + + + + + + + + + + + + + + + + + +
CaracterísticaAndroidChrome for AndroidFirefox Mobile (Gecko)IE MobileOpera MobileSafari Mobile
Suport bàsic{{CompatVersionUnknown}}{{CompatVersionUnknown}}{{CompatVersionUnknown}}{{CompatVersionUnknown}}{{CompatVersionUnknown}}{{CompatVersionUnknown}}
+
+ +

Vegeu també

+ + diff --git a/files/ca/web/javascript/reference/global_objects/math/min/index.html b/files/ca/web/javascript/reference/global_objects/math/min/index.html new file mode 100644 index 0000000000..909e6ff2ee --- /dev/null +++ b/files/ca/web/javascript/reference/global_objects/math/min/index.html @@ -0,0 +1,140 @@ +--- +title: Math.min() +slug: Web/JavaScript/Referencia/Objectes_globals/Math/min +translation_of: Web/JavaScript/Reference/Global_Objects/Math/min +--- +
{{JSRef}}
+ +

La funció Math.min() retorna el més petit de zero o més nombres.

+ +

Sintaxi

+ +
Math.min([valor1[, valor2[, ...]]])
+ +

Paràmetres

+ +
+
valor1, valor2, ...
+
Nombres.
+
+ +

Descripció

+ +

Degut a que min() és un mètode estàtic de Math, sempre s'utilitza com a Math.min(), en comptes de com a mètode d'una instància de Math (Math no és un constructor).

+ +

Si no es proporciona cap argument, el resultat és {{jsxref("Infinity")}}.

+ +

Si al menys un dels arguments no pot ser convertit a nombre, el resultat és {{jsxref("NaN")}}.

+ +

Exemples

+ +

Utilitzar Math.min()

+ +

Aquest codi troba el valor mínim de x i y i l'assigna a z:

+ +
var x = 10, y = -20;
+var z = Math.min(x, y);
+
+ +

Limitar un nombre amb Math.min()

+ +

Sovint s'utilitza Math.min() per a limitar un valor de manera que sempre sigui igual o menor que un límit. Per exemple, aquest codi

+ +
var x = f(foo);
+
+if (x > limit) {
+  x = limit;
+}
+
+ +

es podria escriure de la següent manera:

+ +
var x = Math.min(f(foo), limit);
+
+ +

{{jsxref("Math.max()")}} es pot emprar d'una manera similar per a limitar un valor a l'altre límit.

+ +

Especificacions

+ + + + + + + + + + + + + + + + + + + + + + + + +
EspecificacióEstatComentaris
{{SpecName('ES1')}}{{Spec2('ES1')}}Definició inicial. Implementat a JavaScript 1.0.
{{SpecName('ES5.1', '#sec-15.8.2.12', 'Math.min')}}{{Spec2('ES5.1')}} 
{{SpecName('ES6', '#sec-math.min', 'Math.min')}}{{Spec2('ES6')}} 
+ +

Compatibilitat amb navegadors

+ +
{{CompatibilityTable}}
+ +
+ + + + + + + + + + + + + + + + + + + +
CaracterísticaChromeFirefox (Gecko)Internet ExplorerOperaSafari
Suport bàsic{{CompatVersionUnknown}}{{CompatVersionUnknown}}{{CompatVersionUnknown}}{{CompatVersionUnknown}}{{CompatVersionUnknown}}
+
+ +
+ + + + + + + + + + + + + + + + + + + + + +
CaracterísticaAndroidChrome for AndroidFirefox Mobile (Gecko)IE MobileOpera MobileSafari Mobile
Suport bàsic{{CompatVersionUnknown}}{{CompatVersionUnknown}}{{CompatVersionUnknown}}{{CompatVersionUnknown}}{{CompatVersionUnknown}}{{CompatVersionUnknown}}
+
+ +

Vegeu també

+ + diff --git a/files/ca/web/javascript/reference/global_objects/math/pi/index.html b/files/ca/web/javascript/reference/global_objects/math/pi/index.html new file mode 100644 index 0000000000..b867c953df --- /dev/null +++ b/files/ca/web/javascript/reference/global_objects/math/pi/index.html @@ -0,0 +1,116 @@ +--- +title: Math.PI +slug: Web/JavaScript/Referencia/Objectes_globals/Math/PI +translation_of: Web/JavaScript/Reference/Global_Objects/Math/PI +--- +
{{JSRef("Global_Objects", "Math")}}
+ +

Resum

+ +

La propietat Math.PI representa el ratio entre la circumferència d'un crecle i el seu diàmetre, el seu valor aproximat és de 3.14159:

+ +

Math.PI=π3.14159\mathtt{\mi{Math.PI}} = \pi \approx 3.14159

+ +
{{js_property_attributes(0, 0, 0)}}
+ +

Descripció

+ +

Com que PI és una propietat estàtica de Math, sempre s'utilitza amb la forma Math.PI, ren comptes de com una propietat d'un objecte Math ja creat (Math on és un constructor).

+ +

Exemples

+ +

Exemple: Utilitzar Math.PI

+ +

La funció següent utilitza Math.PI per a calcular la circumferència d'un cercle a partir del radi que rep.

+ +
function calculateCircumference(radius) {
+  return 2 * Math.PI * radius;
+}
+
+calculateCircumference(1);  // 6.283185307179586
+
+ +

Especificacions

+ + + + + + + + + + + + + + + + + + + + + + + + +
EspecificacióEstatComentaris
ECMAScript 1a Edició.StandardDefinició inicial. Implementat a JavaScript 1.0.
{{SpecName('ES5.1', '#sec-15.8.1.6', 'Math.PI')}}{{Spec2('ES5.1')}} 
{{SpecName('ES6', '#sec-math.pi', 'Math.PI')}}{{Spec2('ES6')}} 
+ +

Compatibilitat amb navegadors

+ +
{{CompatibilityTable}}
+ +
+ + + + + + + + + + + + + + + + + + + +
CaracterísticaChromeFirefox (Gecko)Internet ExplorerOperaSafari
Suport bàsic{{CompatVersionUnknown}}{{CompatVersionUnknown}}{{CompatVersionUnknown}}{{CompatVersionUnknown}}{{CompatVersionUnknown}}
+
+ +
+ + + + + + + + + + + + + + + + + + + + + +
CaracterísticaAndroidChrome for AndroidFirefox Mobile (Gecko)IE MobileOpera MobileSafari Mobile
Suport bàsic{{CompatVersionUnknown}}{{CompatVersionUnknown}}{{CompatVersionUnknown}}{{CompatVersionUnknown}}{{CompatVersionUnknown}}{{CompatVersionUnknown}}
+
+ +

Vegeu també

+ + diff --git a/files/ca/web/javascript/reference/global_objects/math/pow/index.html b/files/ca/web/javascript/reference/global_objects/math/pow/index.html new file mode 100644 index 0000000000..efe89000e9 --- /dev/null +++ b/files/ca/web/javascript/reference/global_objects/math/pow/index.html @@ -0,0 +1,140 @@ +--- +title: Math.pow() +slug: Web/JavaScript/Referencia/Objectes_globals/Math/pow +translation_of: Web/JavaScript/Reference/Global_Objects/Math/pow +--- +
{{JSRef}}
+ +

La funció Math.pow() retorna la base elevada a exponent, és a dir, baseexponent.

+ +

Sintaxi

+ +
Math.pow(base, exponent)
+ +

Paràmetres

+ +
+
base
+
El nombre base.
+
exponent
+
L'exponent que s'usarà per a elevar la base.
+
+ +

Descripció

+ +

Com que pow() és un mètode estàtic de Math, sempre s'utilitza com Math.pow() en comptes de com un mètode d'un objecte Math creat (Math no és un constructor).

+ +

Exemples

+ +

Utilitzar Math.pow()

+ +
// simple
+Math.pow(7, 2);    // 49
+Math.pow(7, 3);    // 343
+Math.pow(2, 10);   // 1024
+// exponents fractionals
+Math.pow(4, 0.5);  // 2 (rel quadrada de 4)
+Math.pow(8, 1/3);  // 2 (rel cúbica de 8)
+Math.pow(2, 0.5);  // 1.412135623730951 (rel quadrada de 2)
+Math.pow(2, 1/3);  // 1.2599210498948732 (rel cúbica de 2)
+// exponents amb signe
+Math.pow(7, -2);   // 0.02040816326530612 (1/49)
+Math.pow(8, -1/3); // 0.5
+// bases amb signe
+Math.pow(-7, 2);   // 49 (qualsevol nombre elevat al quadrat és positiu)
+Math.pow(-7, 3);   // -343 (nombres elevats al cub poden ser negatius)
+Math.pow(-7, 0.5); // NaN (els nombres negatius no tenen una rel quadrada real)
+// degut a rels "parells" i "senars" estan aprox l'una de l'altra
+// i a límits en la precisió dels nombres de punt flotant,
+// bases negatives amb exponents fraccionals sempre retornen NaN
+Math.pow(-7, 1/3); // NaN
+
+ +

Especificacions

+ + + + + + + + + + + + + + + + + + + + + + + + +
EspecificacióEstatComentaris
{{SpecName('ES1')}}{{Spec2('ES1')}}Definició inicial. Implementat a JavaScript 1.0.
{{SpecName('ES5.1', '#sec-15.8.2.13', 'Math.pow')}}{{Spec2('ES5.1')}} 
{{SpecName('ES6', '#sec-math.pow', 'Math.pow')}}{{Spec2('ES6')}} 
+ +

Compatibilitat amb navegadors

+ +
{{CompatibilityTable}}
+ +
+ + + + + + + + + + + + + + + + + + + +
CaracterísticaChromeFirefox (Gecko)Internet ExplorerOperaSafari
Suport bàsic{{CompatVersionUnknown}}{{CompatVersionUnknown}}{{CompatVersionUnknown}}{{CompatVersionUnknown}}{{CompatVersionUnknown}}
+
+ +
+ + + + + + + + + + + + + + + + + + + + + +
CaracterísticaAndroidChrome for AndroidFirefox Mobile (Gecko)IE MobileOpera MobileSafari Mobile
Suport bàsic{{CompatVersionUnknown}}{{CompatVersionUnknown}}{{CompatVersionUnknown}}{{CompatVersionUnknown}}{{CompatVersionUnknown}}{{CompatVersionUnknown}}
+
+ +

Vegeu també

+ + diff --git a/files/ca/web/javascript/reference/global_objects/math/random/index.html b/files/ca/web/javascript/reference/global_objects/math/random/index.html new file mode 100644 index 0000000000..d70169efd4 --- /dev/null +++ b/files/ca/web/javascript/reference/global_objects/math/random/index.html @@ -0,0 +1,126 @@ +--- +title: Math.random() +slug: Web/JavaScript/Referencia/Objectes_globals/Math/random +translation_of: Web/JavaScript/Reference/Global_Objects/Math/random +--- +
{{JSRef}}
+ +

La funció Math.random() retorna un nombre decimal de punt flotant pseudo-aleatori que roman dins el rang [0, 1), és a dir, des de 0 (inclòs) fins a 1 (exclòs), que després pot ser escalat al rang dessitjat. La implementació selecciona la llavor inicial per a l'algoritme generador de nombres aleatoris; aquesta llavor no pot ser resetejada o escollida per l'usuari.

+ +
+

Nota: Math.random() no proporciona nombres aleatoris criptogràficament segurs. No l'utilitzeu per a cap tasca relacionada amb la seguretat. Per a aquest ús utilitzeu la API Web Crypto, i més concretament el mètode {{domxref("RandomSource.getRandomValues()", "window.crypto.getRandomValues()")}}.

+
+ +

Sintaxi

+ +
Math.random()
+ +

Exemples

+ +

Utilitzar Math.random()

+ +

Cal destacar que com que els nombres a JavaScript són nombres de punt flotant IEEE 754 amb comportament d'arrodoniment al parell més proper, els rangs proclamats per les funcions de sota (a excepció de Math.random()) no són exactes. Si s'escullen límits extremadament grans (253 o majors), és possible en casos extremadament rars, obtindre el límit superior que normalment és exclòs.

+ +
// Retorna un nombre aleatori entre 0 (inclòs) i 1 (exclòs)
+function getRandom() {
+  return Math.random();
+}
+
+ +
// Retorna un nombre aleatori entre min (inclòs) i max (exclòs)
+function getRandomArbitrary(min, max) {
+  return Math.random() * (max - min) + min;
+}
+
+ +
// Retorna un nombre sencer aleatori entre min (inclòs) i max (exclòs)
+// Utilitzar Math.round() proporciona una distribució no uniforme!
+function getRandomInt(min, max) {
+  return Math.floor(Math.random() * (max - min)) + min;
+}
+
+ +
// Returns a random integer between min (included) and max (included)
+// Using Math.round() will give you a non-uniform distribution!
+function getRandomIntInclusive(min, max) {
+  return Math.floor(Math.random() * (max - min + 1)) + min;
+}
+ +

Especificacions

+ + + + + + + + + + + + + + + + + + + + + + + + +
EspecificacióEstatComentaris
{{SpecName('ES1')}}{{Spec2('ES1')}}Definició inicial. JavaScript 1.0 (Només UNIX) / JavaScript 1.1 (Totes les plataformes).
{{SpecName('ES5.1', '#sec-15.8.2.14', 'Math.random')}}{{Spec2('ES5.1')}} 
{{SpecName('ES6', '#sec-math.random', 'Math.random')}}{{Spec2('ES6')}} 
+ +

Compatibilitat amb navegadors

+ +
{{CompatibilityTable}}
+ +
+ + + + + + + + + + + + + + + + + + + +
CaracterísticaChromeFirefox (Gecko)Internet ExplorerOperaSafari
Suport bàsic{{CompatVersionUnknown}}{{CompatVersionUnknown}}{{CompatVersionUnknown}}{{CompatVersionUnknown}}{{CompatVersionUnknown}}
+
+ +
+ + + + + + + + + + + + + + + + + + + + + +
CaracterísticaAndroidChrome for AndroidFirefox Mobile (Gecko)IE MobileOpera MobileSafari Mobile
Suport bàsic{{CompatVersionUnknown}}{{CompatVersionUnknown}}{{CompatVersionUnknown}}{{CompatVersionUnknown}}{{CompatVersionUnknown}}{{CompatVersionUnknown}}
+
diff --git a/files/ca/web/javascript/reference/global_objects/math/round/index.html b/files/ca/web/javascript/reference/global_objects/math/round/index.html new file mode 100644 index 0000000000..2510799381 --- /dev/null +++ b/files/ca/web/javascript/reference/global_objects/math/round/index.html @@ -0,0 +1,207 @@ +--- +title: Math.round() +slug: Web/JavaScript/Referencia/Objectes_globals/Math/round +translation_of: Web/JavaScript/Reference/Global_Objects/Math/round +--- +
{{JSRef}}
+ +

La funció Math.round() retorna el valor d'un nombre arrodonit al nombre sencer més proper.

+ +

Sintaxi

+ +
Math.round(x)
+ +

Paràmetres

+ +
+
x
+
Un nombre.
+
+ +

Descripció

+ +

Si la porció fraccional del nombre és 0.5 o major, l'argument s'arrodoneix al següent nombre sencer més gran. Si la porció fraccional del nombre és menor de 0.5 l'argument és arrodonit al següent nombre sencer més petit.

+ +

Com que round() és un mètode estàtic de Math, sempre s'utilitza com Math.round() en comptes de com un mètode d'un objecte Math creat (Math no és un constructor).

+ +

Exemples

+ +

Utilitzar Math.round()

+ +
// Retorna el valor 20
+x = Math.round(20.49);
+
+// Retorna el valor 21
+x = Math.round(20.5);
+
+// Retorna el valor -20
+x = Math.round(-20.5);
+
+// Retorna el valor -21
+x = Math.round(-20.51);
+
+// Retorna el valor 1 (!)
+// Fixeu-vos en l'error d'arrodoniment degut a la poc precisa aritmètica de punt flotant
+// Compareu això amb Math.round10(1.005, -2) de l'exemple de sota
+x = Math.round(1.005*100)/100;
+
+ +

Arrodoniment decimal

+ +
// Closure
+(function() {
+  /**
+   * Ajustament decimal d'un nombre
+   *
+   * @param {String}  type  El tipus d'ajustament.
+   * @param {Number}  value El nombre.
+   * @param {Integer} exp   L'exponent (el logaritme en base 10 de la base a ajustar).
+   * @returns {Number} El valor ajustat.
+   */
+  function decimalAdjust(type, value, exp) {
+    // Si l'exponent és undefined o zero...
+    if (typeof exp === 'undefined' || +exp === 0) {
+      return Math[type](value);
+    }
+    value = +value;
+    exp = +exp;
+    // Si el valor no és un nombre o l'exponent no és un nombre sencer...
+    if (isNaN(value) || !(typeof exp === 'number' && exp % 1 === 0)) {
+      return NaN;
+    }
+    // Desplaçament
+    value = value.toString().split('e');
+    value = Math[type](+(value[0] + 'e' + (value[1] ? (+value[1] - exp) : -exp)));
+    // Desfer el desplaçament
+    value = value.toString().split('e');
+    return +(value[0] + 'e' + (value[1] ? (+value[1] + exp) : exp));
+  }
+
+  // Arrodoniment decimal
+  if (!Math.round10) {
+    Math.round10 = function(value, exp) {
+      return decimalAdjust('round', value, exp);
+    };
+  }
+  // Floor decimal
+  if (!Math.floor10) {
+    Math.floor10 = function(value, exp) {
+      return decimalAdjust('floor', value, exp);
+    };
+  }
+  // Ceiling decimal
+  if (!Math.ceil10) {
+    Math.ceil10 = function(value, exp) {
+      return decimalAdjust('ceil', value, exp);
+    };
+  }
+})();
+
+// Arrodoniment
+Math.round10(55.55, -1);   // 55.6
+Math.round10(55.549, -1);  // 55.5
+Math.round10(55, 1);       // 60
+Math.round10(54.9, 1);     // 50
+Math.round10(-55.55, -1);  // -55.5
+Math.round10(-55.551, -1); // -55.6
+Math.round10(-55, 1);      // -50
+Math.round10(-55.1, 1);    // -60
+Math.round10(1.005, -2);   // 1.01 -- compareu aquest resultat amb Math.round(1.005*100)/100 de l'exemple de sobre
+// Floor
+Math.floor10(55.59, -1);   // 55.5
+Math.floor10(59, 1);       // 50
+Math.floor10(-55.51, -1);  // -55.6
+Math.floor10(-51, 1);      // -60
+// Ceil
+Math.ceil10(55.51, -1);    // 55.6
+Math.ceil10(51, 1);        // 60
+Math.ceil10(-55.59, -1);   // -55.5
+Math.ceil10(-59, 1);       // -50
+
+ +

Especificacions

+ + + + + + + + + + + + + + + + + + + + + + + + +
EspecificacióEstatComentaris
{{SpecName('ES1')}}{{Spec2('ES1')}}Definició inicial. Implementat a JavaScript 1.0.
{{SpecName('ES5.1', '#sec-15.8.2.15', 'Math.round')}}{{Spec2('ES5.1')}} 
{{SpecName('ES6', '#sec-math.round', 'Math.round')}}{{Spec2('ES6')}} 
+ +

Compatibilitat amb navegadors

+ +
{{CompatibilityTable}}
+ +
+ + + + + + + + + + + + + + + + + + + +
CaracterísticaChromeFirefox (Gecko)Internet ExplorerOperaSafari (WebKit)
Suport bàsic{{CompatVersionUnknown}}{{CompatVersionUnknown}}{{CompatVersionUnknown}}{{CompatVersionUnknown}}{{CompatVersionUnknown}}
+
+ +
+ + + + + + + + + + + + + + + + + + + +
CaracterísticaAndroidFirefox Mobile (Gecko)IE PhoneOpera MobileSafari Mobile
Suport bàsic{{CompatVersionUnknown}}{{CompatVersionUnknown}}{{CompatVersionUnknown}}{{CompatVersionUnknown}}{{CompatVersionUnknown}}
+
+ +

Vegeu també

+ + diff --git a/files/ca/web/javascript/reference/global_objects/math/sign/index.html b/files/ca/web/javascript/reference/global_objects/math/sign/index.html new file mode 100644 index 0000000000..520ff27dc4 --- /dev/null +++ b/files/ca/web/javascript/reference/global_objects/math/sign/index.html @@ -0,0 +1,131 @@ +--- +title: Math.sign() +slug: Web/JavaScript/Referencia/Objectes_globals/Math/sign +translation_of: Web/JavaScript/Reference/Global_Objects/Math/sign +--- +
{{JSRef}}
+ +

La funció Math.sign() retorna el signe d'un nombre, indicant si el nombre donat és positiu, negatiu o zero.

+ +

Sintaxi

+ +
Math.sign(x)
+ +

Paràmetres

+ +
+
x
+
Un nombre.
+
+ +

Descripció

+ +

Com que sign() és un mètode estàtic de Math, sempre s'utilitza com Math.sign() en comptes de com un mètode d'un objecte Math creat (Math no és un constructor).

+ +

Aquesta funció pot retornar 5 valors diferents, 1, -1, 0, -0, NaN, que representen "nombre positiu", "nombre negatiu", "zero positiu", "zero negatiu" i {{jsxref("NaN")}} respectivament.

+ +

L'argument passat a aquesta funció serà convertit al tipus de x implícitament.

+ +

Exemples

+ +

Utilitzar Math.sign()

+ +
Math.sign(3);     //  1
+Math.sign(-3);    // -1
+Math.sign('-3');  // -1
+Math.sign(0);     //  0
+Math.sign(-0);    // -0
+Math.sign(NaN);   // NaN
+Math.sign('foo'); // NaN
+Math.sign();      // NaN
+
+ +

Polyfill

+ +
Math.sign = Math.sign || function(x) {
+  x = +x; // converteix a un nombre
+  if (x === 0 || isNaN(x)) {
+    return x;
+  }
+  return x > 0 ? 1 : -1;
+}
+
+ +

Especificacions

+ + + + + + + + + + + + + + +
EspecificacióEstatComentaris
{{SpecName('ES6', '#sec-math.sign', 'Math.sign')}}{{Spec2('ES6')}}Definició inicial.
+ +

Compatibilitat amb navegadors

+ +
{{CompatibilityTable}}
+ +
+ + + + + + + + + + + + + + + + + + + +
CaracterísticaChromeFirefox (Gecko)Internet ExplorerOperaSafari
Suport bàsic{{CompatChrome("38")}}{{CompatGeckoDesktop("25")}}{{CompatNo}}{{CompatOpera("25")}}{{CompatNo}}
+
+ +
+ + + + + + + + + + + + + + + + + + + + + +
CaracterísticaAndroidChrome for AndroidFirefox Mobile (Gecko)IE MobileOpera MobileSafari Mobile
Suport bàsic{{CompatNo}}{{CompatNo}}{{CompatGeckoMobile("25")}}{{CompatNo}}{{CompatNo}}{{CompatNo}}
+
+ +

Vegeu també

+ + diff --git a/files/ca/web/javascript/reference/global_objects/math/sin/index.html b/files/ca/web/javascript/reference/global_objects/math/sin/index.html new file mode 100644 index 0000000000..7f1faf9a98 --- /dev/null +++ b/files/ca/web/javascript/reference/global_objects/math/sin/index.html @@ -0,0 +1,127 @@ +--- +title: Math.sin() +slug: Web/JavaScript/Referencia/Objectes_globals/Math/sin +translation_of: Web/JavaScript/Reference/Global_Objects/Math/sin +--- +
{{JSRef("Global_Objects", "Math")}}
+ +

Resum

+ +

La funció Math.sin() retorna el sinus d'un nombre.

+ +

Sintaxi

+ +
Math.sin(x)
+ +

Paràmetres

+ +
+
x
+
Un nombre (donat en radians).
+
+ +

Descripció

+ +

El mètode Math.sin() retorna un valor numèric entre -1 i 1, que representa el sinus de l'angle donat en radiants.

+ +

Degut a que sin() és un mètode estàtic de Math, sempre s'utilitza com a Math.sin(), en comptes de com a mètode d'una instància de Math (Math no és un constructor).

+ +

Exemples

+ +

Exemple: Utilitzar Math.sin()

+ +
Math.sin(0);           // 0
+Math.sin(1);           // 0.8414709848078965
+
+Math.sin(Math.PI / 2); // 1
+
+ +

Especificacions

+ + + + + + + + + + + + + + + + + + + + + + + + +
EspecificacióEstatComentaris
ECMAScript 1a Edició.{{Spec2('ES1')}}Definició inicial. Implementat a JavaScript 1.0.
{{SpecName('ES5.1', '#sec-15.8.2.16', 'Math.sin')}}{{Spec2('ES5.1')}} 
{{SpecName('ES6', '#sec-math.sin', 'Math.sin')}}{{Spec2('ES6')}} 
+ +

Compatibilitat amb navegadors

+ +
{{CompatibilityTable}}
+ +
+ + + + + + + + + + + + + + + + + + + +
CaracterísticaChromeFirefox (Gecko)Internet ExplorerOperaSafari
Suport bàsic{{CompatVersionUnknown}}{{CompatVersionUnknown}}{{CompatVersionUnknown}}{{CompatVersionUnknown}}{{CompatVersionUnknown}}
+
+ +
+ + + + + + + + + + + + + + + + + + + + + +
CaracterísticaAndroidChrome for AndroidFirefox Mobile (Gecko)IE MobileOpera MobileSafari Mobile
Suport bàsic{{CompatVersionUnknown}}{{CompatVersionUnknown}}{{CompatVersionUnknown}}{{CompatVersionUnknown}}{{CompatVersionUnknown}}{{CompatVersionUnknown}}
+
+ +

Vegeu també

+ + diff --git a/files/ca/web/javascript/reference/global_objects/math/sinh/index.html b/files/ca/web/javascript/reference/global_objects/math/sinh/index.html new file mode 100644 index 0000000000..a1cc1f446a --- /dev/null +++ b/files/ca/web/javascript/reference/global_objects/math/sinh/index.html @@ -0,0 +1,129 @@ +--- +title: Math.sinh() +slug: Web/JavaScript/Referencia/Objectes_globals/Math/sinh +translation_of: Web/JavaScript/Reference/Global_Objects/Math/sinh +--- +
{{JSRef}}
+ +

La funció Math.sinh() retorna el sinus hiperbòlic d'un nombre, que es pot expressar utilitzant la {{jsxref("Math.E", "constant e", "", 1)}}:

+ +

Math.sinh(x)=ex-e-x2\mathtt{\operatorname{Math.sinh(x)}} = \frac{e^x - e^{-x}}{2}

+ +

Sintaxi

+ +
Math.sinh(x)
+ +

Paràmetres

+ +
+
x
+
Un nombre.
+
+ +

Descripció

+ +

Com que que sinh() és un mètode estàtic de Math, sempre s'utilitza com a Math.sinh(), en comptes de com a mètode d'una instància de Math (Math no és un constructor).

+ +

Exemples

+ +

Utilitzar Math.sinh()

+ +
Math.sinh(0); // 0
+Math.sinh(1); // 1.1752011936438014
+
+ +

Polyfill

+ +

Aquest comportament es pot emular amb l'ajut de la funció {{jsxref("Math.exp()")}}:

+ +
Math.sinh = Math.sinh || function(x) {
+  return (Math.exp(x) - Math.exp(-x)) / 2;
+}
+
+ +

O bé utilitzant només una crida a la funció {{jsxref("Math.exp()")}}:

+ +
Math.sinh = Math.sinh || function(x) {
+  var y = Math.exp(x);
+  return (y - 1 / y) / 2;
+}
+
+ +

Especificacions

+ + + + + + + + + + + + + + +
EspecificacióEstatComentaris
{{SpecName('ES6', '#sec-math.sinh', 'Math.sinh')}}{{Spec2('ES6')}}Definició inicial.
+ +

Compatibilitat amb navegadors

+ +
{{CompatibilityTable}}
+ +
+ + + + + + + + + + + + + + + + + + + +
CaracterísticaChromeFirefox (Gecko)Internet ExplorerOperaSafari
Suport bàsic{{CompatChrome("38")}}{{CompatGeckoDesktop("25")}}{{CompatNo}}{{CompatOpera("25")}}{{CompatSafari("7.1")}}
+
+ +
+ + + + + + + + + + + + + + + + + + + + + +
CaracterísticaAndroidChrome for AndroidFirefox Mobile (Gecko)IE MobileOpera MobileSafari Mobile
Suport bàsic{{CompatNo}}{{CompatNo}}{{CompatGeckoMobile("25")}}{{CompatNo}}{{CompatNo}}8
+
+ +

Vegeu també

+ + diff --git a/files/ca/web/javascript/reference/global_objects/math/sqrt/index.html b/files/ca/web/javascript/reference/global_objects/math/sqrt/index.html new file mode 100644 index 0000000000..b726db8a31 --- /dev/null +++ b/files/ca/web/javascript/reference/global_objects/math/sqrt/index.html @@ -0,0 +1,127 @@ +--- +title: Math.sqrt() +slug: Web/JavaScript/Referencia/Objectes_globals/Math/sqrt +translation_of: Web/JavaScript/Reference/Global_Objects/Math/sqrt +--- +
{{JSRef}}
+ +

La funció Math.sqrt() retorna la rel quadrada d'un nombre, és a dir

+ +

x0,Math.sqrt(x)=x=la únicay0tal quey2=x\forall x \geq 0, \mathtt{Math.sqrt(x)} = \sqrt{x} = \text{the unique} \; y \geq 0 \; \text{such that} \; y^2 = x

+ +

Sintaxi

+ +
Math.sqrt(x)
+ +

Paràmetres

+ +
+
x
+
Un nombre.
+
+ +

Descripció

+ +

Si el valor de x és negatiu, Math.sqrt() retorna {{jsxref("NaN")}}.

+ +

Degut a que sqrt() és un mètode estàtic de Math, sempre s'utilitza com a Math.sqrt(), en comptes de com a mètode d'una instància de Math (Math no és un constructor).

+ +

Exemples

+ +

Utilitzar Math.sqrt()

+ +
Math.sqrt(9); // 3
+Math.sqrt(2); // 1.414213562373095
+
+Math.sqrt(1);  // 1
+Math.sqrt(0);  // 0
+Math.sqrt(-1); // NaN
+
+ +

Especificacions

+ + + + + + + + + + + + + + + + + + + + + + + + +
EspecificacióEstatComentaris
{{SpecName('ES1')}}{{Spec2('ES1')}}Definició inicial. Implementat a JavaScript 1.0.
{{SpecName('ES5.1', '#sec-15.8.2.17', 'Math.sqrt')}}{{Spec2('ES5.1')}} 
{{SpecName('ES6', '#sec-math.sqrt', 'Math.sqrt')}}{{Spec2('ES6')}} 
+ +

Compatibilitat amb navegadors

+ +
{{CompatibilityTable}}
+ +
+ + + + + + + + + + + + + + + + + + + +
CaracterísticaChromeFirefox (Gecko)Internet ExplorerOperaSafari
Suport bàsic{{CompatVersionUnknown}}{{CompatVersionUnknown}}{{CompatVersionUnknown}}{{CompatVersionUnknown}}{{CompatVersionUnknown}}
+
+ +
+ + + + + + + + + + + + + + + + + + + + + +
CaracterísticaAndroidChrome for AndroidFirefox Mobile (Gecko)IE MobileOpera MobileSafari Mobile
Suport bàsic{{CompatVersionUnknown}}{{CompatVersionUnknown}}{{CompatVersionUnknown}}{{CompatVersionUnknown}}{{CompatVersionUnknown}}{{CompatVersionUnknown}}
+
+ +

Vegeu també

+ + diff --git a/files/ca/web/javascript/reference/global_objects/math/sqrt1_2/index.html b/files/ca/web/javascript/reference/global_objects/math/sqrt1_2/index.html new file mode 100644 index 0000000000..3d7d3a1370 --- /dev/null +++ b/files/ca/web/javascript/reference/global_objects/math/sqrt1_2/index.html @@ -0,0 +1,117 @@ +--- +title: Math.SQRT1_2 +slug: Web/JavaScript/Referencia/Objectes_globals/Math/SQRT1_2 +translation_of: Web/JavaScript/Reference/Global_Objects/Math/SQRT1_2 +--- +
{{JSRef("Global_Objects", "Math")}}
+ +

Resum

+ +

La propietat Math.SQRT1_2 representa la rel quadrada de 1/2, que equival aproximadament a 0.707:

+ +

Math.SQRT1_2=12=120.707\mathtt{\mi{Math.SQRT1_2}} = \sqrt{\frac{1}{2}} = \frac{1}{\sqrt{2}} \approx 0.707

+ +
{{js_property_attributes(0, 0, 0)}}
+ +

Descripció

+ +

Degut a que SQRT1_2  éss una propietat estàtica de Math, sempre s'utilitza com a Math.SQRT1_2 en comptes de com a la propietat d'una instància de Math (Math no és un constructor).

+ +

Exemples

+ +

Exemple: Utilitzar Math.SQRT1_2

+ +

La següent funció retorna 1 dividit per la rel quadrada de 2:

+ +
function getRoot1_2() {
+  return Math.SQRT1_2;
+}
+
+getRoot1_2(); // 0.7071067811865476
+
+ +

Especificacions

+ + + + + + + + + + + + + + + + + + + + + + + + +
EspecificacióEstatComentaris
ECMAScript 1a Edició.StandardDefinició inicial. Implementat aJavaScript 1.0.
{{SpecName('ES5.1', '#sec-15.8.1.7', 'Math.SQRT1_2')}}{{Spec2('ES5.1')}} 
{{SpecName('ES6', '#sec-math.sqrt1_2', 'Math.SQRT1_2')}}{{Spec2('ES6')}} 
+ +

Compatibilitat amb navegadors

+ +
{{CompatibilityTable}}
+ +
+ + + + + + + + + + + + + + + + + + + +
CaracterísticaChromeFirefox (Gecko)Internet ExplorerOperaSafari
Suport bàsic{{CompatVersionUnknown}}{{CompatVersionUnknown}}{{CompatVersionUnknown}}{{CompatVersionUnknown}}{{CompatVersionUnknown}}
+
+ +
+ + + + + + + + + + + + + + + + + + + + + +
CaracterísticaAndroidChrome for AndroidFirefox Mobile (Gecko)IE MobileOpera MobileSafari Mobile
Suport bàsic{{CompatVersionUnknown}}{{CompatVersionUnknown}}{{CompatVersionUnknown}}{{CompatVersionUnknown}}{{CompatVersionUnknown}}{{CompatVersionUnknown}}
+
+ +

Vegeu també

+ + diff --git a/files/ca/web/javascript/reference/global_objects/math/sqrt2/index.html b/files/ca/web/javascript/reference/global_objects/math/sqrt2/index.html new file mode 100644 index 0000000000..3d049f228c --- /dev/null +++ b/files/ca/web/javascript/reference/global_objects/math/sqrt2/index.html @@ -0,0 +1,117 @@ +--- +title: Math.SQRT2 +slug: Web/JavaScript/Referencia/Objectes_globals/Math/SQRT2 +translation_of: Web/JavaScript/Reference/Global_Objects/Math/SQRT2 +--- +
{{JSRef("Global_Objects", "Math")}}
+ +

Resum

+ +

La propietat Math.SQRT2 representa la rel quadrada de 2, que és aproximadament 1.414:

+ +

Math.SQRT2=21.414\mathtt{\mi{Math.SQRT2}} = \sqrt{2} \approx 1.414

+ +
{{js_property_attributes(0, 0, 0)}}
+ +

Descripció

+ +

Degut a que SQRT2 és una propietat estàtica de Math, sempre s'utilitza com a Math.SQRT2, en comptes de com la propietat d'una instància de Math (Math no és un constructor).

+ +

Exemples

+ +

Exemple: Utilitzar Math.SQRT2

+ +

La funció següent retorna la rel quadrada de 2:

+ +
function getRoot2() {
+  return Math.SQRT2;
+}
+
+getRoot2(); // 1.4142135623730951
+
+ +

Especificacions

+ + + + + + + + + + + + + + + + + + + + + + + + +
EspecificacióEstatComentaris
ECMAScript 1a Edició.StandardDefinició inicial. Implementat a JavaScript 1.0.
{{SpecName('ES5.1', '#sec-15.8.1.8', 'Math.SQRT2')}}{{Spec2('ES5.1')}} 
{{SpecName('ES6', '#sec-math.sqrt2', 'Math.SQRT2')}}{{Spec2('ES6')}} 
+ +

Compatibilitat amb navegadors

+ +
{{CompatibilityTable}}
+ +
+ + + + + + + + + + + + + + + + + + + +
CaracterísticaChromeFirefox (Gecko)Internet ExplorerOperaSafari
Suport bàsic{{CompatVersionUnknown}}{{CompatVersionUnknown}}{{CompatVersionUnknown}}{{CompatVersionUnknown}}{{CompatVersionUnknown}}
+
+ +
+ + + + + + + + + + + + + + + + + + + + + +
CaracterísticaAndroidChrome for AndroidFirefox Mobile (Gecko)IE MobileOpera MobileSafari Mobile
Suport bàsic{{CompatVersionUnknown}}{{CompatVersionUnknown}}{{CompatVersionUnknown}}{{CompatVersionUnknown}}{{CompatVersionUnknown}}{{CompatVersionUnknown}}
+
+ +

Vegeu també

+ + diff --git a/files/ca/web/javascript/reference/global_objects/math/tan/index.html b/files/ca/web/javascript/reference/global_objects/math/tan/index.html new file mode 100644 index 0000000000..590e1f5fc8 --- /dev/null +++ b/files/ca/web/javascript/reference/global_objects/math/tan/index.html @@ -0,0 +1,140 @@ +--- +title: Math.tan() +slug: Web/JavaScript/Referencia/Objectes_globals/Math/tan +translation_of: Web/JavaScript/Reference/Global_Objects/Math/tan +--- +
{{JSRef("Global_Objects", "Math")}}
+ +

Resum

+ +

La funció Math.tan() retorna la tangent d'un nombre.

+ +

Sintaxi

+ +
Math.tan(x)
+ +

Paràmetres

+ +
+
x
+
Un nombre que representa un angle, mesurat en radians.
+
+ +

Descripció

+ +

El mètode Math.tan() retorna un valor numèric que representa la tangent d'un angle.

+ +

Degut a que tan() és un mètode estàtic de Math, sempre s'utilitza com a Math.tan(), en comptes de com a mètode d'una instància de Math (Math no és un constructor).

+ +

Exemples

+ +

Exemple: Utilitzar Math.tan()

+ +
Math.tan(1); // 1.5574077246549023
+
+ +

Com que la funció Math.tan() accepta radians però sovint és més fàcil treballar amb graus, a funció següent accepta un valor en graus, el converteix a radians i retorna la tangent.

+ +
function getTanDeg(deg) {
+  var rad = deg * Math.PI/180;
+  return Math.tan(rad);
+}
+
+ +

Especificacions

+ + + + + + + + + + + + + + + + + + + + + + + + +
EspecificacióEstatComentaris
ECMAScript 1a Edició.{{Spec2('ES1')}}Definició inicial. Implementat a JavaScript 1.0.
{{SpecName('ES5.1', '#sec-15.8.2.18', 'Math.tan')}}{{Spec2('ES5.1')}} 
{{SpecName('ES6', '#sec-math.tan', 'Math.tan')}}{{Spec2('ES6')}} 
+ +

Compatibilitat amb navegadors

+ +
{{CompatibilityTable}}
+ +
+ + + + + + + + + + + + + + + + + + + +
CaracterísticaChromeFirefox (Gecko)Internet ExplorerOperaSafari
Suport bàsic{{CompatVersionUnknown}}{{CompatVersionUnknown}}{{CompatVersionUnknown}}{{CompatVersionUnknown}}{{CompatVersionUnknown}}
+
+ +
+ + + + + + + + + + + + + + + + + + + + + +
+ + + + + + +
Característica
+
AndroidChrome for AndroidFirefox Mobile (Gecko)IE MobileOpera MobileSafari Mobile
Suport bàsic{{CompatVersionUnknown}}{{CompatVersionUnknown}}{{CompatVersionUnknown}}{{CompatVersionUnknown}}{{CompatVersionUnknown}}{{CompatVersionUnknown}}
+
+ +

Vegeu també

+ + diff --git a/files/ca/web/javascript/reference/global_objects/math/tanh/index.html b/files/ca/web/javascript/reference/global_objects/math/tanh/index.html new file mode 100644 index 0000000000..ada19d17e0 --- /dev/null +++ b/files/ca/web/javascript/reference/global_objects/math/tanh/index.html @@ -0,0 +1,142 @@ +--- +title: Math.tanh() +slug: Web/JavaScript/Referencia/Objectes_globals/Math/tanh +translation_of: Web/JavaScript/Reference/Global_Objects/Math/tanh +--- +
{{JSRef}}
+ +

La funció Math.tanh() retorna la tangent hiperbòlica d'un nombre, és a dir

+ +

tanhx=sinhxcoshx=ex-e-xex+e-x=e2x-1e2x+1\tanh x = \frac{\sinh x}{\cosh x} = \frac {e^x - e^{-x}} {e^x + e^{-x}} = \frac{e^{2x} - 1}{e^{2x}+1}

+ +

Sintaxi

+ +
Math.tanh(x)
+ +

Paràmetres

+ +
+
x
+
Un nombre.
+
+ +

Descripció

+ +

Com que que tanh() és un mètode estàtic de Math, sempre s'utilitza com a Math.tanh(), en comptes de com a mètode d'una instància de Math (Math no és un constructor).

+ +

Exemples

+ +

Utilitzar Math.tanh()

+ +
Math.tanh(0);        // 0
+Math.tanh(Infinity); // 1
+Math.tanh(1);        // 0.7615941559557649
+
+ +

Polyfill

+ +

Aquest comportament pot emular-se amb l'ajuda de la funció {{jsxref("Math.exp()")}}:

+ +
Math.tanh = Math.tanh || function(x) {
+  if (x === Infinity) {
+    return 1;
+  } else if (x === -Infinity) {
+    return -1;
+  } else {
+    return (Math.exp(x) - Math.exp(-x)) / (Math.exp(x) + Math.exp(-x));
+  }
+}
+
+ +

o bé utilitzant només una crida a {{jsxref("Math.exp()")}}:

+ +
Math.tanh = Math.tanh || function(x) {
+  if (x === Infinity) {
+    return 1;
+  } else if (x === -Infinity) {
+    return -1;
+  } else {
+    var y = Math.exp(2 * x);
+    return (y - 1) / (y + 1);
+  }
+}
+
+ +

Especificacions

+ + + + + + + + + + + + + + +
EspecificacióEstatComentaris
{{SpecName('ES6', '#sec-math.tanh', 'Math.tanh')}}{{Spec2('ES6')}}Definició inicial.
+ +

Compatibilitat amb navegadors

+ +
{{CompatibilityTable}}
+ +
+ + + + + + + + + + + + + + + + + + + +
CaracterísticaChromeFirefox (Gecko)Internet ExplorerOperaSafari
Suport bàsic{{CompatChrome("38")}}{{CompatGeckoDesktop("25")}}{{CompatNo}}{{CompatOpera("25")}}{{CompatSafari("7.1")}}
+
+ +
+ + + + + + + + + + + + + + + + + + + + + +
CaracterísticaAndroidChrome for AndroidFirefox Mobile (Gecko)IE MobileOpera MobileSafari Mobile
Suport bàsic{{CompatNo}}{{CompatNo}}{{CompatGeckoMobile("25")}}{{CompatNo}}{{CompatNo}}8
+
+ +

Vegeu també

+ + diff --git a/files/ca/web/javascript/reference/global_objects/math/trunc/index.html b/files/ca/web/javascript/reference/global_objects/math/trunc/index.html new file mode 100644 index 0000000000..4f76502d69 --- /dev/null +++ b/files/ca/web/javascript/reference/global_objects/math/trunc/index.html @@ -0,0 +1,129 @@ +--- +title: Math.trunc() +slug: Web/JavaScript/Referencia/Objectes_globals/Math/trunc +translation_of: Web/JavaScript/Reference/Global_Objects/Math/trunc +--- +
{{JSRef}}
+ +

La funció Math.trunc() retorna la part integral d'un nombre, tot descartant els dígits decimals.

+ +

Sintaxi

+ +
Math.trunc(x)
+ +

Paràmetres

+ +
+
x
+
Un nombre.
+
+ +

Descripció

+ +

Al contrari que altres mètodes de Math : {{jsxref("Math.floor()")}}, {{jsxref("Math.ceil()")}} and {{jsxref("Math.round()")}}, la forma en la que Math.trunc() funciona és molt simple, simplement trunca el punt i els dígits que queden a la dreta, sense importa si l'argument és un nombre positiu o negatiu.

+ +

Així que, si l'argument és un nombre positiu, Math.trunc() és equivalent a Math.floor(), en cas contrari, Math.trunc() és equivalent a Math.ceil().

+ +

Cal destacar que l'argument passat a aquest mètode serà convertit a un nombre de forma implícita.

+ +

Com que trunc() és un mètode estàtic de Math, sempre s'utilitza com Math.trunc() en comptes de com un mètode d'un objecte Math creat (Math no és un constructor).

+ +

Exemples

+ +

Utilitzar Math.trunc()

+ +
Math.trunc(13.37);    // 13
+Math.trunc(42.84);    // 42
+Math.trunc(0.123);    //  0
+Math.trunc(-0.123);   // -0
+Math.trunc('-1.123'); // -1
+Math.trunc(NaN);      // NaN
+Math.trunc('foo');    // NaN
+Math.trunc();         // NaN
+
+ +

Polyfill

+ +
Math.trunc = Math.trunc || function(x) {
+  return x < 0 ? Math.ceil(x) : Math.floor(x);
+}
+
+ +

Especificacions

+ + + + + + + + + + + + + + +
EspecificacióEstatComentaris
{{SpecName('ES6', '#sec-math.trunc', 'Math.trunc')}}{{Spec2('ES6')}}Definició inicial.
+ +

Compatibilitat amb navegadors

+ +
{{CompatibilityTable}}
+ +
+ + + + + + + + + + + + + + + + + + + +
CaracterísticaChromeFirefox (Gecko)Internet ExplorerOperaSafari
Suport bàsic{{CompatChrome("38")}}{{CompatGeckoDesktop("25")}}{{CompatNo}}{{CompatOpera("25")}}{{CompatSafari("7.1")}}
+
+ +
+ + + + + + + + + + + + + + + + + + + + + +
CaracterísticaAndroidChrome for AndroidFirefox Mobile (Gecko)IE MobileOpera MobileSafari Mobile
Suport bàsic{{CompatNo}}{{CompatNo}}{{CompatGeckoMobile("25")}}{{CompatNo}}{{CompatNo}}8
+
+ +

Vegeu també

+ + diff --git a/files/ca/web/javascript/reference/global_objects/nan/index.html b/files/ca/web/javascript/reference/global_objects/nan/index.html new file mode 100644 index 0000000000..1d6f4a4dc8 --- /dev/null +++ b/files/ca/web/javascript/reference/global_objects/nan/index.html @@ -0,0 +1,125 @@ +--- +title: NaN +slug: Web/JavaScript/Referencia/Objectes_globals/NaN +translation_of: Web/JavaScript/Reference/Global_Objects/NaN +--- +
+
+
{{jsSidebar("Objects")}}
+
+
+ +

Resum

+ +

La propietat global NaN és un valor que representa Not-A-Number.

+ +

{{js_property_attributes(0,0,0)}}

+ +

Sintaxi

+ +
NaN
+ +

Descripció

+ +

NaN és una propietat de l'objecte global.

+ +

El valor inicial de NaN és Not-A-Number — el mateix que el valor de Number.NaN. En navegadors moderns NaN és una propietat no configurable que no pot ser escrita. En cas contrari es recomana no sobreescriure el seu valor.

+ +

L'ús directe de NaN és poc freqüent. Apareix tot sovint però com va valor retornat quan una funció matemàtica falla (Math.sqrt(-1)) o quan s'intenta convertir una cadena de text a nombre sense èxit (parseInt("blabla")).

+ +

Comparant NaN

+ +

L'operador d'igualtat (== i ===) no pot ésser emprat per comparar un resultat amb NaN. Es fa necessari l'ús de {{jsxref("Number.isNaN()")}} o bé {{jsxref("Global_Objects/isNaN", "isNaN()")}}.

+ +
NaN === NaN;        // false
+Number.NaN === NaN; // false
+isNaN(NaN);         // true
+isNaN(Number.NaN);  // true
+
+ +

Especificacions

+ + + + + + + + + + + + + + + + + + + + + + + + +
EspecificacióEstatComentaris
ECMAScript 1a Edició.StandardDefinició inicial. Implementat a JavaScript 1.3
{{SpecName('ES5.1', '#sec-15.1.1.1', 'NaN')}}{{Spec2('ES5.1')}} 
{{SpecName('ES6', '#sec-value-properties-of-the-global-object-nan', 'NaN')}}{{Spec2('ES6')}} 
+ +

Compatibilitat amb navegadors

+ +

{{ CompatibilityTable() }}

+ +
+ + + + + + + + + + + + + + + + + + + +
CaracterísticaChromeFirefox (Gecko)Internet ExplorerOperaSafari
Suport bàsic{{ CompatVersionUnknown() }}{{ CompatVersionUnknown() }}{{ CompatVersionUnknown() }}{{ CompatVersionUnknown() }}{{ CompatVersionUnknown() }}
+
+ +
+ + + + + + + + + + + + + + + + + + + + + +
CaracterísticaAndroidChrome for AndroidFirefox Mobile (Gecko)IE MobileOpera MobileSafari Mobile
Suport bàsic{{ CompatVersionUnknown() }}{{ CompatVersionUnknown() }}{{ CompatVersionUnknown() }}{{ CompatVersionUnknown() }}{{ CompatVersionUnknown() }}{{ CompatVersionUnknown() }}
+
+ +

Vegeu també

+ + diff --git a/files/ca/web/javascript/reference/global_objects/null/index.html b/files/ca/web/javascript/reference/global_objects/null/index.html new file mode 100644 index 0000000000..97506ddeb5 --- /dev/null +++ b/files/ca/web/javascript/reference/global_objects/null/index.html @@ -0,0 +1,125 @@ +--- +title: 'null' +slug: Web/JavaScript/Referencia/Objectes_globals/null +translation_of: Web/JavaScript/Reference/Global_Objects/null +--- +
+
+
{{jsSidebar("Objects")}}
+
+
+ +

Resum

+ +

El valor null és un literal de JavaScript que representa un valor nul o "buit", per exemple, quan no s'ha asignat cap valor previ. És un dels {{Glossary("Primitive", "valors primitius")}} de JavaScript.

+ +

Sintaxi

+ +
null 
+ +

Descripció

+ +

El valor null és un literal (i no una propietat de l'objecte global, com ho és undefined). A l'utilitzar les APIs, null s'obté sovint en comptes de l'objecte esperat quan no hi ha cap objecte relevant. Quan es vol comprovar si un valor és null o be undefined és important recordar les diferències entre els operadors d'igualtat (==) i d'identitat (===) (ja que amb el primer s'aplica una conversió de tipus).

+ +
// foo no existeix, no està definit i no s'ha inicialitzat mai
+> foo
+"ReferenceError: foo is not defined"
+
+// Es sap que foo existeix ara però no té tipus ni cap valor assignat:
+> var foo = null; foo
+"null"
+
+ +

Diferència entre null i undefined

+ +
typeof null        // objecte (degut a un bug a ECMAScript, hauria de ser null)
+typeof undefined   // undefined
+null === undefined // false
+null  == undefined // true
+
+ +

Especificacions

+ + + + + + + + + + + + + + + + + + + + + + + + +
EspecificacióEstatComentaris
ECMAScript 1a Edició.StandardDefinició inicial.
{{SpecName('ES5.1', '#sec-4.3.11', 'null value')}}{{Spec2('ES5.1')}} 
{{SpecName('ES6', '#sec-null-value', 'null value')}}{{Spec2('ES6')}} 
+ +

Compatibilitat amb navegadors

+ +

{{ CompatibilityTable() }}

+ +
+ + + + + + + + + + + + + + + + + + + +
CaracterísticaChromeFirefox (Gecko)Internet ExplorerOperaSafari
Suport bàsic{{ CompatVersionUnknown() }}{{ CompatVersionUnknown() }}{{ CompatVersionUnknown() }}{{ CompatVersionUnknown() }}{{ CompatVersionUnknown() }}
+
+ +
+ + + + + + + + + + + + + + + + + + + + + +
CaracterísticaAndroidChrome for AndroidFirefox Mobile (Gecko)IE MobileOpera MobileSafari Mobile
Suport bàsic{{ CompatVersionUnknown() }}{{ CompatVersionUnknown() }}{{ CompatVersionUnknown() }}{{ CompatVersionUnknown() }}{{ CompatVersionUnknown() }}{{ CompatVersionUnknown() }}
+
+ +

Vegeu també

+ + diff --git a/files/ca/web/javascript/reference/global_objects/number/epsilon/index.html b/files/ca/web/javascript/reference/global_objects/number/epsilon/index.html new file mode 100644 index 0000000000..5e3f602703 --- /dev/null +++ b/files/ca/web/javascript/reference/global_objects/number/epsilon/index.html @@ -0,0 +1,102 @@ +--- +title: Number.EPSILON +slug: Web/JavaScript/Referencia/Objectes_globals/Number/EPSILON +translation_of: Web/JavaScript/Reference/Global_Objects/Number/EPSILON +--- +
{{JSRef("Global_Objects", "Number")}}
+ +

Resum

+ +

La propietat Number.EPSILON representa la diferència entre el nombre 1 i el valor més petit major que 1 que pot ser representat com un {{jsxref("Global_Objects/Number", "Number")}}.

+ +

Per tal d'accedir a la propietat no es fa necessari crear un objecte {{jsxref("Global_Objects/Number", "Number")}} ja que és una propietat estàtica i n'hi ha prou amb fer servir Number.EPSILON per a obtindre el valor.

+ +
{{js_property_attributes(0, 0, 0)}}
+ +

Descripció

+ +

La propietat EPSILON té un valor aproximat de 2.2204460492503130808472633361816E-16, és a dir, 2-52.

+ +

Exemples

+ +

Exemple: Comprovant l'igualtat

+ +
x = 0.2;
+y = 0.3;
+equal = (Math.abs(x - y) < Number.EPSILON);
+
+ +

Especificacions

+ + + + + + + + + + + + + + +
EspecificacióEstatComentaris
{{SpecName('ES6', '#sec-15.7.3.7', 'Number.EPSILON')}}{{Spec2('ES6')}}Definició inicial
+ +

Compatibilitat amb navegadors

+ +
{{CompatibilityTable}}
+ +
+ + + + + + + + + + + + + + + + + + + +
CaracterísticaChromeFirefox (Gecko)Internet ExplorerOperaSafari
Suport bàsic{{CompatVersionUnknown}}{{CompatGeckoDesktop("25.0")}}{{CompatNo}}{{CompatVersionUnknown}}{{CompatNo}}
+
+ +
+ + + + + + + + + + + + + + + + + + + + + +
CaracterísticaAndroidChrome for AndroidFirefox Mobile (Gecko)IE MobileOpera MobileSafari Mobile
Suport bàsic{{CompatNo}}{{CompatNo}}{{CompatGeckoMobile("25.0")}}{{CompatNo}}{{CompatNo}}{{CompatNo}}
+
+ +

Vegeu també

+ + diff --git a/files/ca/web/javascript/reference/global_objects/number/index.html b/files/ca/web/javascript/reference/global_objects/number/index.html new file mode 100644 index 0000000000..5f4b7a0bb2 --- /dev/null +++ b/files/ca/web/javascript/reference/global_objects/number/index.html @@ -0,0 +1,214 @@ +--- +title: Number +slug: Web/JavaScript/Referencia/Objectes_globals/Number +translation_of: Web/JavaScript/Reference/Global_Objects/Number +--- +
{{JSRef("Global_Objects", "Number")}}
+ +

Resum

+ +

L'objecte de JavaScript Number és un objecte embolcall que permet treballar amb valors numèrics. Un objecte de tipus Number és creat quan es crida el constructor Number().

+ +

Constructor

+ +
new Number(valor);
+ +

Paràmetres

+ +
+
valor
+
El valor numèric de l'objecte que es pretèn crear.
+
+ +

Descripció

+ +

Els usos pricipals de l'objecte Number són:

+ + + +

Propietats

+ +
+
{{jsxref("Number.EPSILON")}} {{experimental_inline}}
+
L'interval més petit entre dos nombres que es pot representar.
+
{{jsxref("Number.MAX_SAFE_INTEGER")}} {{experimental_inline}}
+
El nombre sencer més gran que JavaScript pot representar de forma segura (253 - 1).
+
{{jsxref("Number.MAX_VALUE")}}
+
El nombre positiu més gran que pot ésser representat.
+
{{jsxref("Number.MIN_SAFE_INTEGER")}} {{experimental_inline}}
+
El nombre més petit que JavaScript pot representar de forma segura (-(253 - 1)).
+
{{jsxref("Number.MIN_VALUE")}}
+
El nombre positiu més petit que pot ésser representat. És a dir, el nombre positiu més proper a zero sense arribar a ser zero.
+
{{jsxref("Number.NaN")}}
+
El valor especial "not a number".
+
{{jsxref("Number.NEGATIVE_INFINITY")}}
+
El valor especial que representa l'infinit negatiu. És retornat quan es produeix un overflow.
+
{{jsxref("Number.POSITIVE_INFINITY")}}
+
El valor especial que representa l'infinit positiu. És retornat quan es produeix un overflow.
+
{{jsxref("Number.prototype")}}
+
Permet l'adició de propietats a l'objecte Number.
+
+ +
{{jsOverrides("Function", "properties", "MAX_VALUE", "MIN_VALUE", "NaN", "NEGATIVE_INFINITY", "POSITIVE_INFINITY", "protoype")}}
+ +

Mètodes

+ +
+
{{jsxref("Number.isNaN()")}} {{experimental_inline}}
+
Determina si el valor proporcionat és NaN.
+
{{jsxref("Number.isFinite()")}} {{experimental_inline}}
+
Determina si el valor que representa és un valor finit.
+
{{jsxref("Number.isInteger()")}} {{experimental_inline}}
+
Determina si el valor que representa és un nombre i si es tracta d'un nombre sencer.
+
{{jsxref("Number.isSafeInteger()")}} {{experimental_inline}}
+
Determina si el tipus del valor proporcionat així com el valor en sí mateix és un nombre sencer segur (nombre entre -(253 - 1) i 253 - 1).
+
{{jsxref("Number.toInteger()")}} {{obsolete_inline}}
+
Utilitzat per evaluar el valor passat i convertir-lo a sencer (o bé {{jsxref("Global_Objects/Infinity", "Infinity")}}), però s'ha eliminat.
+
{{jsxref("Number.parseFloat()")}} {{experimental_inline}}
+
Fa la mateixa funció que el mètode {{jsxref("Global_Objects/parseFloat", "parseFloat")}} de l'objecte global.
+
{{jsxref("Number.parseInt()")}} {{experimental_inline}}
+
Fa la mateixa funció que el mètode {{jsxref("Global_Objects/parseInt", "parseInt")}} de l'objecte global.
+
+ +
{{jsOverrides("Function", "Methods", "isNaN")}}
+ +

Instàncies de Number

+ +

Totes les instàncies de Number hereten de {{jsxref("Number.prototype")}}. L'objecte prototype del constructor Number pot ser modificat per a afectar a totes les instàncies de Number.

+ +

Mètodes

+ +
{{page('/en-US/docs/Web/JavaScript/Reference/Global_Objects/Number/prototype', 'Methods')}}
+ +

Exemples

+ +

Exemple: Utilitzar l'objecte Number per a assignar valors numèrics a variables

+ +

L'exemple que trobareu a continuació utilitza les propietats de l'objecte Number per a assignar valors a diferents variables numèriques:

+ +
var biggestNum = Number.MAX_VALUE;
+var smallestNum = Number.MIN_VALUE;
+var infiniteNum = Number.POSITIVE_INFINITY;
+var negInfiniteNum = Number.NEGATIVE_INFINITY;
+var notANum = Number.NaN;
+
+ +

Exemple: Rang de sencers de Number

+ +

El següent exemple mostra el valor sencer mínim i màxim que pot ésser representat per un objecte de tipus Number (per a més detalls, referiu-vos a l'standard EcmaScript, capítol 8.5 El tipus Number):

+ +
var biggestInt = 9007199254740992;
+var smallestInt = -9007199254740992;
+
+ +

A l'interpretar dades que han sigut serialitzades amb JSON, els valors que queden fora d'aquest rang poden esdevenir corruptes quan l'intèrpret de JSON els forci esdevenir de tipus Number. Una forma d'evitar aquesta limitació és utilitzar una {{jsxref("Global_Objects/String", "String")}} per representar el nombre.

+ +

Exemple: Utilitzar Number per a convertir un objecte de tipus Date

+ +

L'exemple que trobareu a continuació converteix un objecte de tipus {{jsxref("Global_Objects/Date", "Date")}} a un tipus numèric tot utilitzant Number com una funció:

+ +
var d = new Date('December 17, 1995 03:24:00');
+print(Number(d));
+
+ +

Aquest exemple mostrarà "819199440000".

+ +

Exemple: Convertir cadenes de caràcters numèriques a nombres

+ +
Number("123")     // 123
+Number("")        // 0
+Number("0x11")    // 17
+Number("0b11")    // 3
+Number("0o11")    // 9
+Number("foo")     // NaN
+Number("100a")    // NaN
+
+ +

Especificacions

+ + + + + + + + + + + + + + + + + + + + + + + + +
EspecificacióEstatComentaris
ECMAScript 1a Edició.StandardDefinició inicial. Implementat a JavaScript 1.1.
{{SpecName('ES5.1', '#sec-15.7', 'Number')}}{{Spec2('ES5.1')}} 
{{SpecName('ES6', '#sec-number-objects', 'Number')}}{{Spec2('ES6')}}Afegides nous mètodes i propietats: ({{jsxref("Number.EPSILON", "EPSILON")}}, {{jsxref("Number.isFinite", "isFinite")}}, {{jsxref("Number.isInteger", "isInteger")}}, {{jsxref("Number.isNaN", "isNaN")}}, {{jsxref("Number.parseFloat", "parseFloat")}}, {{jsxref("Number.parseInt", "parseInt")}})
+ +

Compatibilitat amb navegadores

+ +
{{CompatibilityTable}}
+ +
+ + + + + + + + + + + + + + + + + + + +
CaracterísticaChromeFirefox (Gecko)Internet ExplorerOperaSafari
Suport bàsic{{CompatVersionUnknown}}{{CompatVersionUnknown}}{{CompatVersionUnknown}}{{CompatVersionUnknown}}{{CompatVersionUnknown}}
+
+ +
+ + + + + + + + + + + + + + + + + + + + + +
CaracterísticaAndroidChrome for AndroidFirefox Mobile (Gecko)IE MobileOpera MobileSafari Mobile
Suport bàsic{{CompatVersionUnknown}}{{CompatVersionUnknown}}{{CompatVersionUnknown}}{{CompatVersionUnknown}}{{CompatVersionUnknown}}{{CompatVersionUnknown}}
+
+ +

Vegeu també

+ + diff --git a/files/ca/web/javascript/reference/global_objects/number/isfinite/index.html b/files/ca/web/javascript/reference/global_objects/number/isfinite/index.html new file mode 100644 index 0000000000..21d9493bf8 --- /dev/null +++ b/files/ca/web/javascript/reference/global_objects/number/isfinite/index.html @@ -0,0 +1,118 @@ +--- +title: Number.isFinite() +slug: Web/JavaScript/Referencia/Objectes_globals/Number/isFinite +translation_of: Web/JavaScript/Reference/Global_Objects/Number/isFinite +--- +
{{JSRef}}
+ +

El mètode Number.isFinite() determina si el valor que se li passa com a argument és un nombre finit o no.

+ +

Sintaxi

+ +
Number.isFinite(valor)
+ +

Paràmetres

+ +
+
valor
+
El valor que es comprovarà si és finit.
+
+ +

Descripció

+ +

En comparació amb la funció global {{jsxref("Global_Objects/isFinite", "isFinite()")}}, aquest mètode no converteix el paràmetres a un nombre forçosament. Això implica que només valors de tipus number, que també siguin finits, retornaran true.

+ +

Exemples

+ +
Number.isFinite(Infinity);  // false
+Number.isFinite(NaN);       // false
+Number.isFinite(-Infinity); // false
+
+Number.isFinite(0);         // true
+Number.isFinite(2e64);      // true
+
+Number.isFinite('0');       // false, seria true si s'utilitzés la
+                            // funció global isFinite('0')
+
+ +

Polyfill

+ +
Number.isFinite = Number.isFinite || function(value) {
+    return typeof value === "number" && isFinite(value);
+}
+
+ +

Especificacions

+ + + + + + + + + + + + + + +
EspecificacióEstatComentaris
{{SpecName('ES6', '#sec-number.isfinite', 'Number.isInteger')}}{{Spec2('ES6')}}Definició inicial.
+ +

Compatibilitat amb navegadors

+ +
{{CompatibilityTable}}
+ +
+ + + + + + + + + + + + + + + + + + + +
CaracterísticaChromeFirefox (Gecko)Internet ExplorerOperaSafari
Suport bàsic{{CompatChrome("19")}}{{CompatGeckoDesktop("16")}}{{CompatNo}}{{CompatOpera("15")}}{{CompatNo}}
+
+ +
+ + + + + + + + + + + + + + + + + + + + + +
CaracterísticaAndroidChrome for AndroidFirefox Mobile (Gecko)IE MobileOpera MobileSafari Mobile
Suport bàsic{{CompatUnknown}}{{CompatUnknown}}{{CompatGeckoMobile("16")}}{{CompatUnknown}}{{CompatUnknown}}{{CompatUnknown}}
+
+ +

Vegeu també

+ + diff --git a/files/ca/web/javascript/reference/global_objects/number/isinteger/index.html b/files/ca/web/javascript/reference/global_objects/number/isinteger/index.html new file mode 100644 index 0000000000..ee524e91c2 --- /dev/null +++ b/files/ca/web/javascript/reference/global_objects/number/isinteger/index.html @@ -0,0 +1,118 @@ +--- +title: Number.isInteger() +slug: Web/JavaScript/Referencia/Objectes_globals/Number/isInteger +translation_of: Web/JavaScript/Reference/Global_Objects/Number/isInteger +--- +
{{JSRef}}
+ +

El mètode Number.isInteger() determina si el valor que se li passa és un nombre sencer.

+ +

Sintaxi

+ +
Number.isInteger(valor)
+ +

Paràmetres

+ +
+
valor
+
El valor que serà comprovat si és sencer o no.
+
+ +

Descripció

+ +

Si el valor passat és un nombre sencer, la funció retornarà true, en cas contrari es retorna false. Si el valor és {{jsxref("Global_Objects/NaN", "NaN")}} o infinit, es retorna false.

+ +

Exemples

+ +
Number.isInteger(0.1);     // false
+Number.isInteger(1);       // true
+Number.isInteger(Math.PI); // false
+Number.isInteger(-100000); // true
+Number.isInteger(NaN);     // false
+Number.isInteger(0);       // true
+Number.isInteger("10");    // false
+
+ +

Polyfill

+ +
Number.isInteger = Number.isInteger || function(value) {
+    return typeof value === "number" &&
+           isFinite(value) &&
+           Math.floor(value) === value;
+};
+
+ +

Especificacions

+ + + + + + + + + + + + + + +
EspecificacióEstatComentaris
{{SpecName('ES6', '#sec-number.isinteger', 'Number.isInteger')}}{{Spec2('ES6')}}Definició inicial.
+ +

Compatibilitat amb navegadors

+ +
{{CompatibilityTable}}
+ +
+ + + + + + + + + + + + + + + + + + + +
CaracterísticaChromeFirefox (Gecko)Internet ExplorerOperaSafari
Suport bàsic{{CompatVersionUnknown}}{{CompatGeckoDesktop("16")}}{{CompatNo}}{{CompatVersionUnknown}}{{CompatNo}}
+
+ +
+ + + + + + + + + + + + + + + + + + + + + +
CaracterísticaAndroidChrome for AndroidFirefox Mobile (Gecko)IE MobileOpera MobileSafari Mobile
Suport bàsic{{CompatNo}}{{CompatNo}}{{CompatGeckoMobile("16")}}{{CompatNo}}{{CompatNo}}{{CompatNo}}
+
+ +

Vegeu també

+ + diff --git a/files/ca/web/javascript/reference/global_objects/number/isnan/index.html b/files/ca/web/javascript/reference/global_objects/number/isnan/index.html new file mode 100644 index 0000000000..f6ba247306 --- /dev/null +++ b/files/ca/web/javascript/reference/global_objects/number/isnan/index.html @@ -0,0 +1,129 @@ +--- +title: Number.isNaN() +slug: Web/JavaScript/Referencia/Objectes_globals/Number/isNaN +translation_of: Web/JavaScript/Reference/Global_Objects/Number/isNaN +--- +
{{JSRef}}
+ +

El mètode Number.isNaN() determina si el valor passat com a argument és {{jsxref("Global_Objects/NaN", "NaN")}}. És una versió més robusta de la funció global {{jsxref("Global_Objects/isNaN", "isNaN()")}}.

+ +

Sintaxi

+ +
Number.isNaN(valor)
+ +

Paràmetres

+ +
+
valor
+
El valor que es comprovarà si és {{jsxref("Global_Objects/NaN", "NaN")}}.
+
+ +

Descripció

+ +

Degut als dos operadors d'igualtat, {{jsxref("Operators/Comparison_Operators", "==", "#Equality")}} i {{jsxref("Operators/Comparison_Operators", "===", "#Identity")}}, retornen  false quan es comprova si {{jsxref("Global_Objects/NaN", "NaN")}} és {{jsxref("Global_Objects/NaN", "NaN")}}, la funció Number.isNaN() esdevé necesària. Aquesta situació és diferent a totes les altres posibles comparacions a JavaScript.

+ +

En comparació a la funció global {{jsxref("Global_Objects/isNaN", "isNaN()")}} function, Number.isNaN() no sofreix el problema de convertir forçosament el paràmetre donat a un nombre. Això implica que ara és segur passar valors que normalment serien convertits a {{jsxref("Global_Objects/NaN", "NaN")}} però en realitat no tenen el mateix valor que {{jsxref("Global_Objects/NaN", "NaN")}}. Això també implica que només valors de tipus number, que també siguin {{jsxref("Global_Objects/NaN", "NaN")}}, retornaran true.

+ +

Exemples

+ +
Number.isNaN(NaN);        // true
+Number.isNaN(Number.NaN); // true
+Number.isNaN(0 / 0)       // true
+
+// exemples que esdevindrien true amb la funció global isNaN()
+Number.isNaN("NaN");      // false
+Number.isNaN(undefined);  // false
+Number.isNaN({});         // false
+Number.isNaN("blabla");   // false
+
+// Tots els següents retornen false
+Number.isNaN(true);
+Number.isNaN(null);
+Number.isNaN(37);
+Number.isNaN("37");
+Number.isNaN("37.37");
+Number.isNaN("");
+Number.isNaN(" ");
+
+ +

Polyfill

+ +
Number.isNaN = Number.isNaN || function(value) {
+    return typeof value === "number" && value !== value;
+}
+ +

Especificacions

+ + + + + + + + + + + + + + +
EspecificacióEstatComentaris
{{SpecName('ES6', '#sec-number.isnan', 'Number.isnan')}}{{Spec2('ES6')}}Definició inicial.
+ +

Compatibilitat amb navegadors

+ +
{{CompatibilityTable}}
+ +
+ + + + + + + + + + + + + + + + + + + +
CaracterísticaChromeFirefox (Gecko)Internet ExplorerOperaSafari
Suport bàsic{{CompatChrome("25")}}{{CompatGeckoDesktop("15")}}{{CompatNo}}{{CompatVersionUnknown}}9
+
+ +
+ + + + + + + + + + + + + + + + + + + + + +
CaracterísticaAndroidChrome for AndroidFirefox Mobile (Gecko)IE MobileOpera MobileSafari Mobile
Suport bàsic{{CompatNo}}{{CompatUnknown}}{{CompatGeckoMobile("15")}}{{CompatNo}}{{CompatNo}}iOS 9+
+
+ +

Vegeu també

+ + diff --git a/files/ca/web/javascript/reference/global_objects/number/issafeinteger/index.html b/files/ca/web/javascript/reference/global_objects/number/issafeinteger/index.html new file mode 100644 index 0000000000..7570e7289d --- /dev/null +++ b/files/ca/web/javascript/reference/global_objects/number/issafeinteger/index.html @@ -0,0 +1,117 @@ +--- +title: Number.isSafeInteger() +slug: Web/JavaScript/Referencia/Objectes_globals/Number/isSafeInteger +translation_of: Web/JavaScript/Reference/Global_Objects/Number/isSafeInteger +--- +
{{JSRef}}
+ +

El mètode Number.isSafeInteger() determina si el valor proporcionat és un nombre sencer segur. Un nombre sencer segur és aquell que

+ + + +

Per exemple, 253 - 1 és un nombre sencer segur: pot ser representat de forma exacta i cap altre nombre sencer arrodonit coincideix amb ell sota cap mode d'arrodoniment IEEE-754. Per contra, 253 no és un nombre sencer segur: pot ser representat de manera exacta en IEEE-754, però el nombre sencer 253 + 1 no pot ser representat directament en IEEE-754 sino que s'arrodoniria a 253 mitjançant un arrodoniment al sencer més proper i un arrodoniment cap al zero.

+ +

Els nombres sencers segurs consisteixen en tots els nombres sencers des de -(253 - 1) inclòs fins a 253 - 1 inclòs.

+ +

Sintaxi

+ +
Number.isSafeInteger(valor)
+ +

Paràmetres

+ +
+
valor
+
El valor a ser testat com a nombre sencer segur.
+
+ +

Exemples

+ +
Number.isSafeInteger(3);                    // true
+Number.isSafeInteger(Math.pow(2, 53));      // false
+Number.isSafeInteger(Math.pow(2, 53) - 1);  // true
+Number.isSafeInteger(NaN);                  // false
+Number.isSafeInteger(Infinity);             // false
+Number.isSafeInteger('3');                  // false
+Number.isSafeInteger(3.1);                  // false
+Number.isSafeInteger(3.0);                  // true
+
+ +

Especificacions

+ + + + + + + + + + + + + + +
EspecificacióEstatComentaris
{{SpecName('ES6', '#sec-number.issafeinteger', 'Number.isSafeInteger')}}{{Spec2('ES6')}}Definició inicial.
+ +

Compatibilitat amb navegadors

+ +
{{CompatibilityTable}}
+ +
+ + + + + + + + + + + + + + + + + + + +
CaracterísticaChromeFirefox (Gecko)Internet ExplorerOperaSafari
Suport bàsic{{CompatVersionUnknown}}{{CompatGeckoDesktop("32")}}{{CompatNo}}{{CompatVersionUnknown}}{{CompatNo}}
+
+ +
+ + + + + + + + + + + + + + + + + + + + + +
CaracterísticaAndroidChrome for AndroidFirefox Mobile (Gecko)IE MobileOpera MobileSafari Mobile
Suport bàsic{{CompatNo}}{{CompatNo}}{{CompatGeckoMobile("32")}}{{CompatNo}}{{CompatNo}}{{CompatNo}}
+
+ +

Vegeu també

+ + diff --git a/files/ca/web/javascript/reference/global_objects/number/max_safe_integer/index.html b/files/ca/web/javascript/reference/global_objects/number/max_safe_integer/index.html new file mode 100644 index 0000000000..02483b41ac --- /dev/null +++ b/files/ca/web/javascript/reference/global_objects/number/max_safe_integer/index.html @@ -0,0 +1,100 @@ +--- +title: Number.MAX_SAFE_INTEGER +slug: Web/JavaScript/Referencia/Objectes_globals/Number/MAX_SAFE_INTEGER +translation_of: Web/JavaScript/Reference/Global_Objects/Number/MAX_SAFE_INTEGER +--- +
{{JSRef("Global_Objects", "Number")}}
+ +

Resum

+ +

La constant Number.MAX_SAFE_INTEGER representa el valor màxim que JavaScript pot representar de forma segura (253 - 1).

+ +
{{js_property_attributes(0, 0, 0)}}
+ +

Descripció

+ +

La constant MAX_SAFE_INTEGER te un valor de 9007199254740991. El raonament darrera d'aquest nombre és que JavaScript utilitza un format de nombres de coma flotant de doble precisió, tal com s'especifica al IEEE 754 i en conseqüència només pot representar de forma segura els nombres entre -(253 - 1) i 253 - 1.

+ +

Degut a que MAX_SAFE_INTEGER és una propietat estàtica de {{jsxref("Global_Objects/Number", "Number")}}, sempre s'accedeix de mitjançant Number.MAX_SAFE_INTEGER en comptes de com una propietat d'un objecte {{jsxref("Global_Objects/Number", "Number")}} instanciat.

+ +

Exemples

+ +
Number.MAX_SAFE_INTEGER // 9007199254740991
+Math.pow(2, 53) - 1     // 9007199254740991
+
+ +

Especificacions

+ + + + + + + + + + + + + + +
EspecificacióEstatComentaris
{{SpecName('ES6', '#sec-number.max_safe_integer', 'Number.MAX_SAFE_INTEGER')}}{{Spec2('ES6')}}Definició inicial.
+ +

Compatibilitat amb navegadors

+ +
{{CompatibilityTable}}
+ +
+ + + + + + + + + + + + + + + + + + + +
CaracterísticaChromeFirefox (Gecko)Internet ExplorerOperaSafari
Suport bàsic{{CompatChrome("34")}}{{CompatGeckoDesktop("31")}}{{CompatNo}}{{CompatVersionUnknown}}{{CompatNo}}
+
+ +
+ + + + + + + + + + + + + + + + + + + + + +
CaracterísticaAndroidChrome for AndroidFirefox Mobile (Gecko)IE MobileOpera MobileSafari Mobile
Suport bàsic{{CompatVersionUnknown}}{{CompatVersionUnknown}}{{CompatGeckoMobile("32")}}{{CompatNo}}{{CompatNo}}{{CompatNo}}
+
+ +

Vegeu també

+ + diff --git a/files/ca/web/javascript/reference/global_objects/number/max_value/index.html b/files/ca/web/javascript/reference/global_objects/number/max_value/index.html new file mode 100644 index 0000000000..453ad01c23 --- /dev/null +++ b/files/ca/web/javascript/reference/global_objects/number/max_value/index.html @@ -0,0 +1,118 @@ +--- +title: Number.MAX_VALUE +slug: Web/JavaScript/Referencia/Objectes_globals/Number/MAX_VALUE +translation_of: Web/JavaScript/Reference/Global_Objects/Number/MAX_VALUE +--- +
+
{{JSRef("Global_Objects", "Number")}}
+
+ +

Resum

+ +

La propietat Number.MAX_VALUE representa el valor numèric màxim representable en JavaScript.

+ +
{{js_property_attributes(0, 0, 0)}}
+ +

Descripció

+ +

La propietat MAX_VALUE té un valor aproximadament de 1.79E+308. Els valors més grans que MAX_VALUE són representats com a "Infinity".

+ +

Ja que MAX_VALUE és una propietat estàtica de {{jsxref("Global_Objects/Number", "Number")}}, sempre es fa servir com a Number.MAX_VALUE, en comptes d'una propietat de l'objecte {{jsxref("Global_Objects/Number", "Number")}} que s'ha creat.

+ +

Exemples

+ +

Exemple: Fer servir MAX_VALUE

+ +

El codi següent multiplica dos valors numèrics. Si el resultat és menor o igual a  MAX_VALUE, es crida la funció func1; del contrari, es crida la funció func2.

+ +
if (num1 * num2 <= Number.MAX_VALUE) {
+  func1();
+} else {
+  func2();
+}
+
+ +

Especificacions

+ + + + + + + + + + + + + + + + + + + + + + + + +
EspecificacióEstatComentaris
1a edició de ECMAScript.EstàndardDefinició inicial. Implementat en JavaScript 1.1.
{{SpecName('ES5.1', '#sec-15.7.3.2', 'Number.MAX_VALUE')}}{{Spec2('ES5.1')}} 
{{SpecName('ES6', '#sec-number.max_value', 'Number.MAX_VALUE')}}{{Spec2('ES6')}} 
+ +

Compatibilitat amb navegadors

+ +
{{CompatibilityTable}}
+ +
+ + + + + + + + + + + + + + + + + + + +
CaracterísticaChromeFirefox (Gecko)Internet ExplorerOperaSafari
Suport bàsic{{CompatVersionUnknown}}{{CompatVersionUnknown}}{{CompatVersionUnknown}}{{CompatVersionUnknown}}{{CompatVersionUnknown}}
+
+ +
+ + + + + + + + + + + + + + + + + + + + + +
CaracterísticaAndroidChrome for AndroidFirefox Mobile (Gecko)IE MobileOpera MobileSafari Mobile
Supor bàsic{{CompatVersionUnknown}}{{CompatVersionUnknown}}{{CompatVersionUnknown}}{{CompatVersionUnknown}}{{CompatVersionUnknown}}{{CompatVersionUnknown}}
+
+ +

Vegeu també

+ + diff --git a/files/ca/web/javascript/reference/global_objects/number/min_safe_integer/index.html b/files/ca/web/javascript/reference/global_objects/number/min_safe_integer/index.html new file mode 100644 index 0000000000..861ec666ec --- /dev/null +++ b/files/ca/web/javascript/reference/global_objects/number/min_safe_integer/index.html @@ -0,0 +1,100 @@ +--- +title: Number.MIN_SAFE_INTEGER +slug: Web/JavaScript/Referencia/Objectes_globals/Number/MIN_SAFE_INTEGER +translation_of: Web/JavaScript/Reference/Global_Objects/Number/MIN_SAFE_INTEGER +--- +
{{JSRef("Global_Objects", "Number")}}
+ +

Resum

+ +

La constant Number.MIN_SAFE_INTEGER representa el nombre sencer segur més petit a JavaScript (-(253 - 1)).

+ +
{{js_property_attributes(0, 0, 0)}}
+ +

Descripció

+ +

La constant MIN_SAFE_INTEGER te un valor de -9007199254740991. El raonament darrera d'aquest nombre és que JavaScript utilitza un format de nombres de coma flotant de doble precisió, tal com s'especifica al IEEE 754 i en conseqüència només pot representar de forma segura els nombres entre -(253 - 1) i 253 - 1.

+ +

Degut a que MIN_SAFE_INTEGER és una propietat estàtica de {{jsxref("Global_Objects/Number", "Number")}}, sempre s'accedeix de mitjançant Number.MIN_SAFE_INTEGER en comptes de com una propietat d'un objecte {{jsxref("Global_Objects/Number", "Number")}} instanciat.

+ +

Exemples

+ +
Number.MIN_SAFE_INTEGER // -9007199254740991
+-(Math.pow(2, 53) - 1)  // -9007199254740991
+
+ +

Especificacions

+ + + + + + + + + + + + + + +
EspecificacióEstatComentaris
{{SpecName('ES6', '#sec-number.min_safe_integer', 'Number.MIN_SAFE_INTEGER')}}{{Spec2('ES6')}}Definició inicial.
+ +

Compatibilitat amb navegadors

+ +
{{CompatibilityTable}}
+ +
+ + + + + + + + + + + + + + + + + + + +
CaracterísticaChromeFirefox (Gecko)Internet ExplorerOperaSafari
Suport bàsic{{CompatChrome("34")}}{{CompatGeckoDesktop("31")}}{{CompatNo}}{{CompatVersionUnknown}}{{CompatNo}}
+
+ +
+ + + + + + + + + + + + + + + + + + + + + +
CaracterísticaAndroidChrome for AndroidFirefox Mobile (Gecko)IE MobileOpera MobileSafari Mobile
Suport bàsic{{CompatVersionUnknown}}{{CompatVersionUnknown}}{{CompatGeckoMobile("32")}}{{CompatNo}}{{CompatNo}}{{CompatNo}}
+
+ +

Vegeu també

+ + diff --git a/files/ca/web/javascript/reference/global_objects/number/min_value/index.html b/files/ca/web/javascript/reference/global_objects/number/min_value/index.html new file mode 100644 index 0000000000..42af185360 --- /dev/null +++ b/files/ca/web/javascript/reference/global_objects/number/min_value/index.html @@ -0,0 +1,118 @@ +--- +title: Number.MIN_VALUE +slug: Web/JavaScript/Referencia/Objectes_globals/Number/MIN_VALUE +translation_of: Web/JavaScript/Reference/Global_Objects/Number/MIN_VALUE +--- +
{{JSRef("Global_Objects", "Number")}}
+ +

Resum

+ +

La propietat Number.MIN_VALUE representa el valor numèric positiu més petit representable en JavaScript.

+ +
{{js_property_attributes(0, 0, 0)}}
+ +

Descripció

+ +

La propietat MIN_VALUE és el nombre més proper a 0, però no és el nombre més negatiu que es pot representar en JavaScript.

+ +

MIN_VALUE té un valor aproximat de 5e-324. Els valors més petits que MIN_VALUE ("underflow values") són convertits a 0.

+ +

Ja que MIN_VALUE és una propietat estàtica de {{jsxref("Global_Objects/Number", "Number")}}, sempre s'usa com a Number.MIN_VALUE, i no com una propietat de l'objecte {{jsxref("Global_Objects/Number", "Number")}} que heu creat.

+ +

Exemples

+ +

Exemple: Fer servir MIN_VALUE

+ +

El codi següent divideix dos valors numèrics. Si el valor és més gran o igual a MIN_VALUE, la funció func1 és crida; del contrari, es crida la funció func2.

+ +
if (num1 / num2 >= Number.MIN_VALUE) {
+  func1();
+} else {
+  func2();
+}
+
+ +

Especificacions

+ + + + + + + + + + + + + + + + + + + + + + + + +
EspecificacióEstatComentaris
1a edició de ECMAScript.EstàndardDefinició inicial. Implementat en JavaScript 1.1.
{{SpecName('ES5.1', '#sec-15.7.3.3', 'Number.MIN_VALUE')}}{{Spec2('ES5.1')}} 
{{SpecName('ES6', '#sec-number.min_value', 'Number.MIN_VALUE')}}{{Spec2('ES6')}} 
+ +

Compatibilitat amb navegadors

+ +
{{CompatibilityTable}}
+ +
+ + + + + + + + + + + + + + + + + + + +
CaracterístcaChromeFirefox (Gecko)Internet ExplorerOperaSafari
Suport bàsic{{CompatVersionUnknown}}{{CompatVersionUnknown}}{{CompatVersionUnknown}}{{CompatVersionUnknown}}{{CompatVersionUnknown}}
+
+ +
+ + + + + + + + + + + + + + + + + + + + + +
CaracterísticaAndroidChrome for AndroidFirefox Mobile (Gecko)IE MobileOpera MobileSafari Mobile
Suport bàsic{{CompatVersionUnknown}}{{CompatVersionUnknown}}{{CompatVersionUnknown}}{{CompatVersionUnknown}}{{CompatVersionUnknown}}{{CompatVersionUnknown}}
+
+ +

Vegeu també

+ + diff --git a/files/ca/web/javascript/reference/global_objects/number/nan/index.html b/files/ca/web/javascript/reference/global_objects/number/nan/index.html new file mode 100644 index 0000000000..7c6f3f1440 --- /dev/null +++ b/files/ca/web/javascript/reference/global_objects/number/nan/index.html @@ -0,0 +1,100 @@ +--- +title: Number.NaN +slug: Web/JavaScript/Referencia/Objectes_globals/Number/NaN +translation_of: Web/JavaScript/Reference/Global_Objects/Number/NaN +--- +
{{JSRef("Global_Objects", "Number")}}
+ +

Resum

+ +

La propietat Number.NaN representa Not-A-Number (quelcom que no és un nombre). Equivalent a {{jsxref("Global_Objects/NaN", "NaN")}}.

+ +

No és necesari crear un objecte de tipus {{jsxref("Global_Objects/Number", "Number")}} per a accedir a aquesta propietat estàtica (utilitzeu Number.NaN).

+ +
{{js_property_attributes(0, 0, 0)}}
+ +

Especificacions

+ + + + + + + + + + + + + + + + + + + + + + + + +
EspecificacióEstatComentaris
ECMAScript 1a Edició.StandardDefinició inicial. Implementat a JavaScript 1.1.
{{SpecName('ES5.1', '#sec-15.7.3.4', 'Number.NaN')}}{{Spec2('ES5.1')}} 
{{SpecName('ES6', '#sec-number.nan', 'Number.NaN')}}{{Spec2('ES6')}} 
+ +

Compatibilitat amb navegadors

+ +
{{CompatibilityTable}}
+ +
+ + + + + + + + + + + + + + + + + + + +
CaracterísticaChromeFirefox (Gecko)Internet ExplorerOperaSafari
Suport bàsic{{CompatVersionUnknown}}{{CompatVersionUnknown}}{{CompatVersionUnknown}}{{CompatVersionUnknown}}{{CompatVersionUnknown}}
+
+ +
+ + + + + + + + + + + + + + + + + + + + + +
CaracterísticaAndroidChrome for AndroidFirefox Mobile (Gecko)IE MobileOpera MobileSafari Mobile
Suport bàsic{{CompatVersionUnknown}}{{CompatVersionUnknown}}{{CompatVersionUnknown}}{{CompatVersionUnknown}}{{CompatVersionUnknown}}{{CompatVersionUnknown}}
+
+ +

Vegeu també

+ + diff --git a/files/ca/web/javascript/reference/global_objects/number/negative_infinity/index.html b/files/ca/web/javascript/reference/global_objects/number/negative_infinity/index.html new file mode 100644 index 0000000000..3fb4c1d150 --- /dev/null +++ b/files/ca/web/javascript/reference/global_objects/number/negative_infinity/index.html @@ -0,0 +1,134 @@ +--- +title: Number.NEGATIVE_INFINITY +slug: Web/JavaScript/Referencia/Objectes_globals/Number/NEGATIVE_INFINITY +translation_of: Web/JavaScript/Reference/Global_Objects/Number/NEGATIVE_INFINITY +--- +
{{JSRef("Global_Objects", "Number")}}
+ +

Resum

+ +

La propietat Number.NEGATIVE_INFINITY representa el valor infinit negatiu.

+ +

No fa falta crear un objecte {{jsxref("Global_Objects/Number", "Number")}} per accedir a aquesta propietat estàtica (feu servir Number.NEGATIVE_INFINITY).

+ +
{{js_property_attributes(0, 0, 0)}}
+ +

Descripció

+ +

El valor de Number.NEGATIVE_INFINITY és el mateix que el valor negatiu de la propietat de l'objecte global {{jsxref("Global_Objects/Infinity", "Infinity")}}.

+ +

Aquest valor es comporta de forma una mica diferent a l'infinit matemàtic:

+ + + +

Es pot fer serivir la propietat Number.NEGATIVE_INFINITY per indicar una condició d'error que retorna un nombre finit en cas d'èxit. Fixeu-vos, però, que {{jsxref("Global_Objects/isFinite", "isFinite")}} seria més apropiat en aquest cas.

+ +

Exemples

+ +

Exemple: Fer servir NEGATIVE_INFINITY

+ +

En l'exemple següent, a la variable smallNumber se li assigna un valor que és més petit que el valor mínim. Quan la delcaració {{jsxref("Statements/if...else", "if")}} s'executa, smallNumber té el valor -Infinity, així smallNumber s'estableix com a un valor més manegable abans de prosseguir.

+ +
var smallNumber = (-Number.MAX_VALUE) * 2;
+
+if (smallNumber == Number.NEGATIVE_INFINITY) {
+  smallNumber = returnFinite();
+}
+
+ +

Especificacions

+ + + + + + + + + + + + + + + + + + + + + + + + +
EspecificacióEstatComentaris
1a edició de ECMAScript.EstàndardDefinició inicial. Implementat en JavaScript 1.1.
{{SpecName('ES5.1', '#sec-15.7.3.5', 'Number.NEGATIVE_INFINITY')}}{{Spec2('ES5.1')}}
{{SpecName('ES6', '#sec-number.negative_infinity', 'Number.NEGATIVE_INFINITY')}}{{Spec2('ES6')}}
+ +

Compatibilitat amb navegadors

+ +
{{CompatibilityTable}}
+ +
+ + + + + + + + + + + + + + + + + + + +
CaracterísticaChromeFirefox (Gecko)Internet ExplorerOperaSafari
Suport bàsic{{CompatVersionUnknown}}{{CompatVersionUnknown}}{{CompatVersionUnknown}}{{CompatVersionUnknown}}{{CompatVersionUnknown}}
+
+ +
+ + + + + + + + + + + + + + + + + + + + + +
CaracterísticaAndroidChrome for AndroidFirefox Mobile (Gecko)IE MobileOpera MobileSafari Mobile
Suport bàsic{{CompatVersionUnknown}}{{CompatVersionUnknown}}{{CompatVersionUnknown}}{{CompatVersionUnknown}}{{CompatVersionUnknown}}{{CompatVersionUnknown}}
+
+ +

Vegeu també

+ + diff --git a/files/ca/web/javascript/reference/global_objects/number/parsefloat/index.html b/files/ca/web/javascript/reference/global_objects/number/parsefloat/index.html new file mode 100644 index 0000000000..cd3494b7ac --- /dev/null +++ b/files/ca/web/javascript/reference/global_objects/number/parsefloat/index.html @@ -0,0 +1,103 @@ +--- +title: Number.parseFloat() +slug: Web/JavaScript/Referencia/Objectes_globals/Number/parseFloat +translation_of: Web/JavaScript/Reference/Global_Objects/Number/parseFloat +--- +
{{JSRef}}
+ +

El mètode Number.parseFloat() interpreta el string passat com a argument i retorna un nombre de punt flotant. Aquest mètode es comporta de la mateixa manera que la funció global {{jsxref("Global_Objects/parseFloat", "parseFloat()")}} i és part del ECMAScript 6 (el seu motiu d'existència és la modularització dels globals).

+ +

Sintaxi

+ +
Number.parseFloat(string)
+ +

Paràmetres

+ +
+
string
+
Un string que representa el valor a interpretar.
+
+ +

Descripció

+ +

Vegeu {{jsxref("Global_Objects/parseFloat", "parseFloat()")}} per a més detalls i exemples.

+ +

Polyfill

+ +
Number.parseFloat = parseFloat;
+ +

Especificacions

+ + + + + + + + + + + + + + +
EspecificacióEstatComentaris
{{SpecName('ES6', '#sec-number.parsefloat', 'Number.parseFloat')}}{{Spec2('ES6')}}Definició inicial.
+ +

Compatibilitat amb navegadors

+ +
{{CompatibilityTable}}
+ +
+ + + + + + + + + + + + + + + + + + + +
CaracterísticaChromeFirefox (Gecko)Internet ExplorerOperaSafari
Suport bàsic{{CompatVersionUnknown}}{{CompatGeckoDesktop("25")}}{{CompatNo}}{{CompatVersionUnknown}}{{CompatNo}}
+
+ +
+ + + + + + + + + + + + + + + + + + + + + +
CaracterísticaAndroidChrome for AndroidFirefox Mobile (Gecko)IE MobileOpera MobileSafari Mobile
Suport bàsic{{CompatNo}}{{CompatNo}}{{CompatGeckoMobile("25")}}{{CompatNo}}{{CompatNo}}{{CompatNo}}
+
+ +

Vegeu també

+ + diff --git a/files/ca/web/javascript/reference/global_objects/number/parseint/index.html b/files/ca/web/javascript/reference/global_objects/number/parseint/index.html new file mode 100644 index 0000000000..2ef9597d11 --- /dev/null +++ b/files/ca/web/javascript/reference/global_objects/number/parseint/index.html @@ -0,0 +1,102 @@ +--- +title: Number.parseInt() +slug: Web/JavaScript/Referencia/Objectes_globals/Number/parseInt +translation_of: Web/JavaScript/Reference/Global_Objects/Number/parseInt +--- +
{{JSRef}}
+ +

El mètode Number.parseInt() interpreta un argument string i retorna un nombre sencer de la base especificada.

+ +

Sintaxi

+ +
Number.parseInt(string[, radix])
+ +

Paràmetres

+ +
{{page("ca/docs/Web/JavaScript/Reference/Global_Objects/parseInt", "Parameters")}}
+ +

Descripció

+ +

Aquest mètode és exactament la mateixa funció que la funció global {{jsxref("Global_Objects/parseInt", "parseInt()")}}:

+ +
Number.parseInt === parseInt; // true
+ +

i és part de l'ECMAScript 6 (el seu propòsit és la modularització de les globals). Vegeu jsxref("Global_Objects/parseInt", "parseInt()")}} per a més detalls i exemples.

+ +

Polyfill

+ +
Number.parseInt = parseInt;
+ +

Especificacions

+ + + + + + + + + + + + + + +
EspecificacióEstatComentaris
{{SpecName('ES6', '#sec-number.parseint', 'Number.parseInt')}}{{Spec2('ES6')}}Definició inicial.
+ +

Compatibilitat amb navegadors

+ +
{{CompatibilityTable}}
+ +
+ + + + + + + + + + + + + + + + + + + +
CaracterísticaChromeFirefox (Gecko)Internet ExplorerOperaSafari
Suport bàsic{{CompatVersionUnknown}}{{CompatGeckoDesktop("25")}}{{CompatNo}}{{CompatVersionUnknown}}{{CompatNo}}
+
+ +
+ + + + + + + + + + + + + + + + + + + +
CaracterísticaAndroidFirefox Mobile (Gecko)IE MobileOpera MobileSafari Mobile
Suport bàsic{{CompatNo}}{{CompatGeckoDesktop("25")}}{{CompatNo}}{{CompatNo}}{{CompatNo}}
+
+ +

Vegeu també

+ + diff --git a/files/ca/web/javascript/reference/global_objects/number/positive_infinity/index.html b/files/ca/web/javascript/reference/global_objects/number/positive_infinity/index.html new file mode 100644 index 0000000000..234a779fd1 --- /dev/null +++ b/files/ca/web/javascript/reference/global_objects/number/positive_infinity/index.html @@ -0,0 +1,137 @@ +--- +title: Number.POSITIVE_INFINITY +slug: Web/JavaScript/Referencia/Objectes_globals/Number/POSITIVE_INFINITY +translation_of: Web/JavaScript/Reference/Global_Objects/Number/POSITIVE_INFINITY +--- +
{{JSRef}}
+ +

La propietat Number.POSITIVE_INFINITY representa el valor infinit negatiu.

+ +

No fa falta crear un objecte {{jsxref("Global_Objects/Number", "Number")}} per accedir a aquesta propietat estàtica (feu servir Number.POSITIVE_INFINITY).

+ +
{{js_property_attributes(0, 0, 0)}}
+ +

Descripció

+ +

El valor de Number.POSITIVE_INFINITY és el mateix que el valor negatiu de la propietat de l'objecte global {{jsxref("Infinity")}}.

+ +

 

+ +

Aquest valor es comporta de forma una mica diferent a l'infinit matemàtic:

+ +

Qualsevol valor positiu, incloent POSITIVE_INFINITY, multiplicat per POSITIVE_INFINITY és POSITIVE_INFINITY.

+ + + +

Es pot fer serivir la propietat Number.POSITIVE_INFINITY per indicar una condició d'error que retorna un nombre finit en cas d'èxit. Fixeu-vos, però, que {{jsxref("isFinite")}} seria més apropiat en aquest cas.

+ +

Exemples

+ +

Utilitzar POSITIVE_INFINITY

+ +

In the following example, the variable bigNumber is assigned a value that is larger than the maximum value. When the {{jsxref("Statements/if...else", "if")}} statement executes, bigNumber has the value Infinity, so bigNumber is set to a more manageable value before continuing.

+ +

A l'exemple següent, a la variable nombrePetit se li assigna un valor que és més gran que el valor màxim. Quan la declaració {{jsxref("Statements/if...else", "if")}} s'executa, nombrePetit té el valor Infinity, així nombrePetit s'estableix com a un valor més manegable abans de prosseguir.

+ +
var nombrePetit = Number.MAX_VALUE * 2;
+
+if (nombrePetit == Number.POSITIVE_INFINITY) {
+  nombrePetit= returnFinite();
+}
+
+ +

Especificacions

+ + + + + + + + + + + + + + + + + + + + + + + + +
EspecificacióEstatComentaris
{{SpecName('ES1')}}{{Spec2('ES1')}}Definició inicial. Implementat a JavaScript 1.1.
{{SpecName('ES5.1', '#sec-15.7.3.6', 'Number.POSITIVE_INFINITY')}}{{Spec2('ES5.1')}} 
{{SpecName('ES6', '#sec-number.positive_infinity', 'Number.POSITIVE_INFINITY')}}{{Spec2('ES6')}} 
+ +

Compatibilitat amb navegadors

+ +
{{CompatibilityTable}}
+ +
+ + + + + + + + + + + + + + + + + + + +
CaracterísticaChromeFirefox (Gecko)Internet ExplorerOperaSafari
Suport bàsic{{CompatVersionUnknown}}{{CompatVersionUnknown}}{{CompatVersionUnknown}}{{CompatVersionUnknown}}{{CompatVersionUnknown}}
+
+ +
+ + + + + + + + + + + + + + + + + + + + + +
CaracterísticaAndroidChrome for AndroidFirefox Mobile (Gecko)IE MobileOpera MobileSafari Mobile
Suport bàsic{{CompatVersionUnknown}}{{CompatVersionUnknown}}{{CompatVersionUnknown}}{{CompatVersionUnknown}}{{CompatVersionUnknown}}{{CompatVersionUnknown}}
+
+ +

Vegeu també

+ + diff --git a/files/ca/web/javascript/reference/global_objects/number/toexponential/index.html b/files/ca/web/javascript/reference/global_objects/number/toexponential/index.html new file mode 100644 index 0000000000..69ca3478ac --- /dev/null +++ b/files/ca/web/javascript/reference/global_objects/number/toexponential/index.html @@ -0,0 +1,136 @@ +--- +title: Number.prototype.toExponential() +slug: Web/JavaScript/Referencia/Objectes_globals/Number/toExponential +translation_of: Web/JavaScript/Reference/Global_Objects/Number/toExponential +--- +
{{JSRef}}
+ +

El mètode toExponential() retorna un string que representa l'objecte de tipus Number en notació exponencial.

+ +

Sintaxi

+ +
numObj.toExponential([dígitsDecimals])
+ +

Paràmetres

+ +
+
dígitsDecimals
+
Opcional. Un nombre sencer que indica el nombre de dígits decimals que s'utilitzaran. Si no s'especifica s'utilitzaran per defecte tants dígits decimals com facin falta per a acomodar el nombre.
+
+ +

Valor retornat

+ +

Un string que representa l'objecte {{jsxref("Number")}} en notació exponencial amb un dígit a l'esquerra del punt decimal, i arrodonit a dígitsDecimals després del punt decimal. Si s'omet el paràmetre fractionDigits s'utilitzaran tants dígits decimals com facin falta per a acomodar el nombre.

+ +

Si s'utilitza el mètode toExponential() en un literal numèric i el literal numèric no té exponent ni punt decimal, deixeu un espai abans del punt que precedeix a la crida del mètode per a evitar que el punt s'interpreti com a punt decimal.

+ +

Si un nombre té més dígits dels que s'especifiquen al paràmetre dígitsDecimals el nombre s'arrodoneix al nombre més proper representable pel nombre de dígits dígitsDecimals. Vegeu la discussió sobre arrodoniment a la descripció del mètode {{jsxref("Number.prototype.toFixed", "toFixed()")}}, que també s'aplica al mètode toExponential().

+ +

Excepcions llençades

+ +
+
{{jsxref("RangeError")}}
+
Si el valor de dígitsDecimals és massa petit o massa gran. Els valors acceptats estan entre 0 i 20, ambdos inclusius, i no llençaran per tant l'excepció RangeError. Les implementacions poden opcionalment donar suport per a valors més grans.
+
{{jsxref("TypeError")}}
+
Si es crida aquest mètode i se li passa un paràmetre que no és de tipus Number.
+
+ +

Exemples

+ +

Utilitzar toExponential

+ +
var numObj = 77.1234;
+
+console.log(numObj.toExponential());  // escriu 7.71234e+1
+console.log(numObj.toExponential(4)); // escriu 7.7123e+1
+console.log(numObj.toExponential(2)); // escriu 7.71e+1
+console.log(77.1234.toExponential()); // escriu 7.71234e+1
+console.log(77 .toExponential());     // escriu 7.7e+1
+
+ +

Especificacions

+ + + + + + + + + + + + + + + + + + + + + + + + +
EspecificacióEstatComentaris
{{SpecName('ES3')}}{{Spec2('ES3')}}Definició inicial. Implementat a 1.5.
{{SpecName('ES5.1', '#sec-15.7.4.6', 'Number.prototype.toExponential')}}{{Spec2('ES5.1')}} 
{{SpecName('ES6', '#sec-number.prototype.toexponential', 'Number.prototype.toExponential')}}{{Spec2('ES6')}} 
+ +

Compatibilitat amb navegadors

+ +
{{CompatibilityTable}}
+ +
+ + + + + + + + + + + + + + + + + + + +
CaracterísticaChromeFirefox (Gecko)Internet ExplorerOperaSafari
Suport bàsic{{CompatVersionUnknown}}{{CompatVersionUnknown}}{{CompatVersionUnknown}}{{CompatVersionUnknown}}{{CompatVersionUnknown}}
+
+ +
+ + + + + + + + + + + + + + + + + + + + + +
CaracterísticaAndroidChrome for AndroidFirefox Mobile (Gecko)IE MobileOpera MobileSafari Mobile
Suport bàsic{{CompatVersionUnknown}}{{CompatVersionUnknown}}{{CompatVersionUnknown}}{{CompatVersionUnknown}}{{CompatVersionUnknown}}{{CompatVersionUnknown}}
+
+ +

Vegeu també

+ + diff --git a/files/ca/web/javascript/reference/global_objects/number/tofixed/index.html b/files/ca/web/javascript/reference/global_objects/number/tofixed/index.html new file mode 100644 index 0000000000..8df53aafe3 --- /dev/null +++ b/files/ca/web/javascript/reference/global_objects/number/tofixed/index.html @@ -0,0 +1,135 @@ +--- +title: Number.prototype.toFixed() +slug: Web/JavaScript/Referencia/Objectes_globals/Number/toFixed +translation_of: Web/JavaScript/Reference/Global_Objects/Number/toFixed +--- +
{{JSRef}}
+ +

El mètode toFixed() formateja un nombre utilitzant notació de coma fixa.

+ +

Sintaxi

+ +
numObj.toFixed([dígits])
+ +

Paràmetres

+ +
+
dígits
+
Opcional. El nombre de dígits a utilitzar després del punt decimal; aquest paràmetre pot rebre valors entre 0 i 20, ambdós inclusius, i les implementacions poden opcionalment donar suport per a valors més grans. Si s'omet aquest argument s'utilitza un valor de 0 per defecte.
+
+ +

Valor retornat

+ +

Una representació de numObj en forma de string que no utilitza notació exponencial i té exactament dígits digits després del punt decimal. El nombre s'arrodoneix en cas que sigui necesari, així com la part fraccionaria s'omple amb zeros en cas necesari. Si numObj és major que 1e+21, aquest mètode retornarà un string en notació exponencial, proporcionat pel mètode {{jsxref("Number.prototype.toString()")}}.

+ +

Excepcions llençades

+ +
+
{{jsxref("RangeError")}}
+
Si el valor de dígits és massa petit o massa gran. Els valors acceptats estan entre 0 i 20, ambdos inclusius, i no llençaran per tant l'excepció {{jsxref("RangeError")}}. Les implementacions poden opcionalment donar suport per a valors més grans.
+
{{jsxref("TypeError")}}
+
Si es crida aquest mètode i se li passa un paràmetre que no és de tipus {{jsxref( "Number")}}.
+
+ +

Exemples

+ +

Utilitzar toFixed

+ +
var numObj = 12345.6789;
+
+numObj.toFixed();       // Retorna '12346': recalquem l'arrodoniment, no hi ha part decimal
+numObj.toFixed(1);      // Retorna '12345.7': recalquem l'arrodoniment
+numObj.toFixed(6);      // Retorna '12345.678900': recalquem els zeros afegits
+(1.23e+20).toFixed(2);  // Retorna '123000000000000000000.00'
+(1.23e-10).toFixed(2);  // Retorna '0.00'
+2.34.toFixed(1);        // Retorna '2.3'
+-2.34.toFixed(1);       // Retorna -2.3 (degut a la precedència d'operadors, nombres literals negatius no retornen un string...)
+(-2.34).toFixed(1);     // Retorna'-2.3' (...a no ser que s'utilitzin parèntesi)
+
+ +

Especificacions

+ + + + + + + + + + + + + + + + + + + + + + + + +
EspecificacióEstatComentaris
{{SpecName('ES3')}}{{Spec2('ES3')}}Definició inicial. Implementat a JavaScript 1.5.
{{SpecName('ES5.1', '#sec-15.7.4.5', 'Number.prototype.toFixed')}}{{Spec2('ES5.1')}} 
{{SpecName('ES6', '#sec-number.prototype.tofixed', 'Number.prototype.toFixed')}}{{Spec2('ES6')}} 
+ +

Compatibilitat amb navegadors

+ +
{{CompatibilityTable}}
+ +
+ + + + + + + + + + + + + + + + + + + +
CaracterísticaChromeFirefox (Gecko)Internet ExplorerOperaSafari
Suport bàsic{{CompatVersionUnknown}}{{CompatVersionUnknown}}{{CompatVersionUnknown}}{{CompatVersionUnknown}}{{CompatVersionUnknown}}
+
+ +
+ + + + + + + + + + + + + + + + + + + + + +
CaracterísticaAndroidChrome for AndroidFirefox Mobile (Gecko)IE MobileOpera MobileSafari Mobile
Suport bàsic{{CompatVersionUnknown}}{{CompatVersionUnknown}}{{CompatVersionUnknown}}{{CompatVersionUnknown}}{{CompatVersionUnknown}}{{CompatVersionUnknown}}
+
+ +

Vegeu també

+ + diff --git a/files/ca/web/javascript/reference/global_objects/number/toprecision/index.html b/files/ca/web/javascript/reference/global_objects/number/toprecision/index.html new file mode 100644 index 0000000000..0af5875e7f --- /dev/null +++ b/files/ca/web/javascript/reference/global_objects/number/toprecision/index.html @@ -0,0 +1,134 @@ +--- +title: Number.prototype.toPrecision() +slug: Web/JavaScript/Referencia/Objectes_globals/Number/toPrecision +translation_of: Web/JavaScript/Reference/Global_Objects/Number/toPrecision +--- +
{{JSRef}}
+ +

El mètode toPrecision() retorna un string que representa l'objecte {{jsxref("Number")}} amb la precisió especificada.

+ +

Sintaxi

+ +
numObj.toPrecision([precisió])
+ +

Paràmetres

+ +
+
precisió
+
Opional. Un nombre sencer que indica el nombre de dígits significatius.
+
+ +

Valor retornat

+ +

Un string que representa un objecte {{jsxref("Number")}} en notació de punt fix o bé en notació exponencial, arrodonit a precisió dígits significatius. Vegeu la discussió sobre arrodoniment a la descripció del mètode {{jsxref("Number.prototype.toFixed()")}}, que també s'aplica a toPrecision().

+ +

Si s'omet l'argument precisió, es comporta com  {{jsxref("Number.prototype.toString()")}}. Si l'argument precisió no és un nombre sencer, aquest s'arrodoneix al nombre sencer més proper.

+ +

Excepcions llençades

+ +
+
{{jsxref("Global_Objects/RangeError", "RangeError")}}
+
Si el valor de precisió no està entre 1 i 100 (ambdós inclusius), es llença un RangeError. Les implementacions poden opcionalment donar suport per a valors més grans o petits. ECMA-262 tan sols requereix una precisió de fins a 21 dígits significatius.
+
+ +

Exemples

+ +

Utilitzar toPrecision

+ +
var numObj = 5.123456;
+
+console.log(numObj.toPrecision());    // escriu 5.123456
+console.log(numObj.toPrecision(5));   // escriu 5.1235
+console.log(numObj.toPrecision(2));   // escriu 5.1
+console.log(numObj.toPrecision(1));   // escriu 5
+
+// fixeu-vos que la notació exponencial pot retornar-se en algunes circumstàncies
+console.log((1234.5).toPrecision(2)); // escriu 1.2e+3
+
+ +

Especificacions

+ + + + + + + + + + + + + + + + + + + + + + + + +
EspecificacióEstatComentaris
{{SpecName('ES3')}}{{Spec2('ES3')}}Definició inicial. Implementat a 1.5.
{{SpecName('ES5.1', '#sec-15.7.4.7', 'Number.prototype.toPrecision')}}{{Spec2('ES5.1')}} 
{{SpecName('ES6', '#sec-number.prototype.toprecision', 'Number.prototype.toPrecision')}}{{Spec2('ES6')}} 
+ +

Compatibilitat amb navegadors

+ +
{{CompatibilityTable}}
+ +
+ + + + + + + + + + + + + + + + + + + +
CaracterísticaChromeFirefox (Gecko)Internet ExplorerOperaSafari
Suport bàsic{{CompatVersionUnknown}}{{CompatVersionUnknown}}{{CompatVersionUnknown}}{{CompatVersionUnknown}}{{CompatVersionUnknown}}
+
+ +
+ + + + + + + + + + + + + + + + + + + + + +
CaracterísticaAndroidChrome for AndroidFirefox Mobile (Gecko)IE MobileOpera MobileSafari Mobile
Suport bàsic{{CompatVersionUnknown}}{{CompatVersionUnknown}}{{CompatVersionUnknown}}{{CompatVersionUnknown}}{{CompatVersionUnknown}}{{CompatVersionUnknown}}
+
+ +

Vegeu també

+ + diff --git a/files/ca/web/javascript/reference/global_objects/number/tostring/index.html b/files/ca/web/javascript/reference/global_objects/number/tostring/index.html new file mode 100644 index 0000000000..7381fc97ac --- /dev/null +++ b/files/ca/web/javascript/reference/global_objects/number/tostring/index.html @@ -0,0 +1,141 @@ +--- +title: Number.prototype.toString() +slug: Web/JavaScript/Referencia/Objectes_globals/Number/toString +translation_of: Web/JavaScript/Reference/Global_Objects/Number/toString +--- +
{{JSRef}}
+ +

El mètode toString() retorna un string que representa l'objecte {{jsxref("Number")}} especificat.

+ +

Sintaxi

+ +
objecteNum.toString([base])
+ +

Paràmetres

+ +
+
base
+
Opcional. Un nombre sencer entre 2 i 36 que indica la base a utilitzar a l'hora de representar valors numèrics.
+
+ +

Errors llençats

+ +
+
{{jsxref("RangeError")}}
+
Si toString() rep una base que no estigui entre 2 i 36, es llença un {{jsxref("RangeError")}}.
+
+ +

Descripció

+ +

L'objecte {{jsxref("Number")}} sobreescriu el mètode toString() de l'objecte {{jsxref("Object")}}; no hereta {{jsxref("Object.prototype.toString()")}}. Per a objectes {{jsxref( "Number")}}, el mètode toString() retorna una representació en forma de string de l'objecte, utilitzant la base especificada.

+ +

El mètode toString() interpreta el primer argument donat, i intenta retornar una representació en forma de string tot utilitzant la base proporcionada. Per a bases majors que 10, les lletres del alfabet indiquen numerals majors que 9. Per exemple, per a nombres hexadecimals (en base 16), s'utilitzen les lletres de la a a la f.

+ +

Si no s'especifica la base, s'utilitza 10 com a base.

+ +

Si objecteNum és negatiu, es conserva el signe. Això s'aplica fins i tot si la base és 2; el string retornat és la representació binària positiva de objecteNum precedida per un signe -, no s'utilitza el complement a dos de objecteNum.

+ +

Exemples

+ +

Utilitzar toString

+ +
var count = 10;
+
+console.log(count.toString());    // mostra '10'
+console.log((17).toString());     // mostra '17'
+
+var x = 6;
+
+console.log(x.toString(2));       // mostra '110'
+console.log((254).toString(16));  // mostra 'fe'
+
+console.log((-10).toString(2));   // mostra '-1010'
+console.log((-0xff).toString(2)); // mostra '-11111111'
+
+ +

Especificacions

+ + + + + + + + + + + + + + + + + + + + + + + + +
EspecificacióEstatComentaris
{{SpecName('ES1')}}{{Spec2('ES1')}}Definició inicial. Implementat a JavaScript 1.1.
{{SpecName('ES5.1', '#sec-15.7.4.2', 'Number.prototype.tostring')}}{{Spec2('ES5.1')}} 
{{SpecName('ES6', '#sec-number.prototype.tostring', 'Number.prototype.tostring')}}{{Spec2('ES6')}} 
+ +

Compatibilitat amb navegadors

+ +
{{CompatibilityTable}}
+ +
+ + + + + + + + + + + + + + + + + + + +
CaracterísticaChromeFirefox (Gecko)Internet ExplorerOperaSafari
Suport bàsic{{CompatVersionUnknown}}{{CompatVersionUnknown}}{{CompatVersionUnknown}}{{CompatVersionUnknown}}{{CompatVersionUnknown}}
+
+ +
+ + + + + + + + + + + + + + + + + + + + + +
CaracterísticaAndroidChrome for AndroidFirefox Mobile (Gecko)IE MobileOpera MobileSafari Mobile
Suport bàsic{{CompatVersionUnknown}}{{CompatVersionUnknown}}{{CompatVersionUnknown}}{{CompatVersionUnknown}}{{CompatVersionUnknown}}{{CompatVersionUnknown}}
+
+ +

Vegeu també

+ + 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 ---- -
{{JSRef}}
- -

La propietat Object.prototype representa el prototipus per a {{jsxref("Object")}}.

- -
{{js_property_attributes(0, 0, 0)}}
- -

Descripció

- -

A JavaScript, tots els objectes hereten de {{jsxref("Object")}}; tots els objectes hereten els mètodes i propietats de Object.prototype, tot i que es poden sobreescriure (excepte un Object amb prototipus null, és a dir, Object.create(null)). Per exemple, altres prototipus de constructors sobreescriuen la propietat constructor i ofereixen els seus propis mètodes {{jsxref("Object.prototype.toString()", "toString()")}}. Els canvis al prototipus Object 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.

- -

Propietats

- -
-
{{jsxref("Object.prototype.constructor")}}
-
Especifica la funció que ha creat el prototipus de l'objecte.
-
{{jsxref("Object.prototype.__proto__")}} {{non-standard_inline}}
-
Referencia l'objecte utilitzat com a prototipus quan aquest objecte va ser instanciat.
-
{{jsxref("Object.prototype.__noSuchMethod__")}} {{non-standard_inline}}
-
Permet definir una funció que serà executada quan es cridi com mètode un membre no definit.
-
{{jsxref("Object.prototype.__count__")}} {{obsolete_inline}}
-
Retornava el nombre de propietats enumerables que hi hagués a un objecte definit per l'usuari. S'ha eliminat.
-
{{jsxref("Object.prototype.__parent__")}} {{obsolete_inline}}
-
Referenciava el context d'un objecte. S'ha eliminat.
-
- -

Mètodes

- -
-
{{jsxref("Object.prototype.__defineGetter__()")}} {{non-standard_inline}} {{deprecated_inline}}
-
Associa una funció a una propietat que, quan s'accedeix, executa aquesta funció i retorna el seu valor.
-
{{jsxref("Object.prototype.__defineSetter__()")}} {{non-standard_inline}} {{deprecated_inline}}
-
Associa una funció a una propietat que, quan s'assigna, executa aquesta funció que modifica la propietat.
-
{{jsxref("Object.prototype.__lookupGetter__()")}} {{non-standard_inline}} {{deprecated_inline}}
-
Retorna una funció associada a la propietat especificada pel mètode {{jsxref("Object.defineGetter", "__defineGetter__")}}.
-
{{jsxref("Object.prototype.__lookupSetter__()")}} {{non-standard_inline}} {{deprecated_inline}}
-
Retorna a funció associada a la propietat especificada pel mètode {{jsxref("Object.defineSetter", "__defineSetter__")}}.
-
{{jsxref("Object.prototype.hasOwnProperty()")}}
-
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.
-
{{jsxref("Object.prototype.isPrototypeOf()")}}
-
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.
-
{{jsxref("Object.prototype.propertyIsEnumerable()")}}
-
Retorna un booleà que indica si està activat l'atribut intern DontEnum de l'ECMAScript.
-
{{jsxref("Object.prototype.toSource()")}} {{non-standard_inline}}
-
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.
-
{{jsxref("Object.prototype.toLocaleString()")}}
-
Crida el mètode {{jsxref("Object.toString", "toString()")}}.
-
{{jsxref("Object.prototype.toString()")}}
-
Retorna una representació d'aquest objecte en forma de string.
-
{{jsxref("Object.prototype.unwatch()")}} {{non-standard_inline}}
-
Esborra un watchpoint d'una propietat de l'objecte.
-
{{jsxref("Object.prototype.valueOf()")}}
-
Retorna el valor primitiu de l'objecte especificat.
-
{{jsxref("Object.prototype.watch()")}} {{non-standard_inline}}
-
Afegeix un watchpoint a una propietat de l'objecte.
-
{{jsxref("Object.prototype.eval()")}} {{obsolete_inline}}
-
Evaluava un string de codi font JavaScript dins el context de l'objecte especificat. S'ha eliminat.
-
- -

Exemples

- -

Degut a que JavaScript no res semblant a subclasses d'objectes, la propietat prototype és una bona forma d'utilitzar algunes funcions que fan d'objectes com a "classe base". Per exemple:

- -
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();
-
- -

Especificacions

- - - - - - - - - - - - - - - - - - - - - - - - -
EspecificacióEstatComentaris
{{SpecName('ES1')}}{{Spec2('ES1')}}Definició inicial. Implementat a JavaScript 1.0.
{{SpecName('ES5.1', '#sec-15.2.3.1', 'Object.prototype')}}{{Spec2('ES5.1')}} 
{{SpecName('ES6', '#sec-object.prototype', 'Object.prototype')}}{{Spec2('ES6')}} 
- -

Compatibilitat amb navegadors

- -
{{CompatibilityTable}}
- -
- - - - - - - - - - - - - - - - - - - -
CaracterísticaChromeFirefox (Gecko)Internet ExplorerOperaSafari
Suport bàsic{{CompatVersionUnknown}}{{CompatVersionUnknown}}{{CompatVersionUnknown}}{{CompatVersionUnknown}}{{CompatVersionUnknown}}
-
- -
- - - - - - - - - - - - - - - - - - - - - -
CaracterísticaAndroidChrome for AndroidFirefox Mobile (Gecko)IE MobileOpera MobileSafari Mobile
Suport bàsic{{CompatVersionUnknown}}{{CompatVersionUnknown}}{{CompatVersionUnknown}}{{CompatVersionUnknown}}{{CompatVersionUnknown}}{{CompatVersionUnknown}}
-
- -

 Vegeu també

- - diff --git a/files/ca/web/javascript/reference/global_objects/parsefloat/index.html b/files/ca/web/javascript/reference/global_objects/parsefloat/index.html new file mode 100644 index 0000000000..570fa6b63f --- /dev/null +++ b/files/ca/web/javascript/reference/global_objects/parsefloat/index.html @@ -0,0 +1,166 @@ +--- +title: parseFloat() +slug: Web/JavaScript/Referencia/Objectes_globals/parseFloat +translation_of: Web/JavaScript/Reference/Global_Objects/parseFloat +--- +
+
+
{{jsSidebar("Objects")}}
+
+
+ +

La funció parseFloat() interpreta un argument de tipus cadena i retorna un nombre decimal amb coma flotant

+ +

Sintaxi

+ +
parseFloat(cadena)
+ +

Paràmetres

+ +
+
cadena
+
Una cadena que representa el valor que es vol interpretar.
+
+ +

Descripció

+ +

parseFloat és una funció de nivell superior que no està associada a cap objecte.

+ +

parseFloat interpreta el seu argument, una cadena, i retorna un nombre decimal amb coma flotant. Si es topa amb un caràcter que no sigui un signe (+ o -), un numeral (0-9), un punt decimal, o un exponent, retorna el valor fins a aquell punt i ignora aquell caràcter i la resta de caràcters que el succeeixen. Es permeten espais inicials i finals.

+ +

Si el primer caràcter no es pot convertir en un nombre, parseFloat retorna NaN.

+ +

Per propòstis aritmètics, el valor de NaN no és un nombre en qualsevol radix. Es pot cridar la funció {{jsxref("isNaN")}} per determinar si el resultat del parseFloat és NaN. Si es passa NaN en operacions aritmètiques, el resultat de l'operació també serà NaN.

+ +

parseFloat també pot interpretar i retornar el valor Infinity. Es pot utilitzar la funció {{jsxref("isFinite")}} per determinar si el resultat és un nombre finit i (no Infinity, -Infinity, o NaN).

+ +

Exemples

+ +

parseFloat retorna un nombre

+ +

Tots els exemples següents retornen 3.14

+ +
parseFloat("3.14");
+parseFloat("314e-2");
+parseFloat("0.0314E+2");
+parseFloat("3.14more non-digit characters");
+
+ +

parseFloat retorna NaN

+ +

L'exemple següent retorna NaN

+ +
parseFloat("FF2");
+
+ +

Una interpretació més estricta

+ +

Sovint és útil tenir una forma més estricta d'interpretar els valors flotants, expressions regulars poden ajudar:

+ +
var filterFloat = function (value) {
+    if(/^(\-|\+)?([0-9]+(\.[0-9]+)?|Infinity)$/
+      .test(value))
+      return Number(value);
+  return NaN;
+}
+
+console.log(filterFloat('421'));               // 421
+console.log(filterFloat('-421'));              // -421
+console.log(filterFloat('+421'));              // 421
+console.log(filterFloat('Infinity'));          // Infinity
+console.log(filterFloat('1.61803398875'));     // 1.61803398875
+console.log(filterFloat('421e+0'));            // NaN
+console.log(filterFloat('421hop'));            // NaN
+console.log(filterFloat('hop1.61803398875'));  // NaN
+
+
+ +

Vegeu que aquest codi és només a mode d'exemple, no accepta nombres vàlids com 1. o .5.

+ +

Especificacions

+ + + + + + + + + + + + + + + + + + + + + + + + +
EspecificacióEstatComentaris
{{SpecName('ES1')}}{{Spec2('ES1')}}Definició inicial.
{{SpecName('ES5.1', '#sec-15.1.2.3', 'parseFloat')}}{{Spec2('ES5.1')}} 
{{SpecName('ES6', '#sec-parsefloat-string', 'parseFloat')}}{{Spec2('ES6')}} 
+ +

Compatibilitat amb navegadors

+ +

{{CompatibilityTable}}

+ +
+ + + + + + + + + + + + + + + + + + + +
CaracterísticaChromeFirefox (Gecko)Internet ExplorerOperaSafari
Suport bàsic{{CompatVersionUnknown}}{{CompatVersionUnknown}}{{CompatVersionUnknown}}{{CompatVersionUnknown}}{{CompatVersionUnknown}}
+
+ +
+ + + + + + + + + + + + + + + + + + + + + +
CaracterísticaAndroidChrome per AndroidFirefox Mobile (Gecko)IE MobileOpera MobileSafari Mobile
Suport bàsic{{CompatVersionUnknown}}{{CompatVersionUnknown}}{{CompatVersionUnknown}}{{CompatVersionUnknown}}{{CompatVersionUnknown}}{{CompatVersionUnknown}}
+
+ +

Vegeu també

+ + diff --git a/files/ca/web/javascript/reference/global_objects/set/add/index.html b/files/ca/web/javascript/reference/global_objects/set/add/index.html new file mode 100644 index 0000000000..b93eaa3efb --- /dev/null +++ b/files/ca/web/javascript/reference/global_objects/set/add/index.html @@ -0,0 +1,119 @@ +--- +title: Set.prototype.add() +slug: Web/JavaScript/Referencia/Objectes_globals/Set/add +translation_of: Web/JavaScript/Reference/Global_Objects/Set/add +--- +
{{JSRef}}
+ +

El mètode add() afegeix un nou element al final de l'objecte Set amb el valor especificat pel paràmetre.

+ +

Sintax

+ +
mySet.add(valor);
+ +

Paràmetres

+ +
+
valor
+
Obligatori. El valor de l'element que s'afegirà a l'objecte Set.
+
+ +

Valor retornat

+ +

L'objecte Set.

+ +

Exemples

+ +

Utilitzar el mètode add

+ +
var mySet = new Set();
+
+mySet.add(1);
+mySet.add(5).add("some text"); // crida en cadena
+
+console.log(mySet);
+// Set [1, 5, "some text"]
+
+ +

Especificacions

+ + + + + + + + + + + + + + +
EspecificacióEstatComentaris
{{SpecName('ES6', '#sec-set.prototype.add', 'Set.prototype.add')}}{{Spec2('ES6')}}Definició inicial.
+ +

Compatibilitat amb navegadors

+ +

{{CompatibilityTable}}

+ +
+ + + + + + + + + + + + + + + + + + + +
CaracterísticaChromeFirefox (Gecko)Internet ExplorerOperaSafari
Suport bàsic38{{CompatGeckoDesktop("13.0")}}11257.1
+
+ +
+ + + + + + + + + + + + + + + + + + + + + +
CaracterísticaAndroidChrome for AndroidFirefox Mobile (Gecko)IE MobileOpera MobileSafari Mobile
Suport bàsic{{CompatNo}}38{{CompatGeckoMobile("13.0")}}{{CompatNo}}{{CompatNo}}8
+
+ +

Notes específiques per al Firefox

+ + + +

Vegeu també

+ + diff --git a/files/ca/web/javascript/reference/global_objects/set/clear/index.html b/files/ca/web/javascript/reference/global_objects/set/clear/index.html new file mode 100644 index 0000000000..6ef179daaa --- /dev/null +++ b/files/ca/web/javascript/reference/global_objects/set/clear/index.html @@ -0,0 +1,105 @@ +--- +title: Set.prototype.clear() +slug: Web/JavaScript/Referencia/Objectes_globals/Set/clear +translation_of: Web/JavaScript/Reference/Global_Objects/Set/clear +--- +
{{JSRef}}
+ +

El mètode clear() esborra tots els elements emmagatzemats dins l'objecte Set.

+ +

Sintaxi

+ +
mySet.clear();
+ +

Exemples

+ +

Utilitzar el mètode clear

+ +
var mySet = new Set();
+mySet.add(1);
+mySet.add("foo");
+
+mySet.size;       // 2
+mySet.has("foo"); // true
+
+mySet.clear();
+
+mySet.size;       // 0
+mySet.has("bar")  // false
+
+ +

Especificacions

+ + + + + + + + + + + + + + +
EspecificacióEstatComentaris
{{SpecName('ES6', '#sec-set.prototype.clear', 'Set.prototype.clear')}}{{Spec2('ES6')}}Definició inicial.
+ +

Compatibilitat amb navegadors

+ +

{{CompatibilityTable}}

+ +
+ + + + + + + + + + + + + + + + + + + +
CaracterísticaChromeFirefox (Gecko)Internet ExplorerOperaSafari
Suport bàsic38{{CompatGeckoDesktop("19.0")}}11257.1
+
+ +
+ + + + + + + + + + + + + + + + + + + + + +
CaracterísticaAndroidChrome for AndroidFirefox Mobile (Gecko)IE MobileOpera MobileSafari Mobile
Suport bàsic{{CompatNo}}25{{CompatGeckoMobile("19.0")}}{{CompatNo}}{{CompatNo}}8
+
+ +

Vegeu també

+ + diff --git a/files/ca/web/javascript/reference/global_objects/set/delete/index.html b/files/ca/web/javascript/reference/global_objects/set/delete/index.html new file mode 100644 index 0000000000..ea66c1a723 --- /dev/null +++ b/files/ca/web/javascript/reference/global_objects/set/delete/index.html @@ -0,0 +1,112 @@ +--- +title: Set.prototype.delete() +slug: Web/JavaScript/Referencia/Objectes_globals/Set/delete +translation_of: Web/JavaScript/Reference/Global_Objects/Set/delete +--- +
{{JSRef}}
+ +

El mètode delete() esborra l'element especificat emmagatzemat dins l'objecte Set.

+ +

Sintaxi

+ +
mySet.delete(valor);
+ +

Paràmetres

+ +
+
valor
+
Obligatori. El valor de l'element a eliminar.
+
+ +

Valor retornat

+ +

Retorna true si s'ha pogut eliminar l'element de l'objecte Set; en cas contrari retorna false.

+ +

Exemples

+ +

Utilitzar el mètode delete

+ +
var mySet = new Set();
+mySet.add("foo");
+
+mySet.delete("bar"); // Retorna false. No s'ha trobat l'element "bar".
+mySet.delete("foo"); // Retorna true.  S'ha pogut esborrar l'element "foo".
+
+mySet.has("foo");    // Retorna false. L'element "foo" ja no existeix dins el Set.
+
+ +

Especificacions

+ + + + + + + + + + + + + + +
EspecificacióEstatComentaris
{{SpecName('ES6', '#sec-set.prototype.delete', 'Set.prototype.delete')}}{{Spec2('ES6')}}Definició inicial.
+ +

Compatibilitat amb navegadors

+ +

{{CompatibilityTable}}

+ +
+ + + + + + + + + + + + + + + + + + + +
CaracterísticaChromeFirefox (Gecko)Internet ExplorerOperaSafari
Suport bàsic38{{CompatGeckoDesktop("13.0")}}11257.1
+
+ +
+ + + + + + + + + + + + + + + + + + + + + +
CaracterísticaAndroidChrome for AndroidFirefox Mobile (Gecko)IE MobileOpera MobileSafari Mobile
Suport bàsic{{CompatNo}}38{{CompatGeckoMobile("13.0")}}{{CompatNo}}{{CompatNo}}8
+
+ +

Vegeu també

+ + diff --git a/files/ca/web/javascript/reference/global_objects/set/entries/index.html b/files/ca/web/javascript/reference/global_objects/set/entries/index.html new file mode 100644 index 0000000000..848e53ba8d --- /dev/null +++ b/files/ca/web/javascript/reference/global_objects/set/entries/index.html @@ -0,0 +1,104 @@ +--- +title: Set.prototype.entries() +slug: Web/JavaScript/Referencia/Objectes_globals/Set/entries +translation_of: Web/JavaScript/Reference/Global_Objects/Set/entries +--- +
{{JSRef}}
+ +

El mètode entries() retorna un nou objecte Iterator que conté un array de [valor, valor] per a cada element emmagatzemat dins l'objecte Set, ordenats per ordre d'inserció. Els elements de l'objecte Set no disposen de claus, a diferència dels objectes Map. Tot i així, per a oferir una API similar a la de l'objecte Map cada entrada té el mateix valor tant com per a la clau com per al valor. És per això que es retorna un array [valor, valor].

+ +

Sintaxi

+ +
mySet.entries()
+ +

Examples

+ +

Using entries()

+ +
var mySet = new Set();
+mySet.add("foobar");
+mySet.add(1);
+mySet.add("baz");
+
+var setIter = mySet.entries();
+
+console.log(setIter.next().value); // ["foobar", "foobar"]
+console.log(setIter.next().value); // [1, 1]
+console.log(setIter.next().value); // ["baz", "baz"]
+
+ +

Especificacions

+ + + + + + + + + + + + + + +
EspecificacióEstatComentaris
{{SpecName('ES6', '#sec-set.prototype.entries', 'Set.prototype.entries')}}{{Spec2('ES6')}}Definició inicial.
+ +

Compatibilitat amb navegadors

+ +

{{CompatibilityTable}}

+ +
+ + + + + + + + + + + + + + + + + + + +
CaracterísticaChromeFirefox (Gecko)Internet ExplorerOperaSafari
Suport bàsic38{{ CompatGeckoDesktop("24") }}{{CompatNo}}257.1
+
+ +
+ + + + + + + + + + + + + + + + + + + + + +
CaracterísticaAndroidChrome for AndroidFirefox Mobile (Gecko)IE MobileOpera MobileSafari Mobile
Suport bàsic{{CompatNo}}38{{ CompatGeckoMobile("24") }}{{CompatNo}}{{CompatNo}}8
+
+ +

Vegeu també

+ + diff --git a/files/ca/web/javascript/reference/global_objects/set/has/index.html b/files/ca/web/javascript/reference/global_objects/set/has/index.html new file mode 100644 index 0000000000..ca9027b8a4 --- /dev/null +++ b/files/ca/web/javascript/reference/global_objects/set/has/index.html @@ -0,0 +1,114 @@ +--- +title: Set.prototype.has() +slug: Web/JavaScript/Referencia/Objectes_globals/Set/has +translation_of: Web/JavaScript/Reference/Global_Objects/Set/has +--- +
{{JSRef}}
+ +

El mètode has() retorna un booleà que indica si l'element amb el valor especificat existeix o no dins l'objecte Set.

+ +

Sintaxi

+ +
mySet.has(valor);
+ +

Paràmetres

+ +
+
valor
+
Obligatori. El valor a comprovar si pertany o no a l'objecte Set.
+
+ +

Valor retornat

+ +
+
Booleà
+
Retorna true si existex un element amb el valor especificat dins l'objecte Set; en cas contrari retorna false.
+
+ +

Exemples

+ +

Utilitzar el mètode has

+ +
var mySet = new Set();
+mySet.add("foo");
+
+mySet.has("foo");  // retorna true
+mySet.has("bar");  // retorna false
+
+ +

Especificacions

+ + + + + + + + + + + + + + +
EspecificacióEstatComentaris
{{SpecName('ES6', '#sec-set.prototype.has', 'Set.prototype.has')}}{{Spec2('ES6')}}Definició inicial.
+ +

Compatibilitat amb navegadors

+ +

{{CompatibilityTable}}

+ +
+ + + + + + + + + + + + + + + + + + + +
CaracterísticaChromeFirefox (Gecko)Internet ExplorerOperaSafari
Suport bàsic38{{CompatGeckoDesktop("13.0")}}11257.1
+
+ +
+ + + + + + + + + + + + + + + + + + + + + +
CaracterísticaAndroidChrome for AndroidFirefox Mobile (Gecko)IE MobileOpera MobileSafari Mobile
Suport bàsic{{CompatNo}}38{{CompatGeckoMobile("13.0")}}{{CompatNo}}{{CompatNo}}8
+
+ +

Vegeu també

+ + diff --git a/files/ca/web/javascript/reference/global_objects/set/index.html b/files/ca/web/javascript/reference/global_objects/set/index.html new file mode 100644 index 0000000000..993d296324 --- /dev/null +++ b/files/ca/web/javascript/reference/global_objects/set/index.html @@ -0,0 +1,380 @@ +--- +title: Set +slug: Web/JavaScript/Referencia/Objectes_globals/Set +translation_of: Web/JavaScript/Reference/Global_Objects/Set +--- +
{{JSRef}}
+ +

L'objecte Set permet emmagatzemar valors únics de qualsevol tipus, ja siguin {{Glossary("Primitive", "valors primitius")}} o bé referències a objectes.

+ +

Sintaxi

+ +
new Set([iterable]);
+ +

Paràmetres

+ +
+
iterable
+
Si rep un objecte iterable, tots els seus elements seran afegits al nou Set. null serà tractat com a undefined.
+
+ +

Descripció

+ +

Els objectes Set són coleccions de valors, els seus elements poden ser iterats en ordre d'inserció. Un valor només pot aparèixer un cop dins el Set; és únic dins la col·lecció del Set.

+ +

Igualtat de valors

+ +

Degut a que cada valor dins el Set ha de ser únic, la igualtat dels valors serà comprovada i aquesta no es basa en el mateix algoritme que l'emprat per l'operador ===. Concreatement, per a Sets, +0 (que és estrictament igual a -0) i -0 són valors diferents. Tot i així, aquest comportament s'ha canviat a la última especificació de l'ECMAScript 6. A partir de Gecko 29.0 {{geckoRelease("29")}} ({{bug("952870")}}) i una recent versió nightly del Chrome, +0 i -0 són tractats com al mateix valor en objectes Set. Així mateix, NaN i undefined també poden ser emmagatzemats dins un Set. NaN és considerat igual a NaN (tot i que NaN !== NaN).

+ +

Propietats

+ +
+
Set.length
+
El valor de la propietat length és 0.
+
{{jsxref("Set.@@species", "get Set[@@species]")}}
+
La funció constructora que s'ha utilitzat per a crear objectes derivats.
+
{{jsxref("Set.prototype")}}
+
Representa el prototipus per al constructor Set. Permet afegir propietats a tots els objectes Set.
+
+ +

Instàncies de Set

+ +

Totes les instàncies de Set hereten de {{jsxref("Set.prototype")}}.

+ +

Propietats

+ +

{{page('ca/Web/JavaScript/Reference/Global_Objects/Set/prototype','Propietats')}}

+ +

Mètodes

+ +

{{page('ca/Web/JavaScript/Reference/Global_Objects/Set/prototype','Mètodes')}}

+ +

Exemples

+ +

Utilitzar l'objecte Set

+ +
var mySet = new Set();
+
+mySet.add(1);
+mySet.add(5);
+mySet.add("algun text");
+
+mySet.has(1); // true
+mySet.has(3); // false, 3 no ha estat afegit al set
+mySet.has(5);              // true
+mySet.has(Math.sqrt(25));  // true
+mySet.has("Some Text".toLowerCase()); // true
+
+mySet.size; // 3
+
+mySet.delete(5); // esborra 5 del set
+mySet.has(5);    // false, 5 ha sigut esborrat
+
+mySet.size; // 2, acabem d'esborrar un valor
+
+ +

Iterarar Sets

+ +
// iterar els elements d'un set
+// imprimeix els elements en l'ordre: 1, "algun text"
+for (let item of mySet) console.log(item);
+
+// imprimeix els elements en l'ordre: 1, "algun text"
+for (let item of mySet.keys()) console.log(item);
+
+// imprimeix els elements en l'ordre: 1, "algun text"
+for (let item of mySet.values()) console.log(item);
+
+// imprimeix els elements en l'ordre: 1, "algun text"
+//(key i value són iguals en aquest exemple)
+for (let [key, value] of mySet.entries()) console.log(key);
+
+// converteix el set en un Array (mitjançant Array comprehensions)
+var myArr = [v for (v of mySet)]; // [1, "algun text"]
+// Alternativa (mitjançant Array.from)
+var myArr = Array.from(mySet); // [1, "algun text"]
+
+// el codi següent també funcionarà si s'executa dins un document HTML
+mySet.add(document.body);
+mySet.has(document.querySelector("body")); // true
+
+// conversió entre Set i Array
+mySet2 = new Set([1,2,3,4]);
+mySet2.size; // 4
+[...mySet2]; // [1,2,3,4]
+
+// la intersecció es pot simular via
+var intersection = new Set([x for (x of set1) if (set2.has(x))]);
+
+// Iteració de les entrades del set mitjançant un forEach
+mySet.forEach(function(value) {
+  console.log(value);
+});
+
+// 1
+// 2
+// 3
+// 4
+ +

Relació amb objectes Array

+ +
var myArray = ["valor1", "valor2", "valor3"];
+
+// Utilitzem el constructor normal del Set per a transformar un Array en un Set
+var mySet = new Set(myArray);
+
+mySet.has("valor1"); // retorna true
+
+// Utilitzem l'operador spread per a transformar un Set en un Array.
+console.log(uneval([...mySet])); // Mostrarà exactament el mateix Array que myArray
+ +

Especificacions

+ + + + + + + + + + + + + + +
EspecificacióEstatComentaris
{{SpecName('ES6', '#sec-set-objects', 'Set')}}{{Spec2('ES6')}}Definició inicial.
+ +

Compatibilitat amb navegadors

+ +

{{CompatibilityTable}}

+ +
+ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +
CaracterísticaChromeFirefox (Gecko)Internet ExplorerOperaSafari
Suport bàsic +

{{ CompatChrome(38) }} [1]

+
{{ CompatGeckoDesktop("13") }}{{ CompatIE("11") }}257.1
Argument al constructor: new Set(iterable){{ CompatChrome(38) }}{{ CompatGeckoDesktop("13") }}{{CompatNo}}25{{CompatNo}}
iterable{{ CompatChrome(38) }}{{ CompatGeckoDesktop("17") }}{{CompatNo}}257.1
Set.clear(){{ CompatChrome(38) }}{{CompatGeckoDesktop("19")}}{{ CompatIE("11") }}257.1
Set.keys(), Set.values(), Set.entries(){{ CompatChrome(38) }}{{CompatGeckoDesktop("24")}}{{CompatNo}}257.1
Set.forEach(){{ CompatChrome(38) }}{{CompatGeckoDesktop("25")}}{{ CompatIE("11") }}257.1
Igualtat de valors per a -0 i 0{{ CompatChrome(38) }}{{CompatGeckoDesktop("29")}}{{CompatNo}}25{{CompatNo}}
Argument del constructor: new Set(null){{CompatVersionUnknown}}{{CompatGeckoDesktop("37")}}{{CompatUnknown}}{{CompatUnknown}}{{CompatUnknown}}
Monkey-patched add() al Constructor{{CompatVersionUnknown}}{{CompatGeckoDesktop("37")}}{{CompatUnknown}}{{CompatUnknown}}{{CompatUnknown}}
Set[@@species]{{CompatUnknown}}{{CompatGeckoDesktop("41")}}{{CompatUnknown}}{{CompatUnknown}}{{CompatUnknown}}
Set() sense new llença excepció{{CompatUnknown}}{{CompatGeckoDesktop("42")}}{{CompatUnknown}}{{CompatUnknown}}{{CompatUnknown}}
+
+ +
+ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +
CaracterísticaAndroidChrome for AndroidFirefox Mobile (Gecko)IE MobileOpera MobileSafari Mobile
Suport bàsic{{CompatNo}}{{CompatChrome(38)}} [1]{{ CompatGeckoMobile("13") }}{{CompatNo}}{{CompatNo}}8
Argument al constructor: new Set(iterable){{CompatNo}}{{CompatChrome(38)}}{{ CompatGeckoMobile("13") }}{{CompatNo}}{{CompatNo}}{{CompatNo}}
iterable{{CompatNo}}{{CompatNo}}{{ CompatGeckoMobile("17") }}{{CompatNo}}{{CompatNo}}8
Set.clear(){{CompatNo}}{{ CompatChrome(38) }}{{CompatGeckoMobile("19")}}{{CompatNo}}{{CompatNo}}8
Set.keys(), Set.values(), Set.entries(){{CompatNo}}{{ CompatChrome(38) }}{{CompatGeckoMobile("24")}}{{CompatNo}}{{CompatNo}}8
Set.forEach(){{CompatNo}}{{ CompatChrome(38) }}{{CompatGeckoMobile("25")}}{{CompatNo}}{{CompatNo}}8
Igualtat de valors per a -0 i 0{{CompatNo}}{{ CompatChrome(38) }}{{CompatGeckoMobile("29")}}{{CompatNo}}{{CompatNo}}{{CompatNo}}
Argument del constructor: new Set(null){{CompatUnknown}}{{CompatVersionUnknown}}{{CompatGeckoMobile("37")}}{{CompatUnknown}}{{CompatUnknown}}{{CompatUnknown}}
Monkey-patched add() al Constructor{{CompatUnknown}}{{CompatVersionUnknown}}{{CompatGeckoMobile("37")}}{{CompatUnknown}}{{CompatUnknown}}{{CompatUnknown}}
Set[@@species]{{CompatUnknown}}{{CompatUnknown}}{{CompatGeckoMobile("41")}}{{CompatUnknown}}{{CompatUnknown}}{{CompatUnknown}}
Set() sense new llença excepció{{CompatUnknown}}{{CompatUnknown}}{{CompatGeckoMobile("42")}}{{CompatUnknown}}{{CompatUnknown}}{{CompatUnknown}}
+
+ +

[1] La característica estava disponible sota una preferència a partir de Chorem 31. Al chrome://flags, activeu l'entrada “Activa JavaScript Experimental”.

+ +

Vegeu també

+ + diff --git a/files/ca/web/javascript/reference/global_objects/set/values/index.html b/files/ca/web/javascript/reference/global_objects/set/values/index.html new file mode 100644 index 0000000000..307fa78113 --- /dev/null +++ b/files/ca/web/javascript/reference/global_objects/set/values/index.html @@ -0,0 +1,106 @@ +--- +title: Set.prototype.values() +slug: Web/JavaScript/Referencia/Objectes_globals/Set/values +translation_of: Web/JavaScript/Reference/Global_Objects/Set/values +--- +
{{JSRef}}
+ +

El mètode values() retorna un nou objecte Iterator que conté els valors per a cada element de l'objecte Set en ordre d'inserció.

+ +

El mètode keys() és un mètode sinònim d'aquest mètode (per a mantindre la similitud amb els objecte {{jsxref("Map")}}); es comporta exactament de la mateixa forma i retorna els valors dels elements de l'objecte Set.

+ +

Sintaxi

+ +
mySet.values();
+mySet.keys();
+
+ +

Exemples

+ +

Utilitzar values()

+ +
var mySet = new Set();
+mySet.add("foo");
+mySet.add("bar");
+mySet.add("baz");
+
+var setIter = mySet.values();
+
+console.log(setIter.next().value); // "foo"
+console.log(setIter.next().value); // "bar"
+console.log(setIter.next().value); // "baz"
+ +

Especificacions

+ + + + + + + + + + + + + + +
EspecificacióEstatComentaris
{{SpecName('ES6', '#sec-set.prototype.values', 'Set.prototype.values')}}{{Spec2('ES6')}}Definició inicial.
+ +

Compatibilitat amb navegadors

+ +

{{CompatibilityTable}}

+ +
+ + + + + + + + + + + + + + + + + + + +
CaracterísticaChromeFirefox (Gecko)Internet ExplorerOperaSafari
Suport bàsic38{{CompatGeckoDesktop("24")}}{{CompatNo}}257.1
+
+ +
+ + + + + + + + + + + + + + + + + + + + + +
CaracterísticaAndroidChrome for AndroidFirefox Mobile (Gecko)IE MobileOpera MobileSafari Mobile
Suport bàsic{{CompatNo}}38{{ CompatGeckoMobile("24") }}{{ CompatNo}}{{ CompatNo}}8
+
+ +

Vegeu també

+ + diff --git a/files/ca/web/javascript/reference/global_objects/string/anchor/index.html b/files/ca/web/javascript/reference/global_objects/string/anchor/index.html new file mode 100644 index 0000000000..15bd4db97b --- /dev/null +++ b/files/ca/web/javascript/reference/global_objects/string/anchor/index.html @@ -0,0 +1,118 @@ +--- +title: String.prototype.anchor() +slug: Web/JavaScript/Referencia/Objectes_globals/String/anchor +translation_of: Web/JavaScript/Reference/Global_Objects/String/anchor +--- +
{{JSRef}}
+ +

El mètode anchor() un element àncora HTML {{HTMLElement("a")}} que s'utilitza com a HTML un objectiu hypertext.

+ +

Sintaxi

+ +
str.anchor(nom)
+ +

Paràmetres

+ +
+
nom
+
Una cadena que representa l'atribut name attribute of the a tag to be created.
+
+ +

Descripció

+ +

Utilitzar el mètode anchor() per crear i mostrar una àncora en un document mitjançant programació.

+ +

En la sintaxi, la cadena de text representa el text literal que es vol mostrar a l'usuari. La cadena paràmetre name representa l'atribut name de l'element {{HTMLElement("a")}}.

+ +

Les àncores creades amb el mètode anchor() es tornen elements de l'array {{domxref("document.anchors")}}.

+ +

Exemples

+ +

Utilitzar anchor()

+ +
var myString = 'Taula de continguts';
+
+document.body.innerHTML = myString.anchor('contents_anchor');
+
+ +

Mostrarà el següent HTML:

+ +
<a name="contents_anchor">Taula de continguts</a>
+
+ +

Especificacions

+ + + + + + + + + + + + + + +
EspecificacióEstatComentaris
{{SpecName('ES6', '#sec-string.prototype.anchor', 'String.prototype.anchor')}}{{Spec2('ES6')}}Definició inicial. Implementat en JavaScript 1.0. Definit en l'Annex B (normative) per característiques addiccionals d'ECMAScript per a navegadors Web.
+ +

Compatibilitat amb navegadors

+ +
{{CompatibilityTable}}
+ +
+ + + + + + + + + + + + + + + + + + + +
CaracterísticaChromeFirefox (Gecko)Internet ExplorerOperaSafari
Suport bàsic{{CompatVersionUnknown}}{{CompatGeckoDesktop("1.0")}} [1]{{CompatVersionUnknown}}{{CompatVersionUnknown}}{{CompatVersionUnknown}}
+
+ +
+ + + + + + + + + + + + + + + + + + + + + +
CaracterísticaAndroidChrome pdr AndroidFirefox Mobile (Gecko)IE MobileOpera MobileSafari Mobile
Suport bàsic{{CompatVersionUnknown}}{{CompatVersionUnknown}}{{CompatGeckoMobile("1.0")}} [1]{{CompatVersionUnknown}}{{CompatVersionUnknown}}{{CompatVersionUnknown}}
+
+ +

[1] Des de la versió Gecko 17, les " (cometes) són substituides pel caràcter de referència HTML &quot; en cadenes subministrades pel paràmetre name.

+ +

Vegeu també

+ + diff --git a/files/ca/web/javascript/reference/global_objects/string/big/index.html b/files/ca/web/javascript/reference/global_objects/string/big/index.html new file mode 100644 index 0000000000..a3b8815f10 --- /dev/null +++ b/files/ca/web/javascript/reference/global_objects/string/big/index.html @@ -0,0 +1,114 @@ +--- +title: String.prototype.big() +slug: Web/JavaScript/Referencia/Objectes_globals/String/big +translation_of: Web/JavaScript/Reference/Global_Objects/String/big +--- +
{{JSRef}} {{deprecated_header}}
+ +

El mètode big() crea un element HTML {{HTMLElement("big")}} que causa que la cadena es mostri en una font de mida gran.

+ +
+

Nota d'ús: L'element <big> s'ha eliminat de l'HTML5 i no s'hauria de fer servir més. S'aconsella als desenvolupadors web utilitzar les propietats de CSS.

+
+ +

Sintaxi

+ +
str.big()
+ +

Descripció

+ +

El mètode big() incrusta una cadena dins del tag <big>: "<big>str</big>".

+ +

Exemples

+ +

Utilitzar big()

+ +

L'exemple següent utilitza mètodes string per canviar la mida d'una cadena:

+ +
var worldString = 'Hello, world';
+
+console.log(worldString.small());     // <small>Hello, world</small>
+console.log(worldString.big());       // <big>Hello, world</big>
+console.log(worldString.fontsize(7)); // <fontsize=7>Hello, world</fontsize>
+
+ +

Amb l'objecte {{domxref("HTMLElement.style", "element.style")}} es pot obtenir l'atribut style de l'element i manipular-lo més genèricament, per exemple:

+ +
document.getElementById('yourElemId').style.fontSize = '2em';
+
+ +

Especificacions

+ + + + + + + + + + + + + + +
EspecificacióEstatComentaris
{{SpecName('ES6', '#sec-string.prototype.big', 'String.prototype.big')}}{{Spec2('ES6')}}Definició inicial. Implementat en JavaScript 1.0. Definit en l'Annex B (normative) per característiques addicionals ECMAScript per navegadors web.
+ +

Compatibilitat amb navegadors

+ +
{{CompatibilityTable}}
+ +
+ + + + + + + + + + + + + + + + + + + +
CaracterísticaChromeFirefox (Gecko)Internet ExplorerOperaSafari
Suport bàsic{{CompatVersionUnknown}}{{CompatGeckoDesktop("1.0")}}{{CompatVersionUnknown}}{{CompatVersionUnknown}}{{CompatVersionUnknown}}
+
+ +
+ + + + + + + + + + + + + + + + + + + + + +
CaracterísticaAndroidChrome per AndroidFirefox Mobile (Gecko)IE MobileOpera MobileSafari Mobile
Suport bàsic{{CompatVersionUnknown}}{{CompatVersionUnknown}}{{CompatGeckoMobile("1.0")}}{{CompatVersionUnknown}}{{CompatVersionUnknown}}{{CompatVersionUnknown}}
+
+ +

Vegeu també

+ + diff --git a/files/ca/web/javascript/reference/global_objects/string/blink/index.html b/files/ca/web/javascript/reference/global_objects/string/blink/index.html new file mode 100644 index 0000000000..2378325897 --- /dev/null +++ b/files/ca/web/javascript/reference/global_objects/string/blink/index.html @@ -0,0 +1,110 @@ +--- +title: String.prototype.blink() +slug: Web/JavaScript/Referencia/Objectes_globals/String/blink +translation_of: Web/JavaScript/Reference/Global_Objects/String/blink +--- +
{{JSRef}} {{deprecated_header}}
+ +

El mètode blink() crea un elment HTML {{HTMLElement("blink")}} que fa mostrar una cadena de forma intermitent.

+ +
+

Advertència: El text que es mostra de forma intermitent és mal vist per varis estàndards d'accessibilitat. L'element  <blink> no és estàndard i és obsolet!

+
+ +

Sintaxi

+ +
str.blink()
+ +

Descripció

+ +

El mètode blink() incrusta una cadena dins l'etiqueta <blink>: "<blink>cad</blink>".

+ +

Exemples

+ +

Utilitzar blink()

+ +

L'exemple següent utilitza mètodes string per canviar el format d'una cadena:

+ +
var worldString = 'Hello, world';
+
+console.log(worldString.blink());   // <blink>Hello, world</blink>
+console.log(worldString.bold());    // <b>Hello, world</b>
+console.log(worldString.italics()); // <i>Hello, world</i>
+console.log(worldString.strike());  // <strike>Hello, world</strike>
+ +

Especificacions

+ + + + + + + + + + + + + + +
EspecificacióEstatComentaris
{{SpecName('ES6', '#sec-string.prototype.blink', 'String.prototype.blink')}}{{Spec2('ES6')}}Definició inicial. Implementat en JavaScript 1.0. Definit en l'Annex B (normative) per característiques addiccionals d'ECMAScrip per Navegadors Web.
+ +

Compatibilitat amb navegadors

+ +
{{CompatibilityTable}}
+ +
+ + + + + + + + + + + + + + + + + + + +
CaracterísticaChromeFirefox (Gecko)Internet ExplorerOperaSafari
Suport bàsic{{CompatVersionUnknown}}{{CompatGeckoDesktop("1.0")}}{{CompatVersionUnknown}}{{CompatVersionUnknown}}{{CompatVersionUnknown}}
+
+ +
+ + + + + + + + + + + + + + + + + + + + + +
CaracterísticaAndroidChrome per AndroidFirefox Mobile (Gecko)IE MobileOpera MobileSafari Mobile
Suport bàsic{{CompatVersionUnknown}}{{CompatVersionUnknown}}{{CompatGeckoMobile("1.0")}}{{CompatVersionUnknown}}{{CompatVersionUnknown}}{{CompatVersionUnknown}}
+
+ +

Vegeu també

+ + diff --git a/files/ca/web/javascript/reference/global_objects/string/bold/index.html b/files/ca/web/javascript/reference/global_objects/string/bold/index.html new file mode 100644 index 0000000000..502810bb45 --- /dev/null +++ b/files/ca/web/javascript/reference/global_objects/string/bold/index.html @@ -0,0 +1,106 @@ +--- +title: String.prototype.bold() +slug: Web/JavaScript/Referencia/Objectes_globals/String/bold +translation_of: Web/JavaScript/Reference/Global_Objects/String/bold +--- +
{{JSRef}} {{deprecated_header}}
+ +

El mètode bold() crea un element HTML {{HTMLElement("b")}} que causa que una cadena es mostri amb negreta.

+ +

Sintaxi

+ +
str.bold()
+ +

Descripció

+ +

El mètode bold() incrusta una cadena en l'etiqueta <b>: "<b>cad</b>".

+ +

Exemples

+ +

Utilitzar bold()

+ +

L'exemple següent utilitza mètodes string per canviar el format d'una cadena:

+ +
var worldString = 'Hello, world';
+
+console.log(worldString.blink());   // <blink>Hello, world</blink>
+console.log(worldString.bold());    // <b>Hello, world</b>
+console.log(worldString.italics()); // <i>Hello, world</i>
+console.log(worldString.strike());  // <strike>Hello, world</strike>
+ +

Especificacions

+ + + + + + + + + + + + + + +
EspecificacióEstatComentaris
{{SpecName('ES6', '#sec-string.prototype.bold', 'String.prototype.bold')}}{{Spec2('ES6')}}Definició inicial. Implementat en JavaScript 1.0. Definit en l'Annex B (normative) per Característiques addiccionals ECMAScript per navegadors Web.
+ +

Compatibilitat amb navegadors

+ +
{{CompatibilityTable}}
+ +
+ + + + + + + + + + + + + + + + + + + +
CaracterísticaChromeFirefox (Gecko)Internet ExplorerOperaSafari
Suport bàsic{{CompatVersionUnknown}}{{CompatGeckoDesktop("1.0")}}{{CompatVersionUnknown}}{{CompatVersionUnknown}}{{CompatVersionUnknown}}
+
+ +
+ + + + + + + + + + + + + + + + + + + + + +
CaracterísticaAndroidChrome per AndroidFirefox Mobile (Gecko)IE MobileOpera MobileSafari Mobile
Suport bàsic{{CompatVersionUnknown}}{{CompatVersionUnknown}}{{CompatGeckoMobile("1.0")}}{{CompatVersionUnknown}}{{CompatVersionUnknown}}{{CompatVersionUnknown}}
+
+ +

Vegeu també

+ + diff --git a/files/ca/web/javascript/reference/global_objects/string/charat/index.html b/files/ca/web/javascript/reference/global_objects/string/charat/index.html new file mode 100644 index 0000000000..55a84ab7d0 --- /dev/null +++ b/files/ca/web/javascript/reference/global_objects/string/charat/index.html @@ -0,0 +1,283 @@ +--- +title: String.prototype.charAt() +slug: Web/JavaScript/Referencia/Objectes_globals/String/charAt +translation_of: Web/JavaScript/Reference/Global_Objects/String/charAt +--- +
{{JSRef}}
+ +

El mètode charAt() retorna el caràcter especificat d'una cadena.

+ +

Sintaxi

+ +
str.charAt(posicio)
+ +

Paràmetres

+ +
+
posicio
+
Un nombre sencer entre 0 i la longitud de la cadena menys 1.
+
+ +

Descripció

+ +

Els caràcters d'una cadena reben un nombre per la seva posició d'esquerra a dreta. La posició del primer caràcter és el 0 i la posició de l'últim caràcter d'una cadena anomenada stringName és stringName.length - 1. Si la posicio proporcionada està fora del rang vàlid JavaScript retornarà una cadena buida.

+ +

Exemples

+ +

Mostrar caràcters de diferents posicions d'una cadena

+ +

L'exemple següent mostra alguns caràcters a diferents posicions de la cadena "Brave new world":

+ +
var anyString = 'Brave new world';
+
+console.log("El caràcter a la posició 0   és '" + anyString.charAt(0)   + "'");
+console.log("El caràcter a la posició 1   és '" + anyString.charAt(1)   + "'");
+console.log("El caràcter a la posició 2   és '" + anyString.charAt(2)   + "'");
+console.log("El caràcter a la posició 3   és '" + anyString.charAt(3)   + "'");
+console.log("El caràcter a la posició 4   és '" + anyString.charAt(4)   + "'");
+console.log("El caràcter a la posició 999 és '" + anyString.charAt(999) + "'");
+
+ +

Les línies anteriors mostren la sortida següent:

+ +
El caràcter a la posició 0   és 'B'
+El caràcter a la posició 1   és 'r'
+El caràcter a la posició 2   és 'a'
+El caràcter a la posició 3   és 'v'
+El caràcter a la posició 4   és 'e'
+El caràcter a la posició 999 és ''
+
+ +

Obtenir caràcters sencers

+ +

El codi següent garanteix obtenir un caràcter sencer, fins i tot quan la cadena contingui caràcters que no formen part del pla bàsic multilingüístic.

+ +
var str = 'A \uD87E\uDC04 Z'; // We could also use a non-BMP character directly
+for (var i = 0, chr; i < str.length; i++) {
+  if ((chr = getWholeChar(str, i)) === false) {
+    continue;
+  }
+  // Adapt this line at the top of each loop, passing in the whole string and
+  // the current iteration and returning a variable to represent the
+  // individual character
+
+  console.log(chr);
+}
+
+function getWholeChar(str, i) {
+  var code = str.charCodeAt(i);
+
+  if (Number.isNaN(code)) {
+    return ''; // Position not found
+  }
+  if (code < 0xD800 || code > 0xDFFF) {
+    return str.charAt(i);
+  }
+
+  // High surrogate (could change last hex to 0xDB7F to treat high private
+  // surrogates as single characters)
+  if (0xD800 <= code && code <= 0xDBFF) {
+    if (str.length <= (i + 1)) {
+      throw 'High surrogate without following low surrogate';
+    }
+    var next = str.charCodeAt(i + 1);
+      if (0xDC00 > next || next > 0xDFFF) {
+        throw 'High surrogate without following low surrogate';
+      }
+      return str.charAt(i) + str.charAt(i + 1);
+  }
+  // Low surrogate (0xDC00 <= code && code <= 0xDFFF)
+  if (i === 0) {
+    throw 'Low surrogate without preceding high surrogate';
+  }
+  var prev = str.charCodeAt(i - 1);
+
+  // (could change last hex to 0xDB7F to treat high private
+  // surrogates as single characters)
+  if (0xD800 > prev || prev > 0xDBFF) {
+    throw 'Low surrogate without preceding high surrogate';
+  }
+  // We can pass over low surrogates now as the second component
+  // in a pair which we have already processed
+  return false;
+}
+
+ +

En l'entorn de l'ECMAScript 2016, que soporta assignació desestructurada, es pot utilitzar el codi següent com a versió alternativa més flexibleenvironment which allows destructured assignment, the following is a more succinct and somewhat more flexible alternative in that it does incrementing for an incrementing variable automatically (if the character warrants it in being a surrogate pair).

+ +
var str = 'A\uD87E\uDC04Z'; // We could also use a non-BMP character directly
+for (var i = 0, chr; i < str.length; i++) {
+  [chr, i] = getWholeCharAndI(str, i);
+  // Adapt this line at the top of each loop, passing in the whole string and
+  // the current iteration and returning an array with the individual character
+  // and 'i' value (only changed if a surrogate pair)
+
+  console.log(chr);
+}
+
+function getWholeCharAndI(str, i) {
+  var code = str.charCodeAt(i);
+
+  if (Number.isNaN(code)) {
+    return ''; // Position not found
+  }
+  if (code < 0xD800 || code > 0xDFFF) {
+    return [str.charAt(i), i]; // Normal character, keeping 'i' the same
+  }
+
+  // High surrogate (could change last hex to 0xDB7F to treat high private
+  // surrogates as single characters)
+  if (0xD800 <= code && code <= 0xDBFF) {
+    if (str.length <= (i + 1)) {
+      throw 'High surrogate without following low surrogate';
+    }
+    var next = str.charCodeAt(i + 1);
+      if (0xDC00 > next || next > 0xDFFF) {
+        throw 'High surrogate without following low surrogate';
+      }
+      return [str.charAt(i) + str.charAt(i + 1), i + 1];
+  }
+  // Low surrogate (0xDC00 <= code && code <= 0xDFFF)
+  if (i === 0) {
+    throw 'Low surrogate without preceding high surrogate';
+  }
+  var prev = str.charCodeAt(i - 1);
+
+  // (could change last hex to 0xDB7F to treat high private surrogates
+  // as single characters)
+  if (0xD800 > prev || prev > 0xDBFF) {
+    throw 'Low surrogate without preceding high surrogate';
+  }
+  // Return the next character instead (and increment)
+  return [str.charAt(i + 1), i + 1];
+}
+
+ +

Fixing charAt() to support non-Basic-Multilingual-Plane (BMP) characters

+ +

While the example above may be more frequently useful for those wishing to support non-BMP characters (since it does not require the caller to know where any non-BMP character might appear), in the event that one does wish, in choosing a character by index, to treat the surrogate pairs within a string as the single characters they represent, one can use the following:

+ +
function fixedCharAt(str, idx) {
+  var ret = '';
+  str += '';
+  var end = str.length;
+
+  var surrogatePairs = /[\uD800-\uDBFF][\uDC00-\uDFFF]/g;
+  while ((surrogatePairs.exec(str)) != null) {
+    var li = surrogatePairs.lastIndex;
+    if (li - 2 < idx) {
+      idx++;
+    } else {
+      break;
+    }
+  }
+
+  if (idx >= end || idx < 0) {
+    return '';
+  }
+
+  ret += str.charAt(idx);
+
+  if (/[\uD800-\uDBFF]/.test(ret) && /[\uDC00-\uDFFF]/.test(str.charAt(idx + 1))) {
+    // Go one further, since one of the "characters" is part of a surrogate pair
+    ret += str.charAt(idx + 1);
+  }
+  return ret;
+}
+
+ +

Specifications

+ + + + + + + + + + + + + + + + + + + + + + + + + + + + + +
SpecificationStatusComment
{{SpecName('ES1')}}{{Spec2('ES1')}}Initial definition.
{{SpecName('ES5.1', '#sec-15.5.4.4', 'String.prototype.charAt')}}{{Spec2('ES5.1')}} 
{{SpecName('ES6', '#sec-string.prototype.charat', 'String.prototype.charAt')}}{{Spec2('ES6')}} 
{{SpecName('ESDraft', '#sec-string.prototype.charat', 'String.prototype.charAt')}}{{Spec2('ESDraft')}} 
+ +

Browser compatibility

+ +
{{CompatibilityTable}}
+ +
+ + + + + + + + + + + + + + + + + + + +
FeatureChromeFirefox (Gecko)Internet ExplorerOperaSafari
Basic support{{CompatVersionUnknown}}{{CompatVersionUnknown}}{{CompatVersionUnknown}}{{CompatVersionUnknown}}{{CompatVersionUnknown}}
+
+ +
+ + + + + + + + + + + + + + + + + + + + + +
FeatureAndroidChrome for AndroidFirefox Mobile (Gecko)IE MobileOpera MobileSafari Mobile
Basic support{{CompatVersionUnknown}}{{CompatVersionUnknown}}{{CompatVersionUnknown}}{{CompatVersionUnknown}}{{CompatVersionUnknown}}{{CompatVersionUnknown}}
+
+ +

See also

+ + diff --git a/files/ca/web/javascript/reference/global_objects/string/concat/index.html b/files/ca/web/javascript/reference/global_objects/string/concat/index.html new file mode 100644 index 0000000000..87cdda3c5e --- /dev/null +++ b/files/ca/web/javascript/reference/global_objects/string/concat/index.html @@ -0,0 +1,125 @@ +--- +title: String.prototype.concat() +slug: Web/JavaScript/Referencia/Objectes_globals/String/concat +translation_of: Web/JavaScript/Reference/Global_Objects/String/concat +--- +
{{JSRef}}
+ +

El mètode concat() combina el text de dos o més strings i retorna un nou string.

+ +

Sintaxi

+ +
str.concat(string2, string3[, ..., stringN])
+ +

Paràmetres

+ +
+
string2...stringN
+
Strings que seran concatenats a aquest string.
+
+ +

Descripció

+ +

La funció concat() combina el text d'un o més strings i retorna un nou string. Canvis al text d'un string no afecten l'altre string.

+ +

Exemples

+ +

Utilitzar concat()

+ +

L'exemple següent combina strings en un nou string.

+ +
var hola = 'Hola, ';
+console.log(hola.concat('Kevin', ' tingueu un bon dia.'));
+
+/* Hola, Kevin tingueu un bon dia. */
+
+ +

Rendiment

+ +

Es recomana altament utilitzar els {{jsxref("Operators/Assignment_Operators", "operadors d'assignació", "", 1)}} (+, +=) en comptes del mètode concat(). Vegeu aquest test de rendiment.

+ +

Especificacions

+ + + + + + + + + + + + + + + + + + + + + + + + +
EspecificacióEstatComentaris
{{SpecName('ES3')}}{{Spec2('ES3')}}Definició inicial. Implementat a JavaScript 1.2.
{{SpecName('ES5.1', '#sec-15.5.4.6', 'String.prototype.concat')}}{{Spec2('ES5.1')}} 
{{SpecName('ES6', '#sec-string.prototype.concat', 'String.prototype.concat')}}{{Spec2('ES6')}} 
+ +

Compatibilitat amb navegadors

+ +
{{CompatibilityTable}}
+ +
+ + + + + + + + + + + + + + + + + + + +
CaracterísticaChromeFirefox (Gecko)Internet ExplorerOperaSafari
Suport bàsic{{CompatVersionUnknown}}{{CompatVersionUnknown}}{{CompatVersionUnknown}}{{CompatVersionUnknown}}{{CompatVersionUnknown}}
+
+ +
+ + + + + + + + + + + + + + + + + + + + + +
CaracterísticaAndroidChrome for AndroidFirefox Mobile (Gecko)IE MobileOpera MobileSafari Mobile
Suport bàsic{{CompatVersionUnknown}}{{CompatVersionUnknown}}{{CompatVersionUnknown}}{{CompatVersionUnknown}}{{CompatVersionUnknown}}{{CompatVersionUnknown}}
+
+ +

Vegeu també

+ + diff --git a/files/ca/web/javascript/reference/global_objects/string/endswith/index.html b/files/ca/web/javascript/reference/global_objects/string/endswith/index.html new file mode 100644 index 0000000000..83a1201549 --- /dev/null +++ b/files/ca/web/javascript/reference/global_objects/string/endswith/index.html @@ -0,0 +1,133 @@ +--- +title: String.prototype.endsWith() +slug: Web/JavaScript/Referencia/Objectes_globals/String/endsWith +translation_of: Web/JavaScript/Reference/Global_Objects/String/endsWith +--- +
{{JSRef}}
+ +

El mètode endsWith() method determina si un string acaba amb els caràcters d'un altre string, retornant true o false depenent d'això.

+ +

Sintaxi

+ +
str.endsWith(stringAcercar[, posició])
+ +

Paràmetres

+ +
+
stringAcercar
+
Els caràcters a cercar al final d'aquest string.
+
posició
+
Opcional. Cerca dins aquest string considerant posició com la última posició del string; per defecte rep el valor del tamany total del string.
+
 
+
 
+
+ +

Descripció

+ +

Aquest mètode us permet determinar si un string acaba en un altre string.

+ +

Exemples

+ +

Utilitzar endsWith()

+ +
var str = 'To be, or not to be, that is the question.';
+
+console.log(str.endsWith('question.')); // true
+console.log(str.endsWith('to be'));     // false
+console.log(str.endsWith('to be', 19)); // true
+
+ +

Polyfill

+ +

Aquest mètode va ser afegit a l'especificació ECMAScript i pot no estar disponible encara a totes les implementacions de JavaScript. No obstant, la funció següent emula el comportament de String.prototype.endsWith():

+ +
if (!String.prototype.endsWith) {
+  String.prototype.endsWith = function(searchString, position) {
+      var subjectString = this.toString();
+      if (typeof position !== 'number' || !isFinite(position) || Math.floor(position) !== position || position > subjectString.length) {
+        position = subjectString.length;
+      }
+      position -= searchString.length;
+      var lastIndex = subjectString.indexOf(searchString, position);
+      return lastIndex !== -1 && lastIndex === position;
+  };
+}
+
+ +

Especificacions

+ + + + + + + + + + + + + + +
EspecificacióEstatComentaris
{{SpecName('ES6', '#sec-string.prototype.endswith', 'String.prototype.endsWith')}}{{Spec2('ES6')}}Definició inicial.
+ +

Compatibilitat amb navegadors

+ +
{{CompatibilityTable}}
+ +
+ + + + + + + + + + + + + + + + + + + +
CaracterísticaChromeFirefox (Gecko)Internet ExplorerOperaSafari
Suport bàsic{{CompatChrome("41")}}{{CompatGeckoDesktop("17")}}{{CompatNo}}{{CompatNo}}{{CompatNo}}
+
+ +
+ + + + + + + + + + + + + + + + + + + + + +
CaracterísticaAndroidChrome for AndroidFirefox Mobile (Gecko)IE MobileOpera MobileSafari Mobile
Suport bàsic{{CompatNo}}{{CompatChrome("36")}}{{CompatGeckoMobile("17")}}{{CompatNo}}{{CompatNo}}{{CompatNo}}
+
+ +

Vegeu també

+ + diff --git a/files/ca/web/javascript/reference/global_objects/string/fixed/index.html b/files/ca/web/javascript/reference/global_objects/string/fixed/index.html new file mode 100644 index 0000000000..069ab4243f --- /dev/null +++ b/files/ca/web/javascript/reference/global_objects/string/fixed/index.html @@ -0,0 +1,103 @@ +--- +title: String.prototype.fixed() +slug: Web/JavaScript/Referencia/Objectes_globals/String/fixed +translation_of: Web/JavaScript/Reference/Global_Objects/String/fixed +--- +
{{JSRef}} {{deprecated_header}}
+ +

El mètode fixed() crea un element HTML {{HTMLElement("tt")}} que fa que una cadena es mostri en una font fixed-pitch.

+ +

Sintaxi

+ +
str.fixed()
+ +

Descripció

+ +

El mètode fixed() incrusta una cadena en una etiqueta <tt>: "<tt>cad</tt>".

+ +

Exemples

+ +

Utilitzar fixed()

+ +

L'exemple següent utilitza el mètode fixed per canviar el format d'una cadena:

+ +
var worldString = 'Hello, world';
+console.log(worldString.fixed()); // "<tt>Hello, world</tt>"
+
+ +

Especificacions

+ + + + + + + + + + + + + + +
EspecificacióEstatComentaris
{{SpecName('ES6', '#sec-string.prototype.fixed', 'String.prototype.fixed')}}{{Spec2('ES6')}}Definició inicial. Implementat en JavaScript 1.0. Definit en l'Annex B (normative) per Característiques addiccionals d'ECMAScript per Navegadors Web.
+ +

Compatibilitat amb navegadors

+ +
{{CompatibilityTable}}
+ +
+ + + + + + + + + + + + + + + + + + + +
CaracterísticaChromeFirefox (Gecko)Internet ExplorerOperaSafari
Suport bàsic{{CompatVersionUnknown}}{{CompatGeckoDesktop("1.0")}}{{CompatVersionUnknown}}{{CompatVersionUnknown}}{{CompatVersionUnknown}}
+
+ +
+ + + + + + + + + + + + + + + + + + + + + +
CaracterísticaAndroidChrome per AndroidFirefox Mobile (Gecko)IE MobileOpera MobileSafari Mobile
Suport bàsic{{CompatVersionUnknown}}{{CompatVersionUnknown}}{{CompatGeckoMobile("1.0")}}{{CompatVersionUnknown}}{{CompatVersionUnknown}}{{CompatVersionUnknown}}
+
+ +

Vegeu també

+ + diff --git a/files/ca/web/javascript/reference/global_objects/string/fontcolor/index.html b/files/ca/web/javascript/reference/global_objects/string/fontcolor/index.html new file mode 100644 index 0000000000..be52cd576b --- /dev/null +++ b/files/ca/web/javascript/reference/global_objects/string/fontcolor/index.html @@ -0,0 +1,122 @@ +--- +title: String.prototype.fontcolor() +slug: Web/JavaScript/Referencia/Objectes_globals/String/fontcolor +translation_of: Web/JavaScript/Reference/Global_Objects/String/fontcolor +--- +
{{JSRef}} {{deprecated_header}}
+ +

El mètode fontcolor() crea un element HTML {{HTMLElement("font")}} que fa que una cadena es mostri amb el color font especificat.

+ +
+

Nota d'ús: L'element <font> s'ha eleminitat d'HTML5 i no s'ha de fer servir més. Els desenvolupadors web haurien d'utilitzar les propietats de CSS per aquesta finalitat.

+
+ +

Sintaxi

+ +
str.fontcolor(color)
+ +

Paràmetres

+ +
+
color
+
Una cadena que expressa el color com a un triplet RGB hexadecimal o com una cadena literal. Les cadenes literals de noms de colors es troben enllistades en la referència de colors de CSS.
+
+ +

Descripció

+ +

Si expresseu el color com un triplet RGB hexadecimal, heu de fer servir el format rrggbb. Per example, els valors RGB hexadecimals pel color salmó són vermell=FA, verd=80, i blau=72, de forma que el triplet RGB pel color salmó és "FA8072".

+ +

Exemples

+ +

Utilitzar fontcolor()

+ +

L'exemple següent utilitza el mètode fontcolor() per canviar el color d'una cadena mitjançant la creació d'una cadena amb l'etiqueta HTML <font>.

+ +
var worldString = 'Hola, món';
+
+console.log(worldString.fontcolor('red') +  ' és vermell en aquesta línia');
+// '<font color="red">Hola, món</font> 's vermell en aquesta línia'
+
+console.log(worldString.fontcolor('FF00') + ' és vermell en hexadecimal en aquesta línia');
+// '<font color="FF00">Hola, món</font> és vermell en hexadecimal en aquesta línia'
+
+ +

Amb l'objecte {{domxref("HTMLElement.style", "element.style")}} es pot obtenir l'atribut style de l'element i manipular-lo més genèricament, per exemple:

+ +
document.getElementById('yourElemId').style.color = 'red';
+
+ +

Especificacions

+ + + + + + + + + + + + + + +
EspecificacióEstatComentaris
{{SpecName('ES6', '#sec-string.prototype.fontcolor', 'String.prototype.fontcolor')}}{{Spec2('ES6')}}Definició inicial. Implementat en JavaScript 1.0. Definit en l'Annex B (normative) per Característiques addiccionals d'ECMAScript per Navegadors Web.
+ +

Compatibilitat amb navegadors

+ +
{{CompatibilityTable}}
+ +
+ + + + + + + + + + + + + + + + + + + +
CaracterísticaChromeFirefox (Gecko)Internet ExplorerOperaSafari
Suport bàsic{{CompatVersionUnknown}}{{CompatGeckoDesktop("1.0")}}{{CompatVersionUnknown}}{{CompatVersionUnknown}}{{CompatVersionUnknown}}
+
+ +
+ + + + + + + + + + + + + + + + + + + + + +
CaracterísticaAndroidChrome per AndroidFirefox Mobile (Gecko)IE MobileOpera MobileSafari Mobile
Suport bàsic{{CompatVersionUnknown}}{{CompatVersionUnknown}}{{CompatGeckoMobile("1.0")}}{{CompatVersionUnknown}}{{CompatVersionUnknown}}{{CompatVersionUnknown}}
+
+ +

Vegeu també

+ + diff --git a/files/ca/web/javascript/reference/global_objects/string/fontsize/index.html b/files/ca/web/javascript/reference/global_objects/string/fontsize/index.html new file mode 100644 index 0000000000..9f30d124aa --- /dev/null +++ b/files/ca/web/javascript/reference/global_objects/string/fontsize/index.html @@ -0,0 +1,121 @@ +--- +title: String.prototype.fontsize() +slug: Web/JavaScript/Referencia/Objectes_globals/String/fontsize +translation_of: Web/JavaScript/Reference/Global_Objects/String/fontsize +--- +
{{JSRef}} {{deprecated_header}}
+ +

El mètode fontsize() crea un element HTML {{HTMLElement("font")}} que causa que una cadena es mostri en el tamany font especificat.

+ +
+

Nota d'ús: L'element <font> s'ha eliminat de l'HTML5 i no s'ha de fer servir més. Els desenvolupadors web haurien de fer servir les propietats de CSS per aquesta finalitat.

+
+ +

Sintaxi

+ +
str.fontsize(mida)
+ +

Paràmetres

+ +
+
mida
+
Un nombre sencer entre 1 i 7, una cadena que representi un nombre sencer amb signe entre 1 i 7.
+
+ +

Descripció

+ +

Quan s'especifica la mida com a un nombre sencer, s'estableix la mida de la str a un de les 7 mides definides. Quan s'especifica la mida com una cadena com pot ser "-2", s'adjusta el tamany font de str en relació ambel tamany establert en l'etiqueta {{HTMLElement("basefont")}}.

+ +

Exemples

+ +

Utilitzar fontsize()

+ +

El següent exemple utilitza mètodes string per canviar la mida de la cadena:

+ +
var worldString = 'Hola, món';
+
+console.log(worldString.small());     // <small>Hola, món</small>
+console.log(worldString.big());       // <big>Hola, món</big>
+console.log(worldString.fontsize(7)); // <font size="7">Hola, món</fontsize>
+
+ +

Amb l'objecte {{domxref("HTMLElement.style", "element.style")}} es pot obtenir el atribut style de l'element i manipular-lo més genèricament, per exemple:

+ +
document.getElementById('yourElemId').style.fontSize = '0.7em';
+
+ +

Especificacions

+ + + + + + + + + + + + + + +
EspecificacióEstatComentaris
{{SpecName('ES6', '#sec-string.prototype.fontsize', 'String.prototype.fontsize')}}{{Spec2('ES6')}}Definició inicial. Implementat en JavaScript 1.0. Definit en l'Annex B (normative) per Característiques Addiccionals d'ECMAScript per Navegadors Web.
+ +

Compatibilitat amb navegadors

+ +
{{CompatibilityTable}}
+ +
+ + + + + + + + + + + + + + + + + + + +
CaracterísticaChromeFirefox (Gecko)Internet ExplorerOperaSafari
Suport bàsic{{CompatVersionUnknown}}{{CompatGeckoDesktop("1.0")}}{{CompatVersionUnknown}}{{CompatVersionUnknown}}{{CompatVersionUnknown}}
+
+ +
+ + + + + + + + + + + + + + + + + + + + + +
CaracterísticaAndroidChrome per AndroidFirefox Mobile (Gecko)IE MobileOpera MobileSafari Mobile
Suport bàsic{{CompatVersionUnknown}}{{CompatVersionUnknown}}{{CompatGeckoMobile("1.0")}}{{CompatVersionUnknown}}{{CompatVersionUnknown}}{{CompatVersionUnknown}}
+
+ +

Vegeu també

+ + diff --git a/files/ca/web/javascript/reference/global_objects/string/fromcharcode/index.html b/files/ca/web/javascript/reference/global_objects/string/fromcharcode/index.html new file mode 100644 index 0000000000..f4e2308bf9 --- /dev/null +++ b/files/ca/web/javascript/reference/global_objects/string/fromcharcode/index.html @@ -0,0 +1,126 @@ +--- +title: String.fromCharCode() +slug: Web/JavaScript/Referencia/Objectes_globals/String/fromCharCode +translation_of: Web/JavaScript/Reference/Global_Objects/String/fromCharCode +--- +
{{JSRef}}
+ +

El mètode estàtic String.fromCharCode() retorna un string creat a partir de la seqüència de valors Unicode especificada.

+ +

Sintaxi

+ +
String.fromCharCode(num1[, ...[, numN]])
+ +

Paràmetres

+ +
+
num1, ..., numN
+
Una seqüència de nombres que són valors Unicode.
+
+ +

Descripció

+ +

Aquest mètode retorna un string i no un objecte de tipus {{jsxref("String")}}.

+ +

Com que fromCharCode() és un mètode estàtic de {{jsxref("String")}}, sempre s'utilitza com String.fromCharCode() en comptes de com un mètode d'un objecte {{jsxref("String")}} creat.

+ +

Exemples

+ +

Utilitzar fromCharCode()

+ +

L'exemple següent retorna el string "ABC".

+ +
String.fromCharCode(65, 66, 67);  // "ABC"
+
+ +

Fer que funcioni amb valors més grans

+ +

Tot i que la majoria dels valors Unicode es poden representar amb un nombre de 16 bits (tal i com s'esperava mentre s'estava estandaritzant el JavaScript) i es pot emprar fromCharCode() per a retornar un sol caràcter per als valors més comuns (com ara valors UCS-2, que són un subconjunt de l'UTF-16 amb els caràcters més comuns), per a poder manegar TOTS els valors legals Unicode (els quals requereixen fins a 21 bits),  l'ús de només fromCharCode() no és adequat ja que els caràcters de valor més alt utilitzen dos nombres "substituts" (de menor valor) per a formar un sol caràcter. Es pot emprar {{jsxref("String.fromCodePoint()")}} (que forma part de l'esborrant de l'ECMAScript 6) per a retornar el parell de nombres citat i, d'aquesta forma, representar de manera adequada aquests caràcters de valor més alt.

+ +

Especificacions

+ + + + + + + + + + + + + + + + + + + + + + + + +
EspecificacionsEstatComentaris
{{SpecName('ES1')}}{{Spec2('ES1')}}Definició inicial. Implementat a JavaScript 1.2.
{{SpecName('ES5.1', '#sec-15.5.3.2', 'StringfromCharCode')}}{{Spec2('ES5.1')}} 
{{SpecName('ES6', '#sec-string.fromcharcodes', 'String.fromCharCode')}}{{Spec2('ES6')}} 
+ +

Compatibilitat amb navegadors

+ +
{{CompatibilityTable}}
+ +
+ + + + + + + + + + + + + + + + + + + +
CaracterísticaChromeFirefox (Gecko)Internet ExplorerOperaSafari
Suport bàsic{{CompatVersionUnknown}}{{CompatVersionUnknown}}{{CompatVersionUnknown}}{{CompatVersionUnknown}}{{CompatVersionUnknown}}
+
+ +
+ + + + + + + + + + + + + + + + + + + + + +
CaracterísticaAndroidChrome for AndroidFirefox Mobile (Gecko)IE MobileOpera MobileSafari Mobile
Suport bàsic{{CompatVersionUnknown}}{{CompatVersionUnknown}}{{CompatVersionUnknown}}{{CompatVersionUnknown}}{{CompatVersionUnknown}}{{CompatVersionUnknown}}
+
+ +

Vegeu també

+ + diff --git a/files/ca/web/javascript/reference/global_objects/string/index.html b/files/ca/web/javascript/reference/global_objects/string/index.html new file mode 100644 index 0000000000..136820a54d --- /dev/null +++ b/files/ca/web/javascript/reference/global_objects/string/index.html @@ -0,0 +1,340 @@ +--- +title: String +slug: Web/JavaScript/Referencia/Objectes_globals/String +translation_of: Web/JavaScript/Reference/Global_Objects/String +--- +
{{JSRef("Global_Objects", "String")}}
+ +

Resum

+ +

L'objecte global String és un constructor per a strings, també conegudes com a cadenes de caràcters.

+ +

Sintaxi

+ +

Els literals de tipus Stringpoden tenir les següents formes:

+ +
'string text'
+"string text"
+"中文 español English हिन्दी العربية português বাংলা русский 日本語 ਪੰਜਾਬੀ 한국어 தமிழ்"
+
+ +

A més dels caràcters imprimibles normals, es poden codificar caràcters especials mitjançant la notació d'escapament:

+ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +
CodiSortida
\0el caràcter NUL
\'cometa simple
\"cometa doble
\\barra invertida
\nlínia nova
\rretorn de carro
\vbarra vertical
\ttabulador
\besborrar
\fform feed
\uXXXXcaràcter amb codificació unicode
\xXXcaràcter amb codificació Latin-1
+ +

O bé utilitzant l'objecte global String de forma directa:

+ +
String(quelcom)
+new String(quelcom)
+
+ +

Paràmetres

+ +
+
quelcom
+
Qualsevol cosa que serà convertida a string.
+
+ +

Descripció

+ +

Les Strings són útils per a emmagatzemar dades que poden ser representades en forma de texte. Algunes de les operacions més emprades en strings són per a obtindre la seva llargada {{jsxref("String.length", "length")}}, per a concatenar-les mitjançant els operadors de strings + i +=, per a comprovar l'existència o localització de substrings amb el mètode {{jsxref("String.prototype.indexOf()", "indexOf()")}}, o bé per a extreure substrings amb el mètode {{jsxref("String.prototype.substring()", "substring()")}}.

+ +

Accés als caràcters

+ +

Hi ha dues formes d'accedir a un caràcter individual emmagatzemat dins un string. El primer és el mètode {{jsxref("String.prototype.charAt()", "charAt()")}}:

+ +
return 'cat'.charAt(1); // retorna "a"
+
+ +

L'altra forma (introduida a ECMAScript 5) és fer anar l'string com si fós un objecte de tipus array, on els caràcters individuals es corresponen a un índex numèric:

+ +
return 'cat'[1]; // retorna "a"
+
+ +

Utilitzar la notació de claus per a esborrar o bé assignar un valor a un caràcter no funcionarà. Les propietats involucrades no són de tipus no-escriptura i no són configurables. (Vegeu {{jsxref("Object.defineProperty()")}} per a més informació).

+ +

Comparar strings

+ +

Els desenvolupadors de C disposen de la funció strcmp() per a comparar strings. A JavaScript senzillament es poden utilitzar els operadors major-que i menor-que

+ +
var a = 'a';
+var b = 'b';
+if (a < b) { // true
+  print(a + ' és menor que ' + b);
+} else if (a > b) {
+  print(a + ' és major que ' + b);
+} else {
+  print(a + ' i ' + b + ' són iguals.');
+}
+
+ +

Es pot obtindre un resultat similar mitjançant el mètode {{jsxref("String.prototype.localeCompare()", "localeCompare()")}}, heredat per les instàncies de String.

+ +

Distinció entre les primitives string i els objectes String

+ +

Cal recalcar que JavaScript distingeix entre objectes de tipus String i valors primitius de tipus string (El mateix succeeix amb {{jsxref("Global_Objects/Boolean", "Boolean")}} i {{jsxref("Global_Objects/Number", "Numbers")}}

+ +

Els literals de tipus string (englobats en cometes simples o dobles) així com strings retornats per crides a l'objecte String en un contexte no constructor (és a dir, sense utilitzar la paraula clau {{jsxref("Operators/new", "new")}}) són strings primitives. JavaScript automàticament converteix primitives a objectes String, de forma que és posible utilitzar mètodes de l'objecte String en strings primitives. En els contextes on s'ha d'invocar un mètode en una primitiva string o es demana la una propietat, JavaScript automàticament embolcallarà la primitiva string amb un objecte String i cridarà el mètode o la propietat corresponent.

+ +
var s_prim = 'foo';
+var s_obj = new String(s_prim);
+
+console.log(typeof s_prim); // Escriu "string"
+console.log(typeof s_obj);  // Escriu "object"
+
+ +

Les primitives string i els objectes String també donen resultats diferents a l'utilitzar {{jsxref("Global_Objects/eval", "eval()")}}. Les primitives passades a eval són considerades codi font; els objectes String es tracten com qualsevol altre objecte, és a dir, retornan l'objecte. Per exemple:

+ +
var s1 = '2 + 2';             // crea una primitiva string
+var s2 = new String('2 + 2'); // crea un objecte String
+console.log(eval(s1));        // escriu el nombre 4
+console.log(eval(s2));        // escriu la string "2 + 2"
+
+ +

És per aquestes raons que el codi pot produïr errors quan trobi objectes String però s'esperès una primitiva string, tot i que de forma general els autors no s'han de preocupar per la distinció.

+ +

Un objecte String sempre es pot convertir en la seva representació primitiva mitjançant el mètode {{jsxref("String.prototype.valueOf()", "valueOf()")}}.

+ +
console.log(eval(s2.valueOf())); // escriu el nombre 4
+
+ +
Nota: Per a una altra posible enfocament quant a string a JavaScript llegiu l'article sobre StringView — una representació de strings basada en arrays de tipatge explícit similar a C.
+ +

Propietats

+ +
+
{{jsxref("String.prototype")}}
+
Permet afegir propietats a un objecte String.
+
+ +
{{jsOverrides("Function", "Properties", "prototype")}}
+ +

Mètodes

+ +
+
{{jsxref("String.fromCharCode()")}}
+
Retorna un string creat a partir de la seqüència de valors Unicode proporcionada.
+
{{jsxref("String.fromCodePoint()")}} {{experimental_inline}}
+
Retorna un string creat a partir de la seqüència de code points proporcionada.
+
{{jsxref("String.raw()")}} {{experimental_inline}}
+
Retorna un string creat a partir de l'string proporcionat sense tindre en compte la codificació.
+
+ +
{{jsOverrides("Function", "Methods", "fromCharCode", "fromCodePoint", "raw")}}
+ +

Mètodes genèrics de String

+ +

Els mètodes de les instàncies de String també estan disponibles a Firefox a partir del JavaScript 1.6 (tot i que no formen part de l'standard ECMAScript) a l'objecte String, així es poden aplicar els mètodes de String a qualsevol objecte:

+ +
var num = 15;
+console.log(String.replace(num, /5/, '2'));
+
+ +

{{jsxref("Global_Objects/Array", "Generics", "#Array_generic_methods", 1)}} també estàn disponibles als mètodes de {{jsxref("Global_Objects/Array", "Array")}}.

+ +

A continuació es mostra un shim per a donar suport als navegadors que no ho suporten:

+ +
/*globals define*/
+// Assumes all supplied String instance methods already present
+// (one may use shims for these if not available)
+(function() {
+  'use strict';
+
+  var i,
+    // We could also build the array of methods with the following, but the
+    //   getOwnPropertyNames() method is non-shimable:
+    // Object.getOwnPropertyNames(String).filter(function(methodName) {
+    //   return typeof String[methodName] === 'function';
+    // });
+    methods = [
+      'quote', 'substring', 'toLowerCase', 'toUpperCase', 'charAt',
+      'charCodeAt', 'indexOf', 'lastIndexOf', 'startsWith', 'endsWith',
+      'trim', 'trimLeft', 'trimRight', 'toLocaleLowerCase',
+      'toLocaleUpperCase', 'localeCompare', 'match', 'search',
+      'replace', 'split', 'substr', 'concat', 'slice'
+    ],
+    methodCount = methods.length,
+    assignStringGeneric = function(methodName) {
+      var method = String.prototype[methodName];
+      String[methodName] = function(arg1) {
+        return method.apply(arg1, Array.prototype.slice.call(arguments, 1));
+      };
+    };
+
+  for (i = 0; i < methodCount; i++) {
+    assignStringGeneric(methods[i]);
+  }
+}());
+
+ +

Instàncies de String

+ +

Propietats

+ +
{{page('/ca/docs/Web/JavaScript/Reference/Global_Objects/String/prototype', 'Properties')}}
+ +

Mètodes

+ +

Mètodes no relacionats amb HTML

+ +
{{page('/ca/docs/Web/JavaScript/Reference/Global_Objects/String/prototype', 'Methods_unrelated_to_HTML')}}
+ +

Mètodes d'embolcall de HTML

+ +
{{page('/ca/docs/Web/JavaScript/Reference/Global_Objects/String/prototype', 'HTML_wrapper_methods')}}
+ +

Exemples

+ +

Exemple: Conversió de strings

+ +

És posible utilitzar String com a una alternativa "més segura" de {{jsxref("String.prototype.toString()","toString()")}}, ja que tot i que normalment també crida el mètode toString() subjacent, també funciona per a {{jsxref("Global_Objects/null", "null")}} i {{jsxref("Global_Objects/undefined", "undefined")}}. Per exemple:

+ +
var outputStrings = [];
+for (var i = 0, n = inputValues.length; i < n; ++i) {
+  outputStrings.push(String(inputValues[i]));
+}
+
+ +

Especificacions

+ + + + + + + + + + + + + + + + + + + + + + + + +
EspecificacióEstatComentari
ECMAScript 1a EdicióStandardDefinició inicial.
{{SpecName('ES5.1', '#sec-15.5', 'String')}}{{Spec2('ES5.1')}} 
{{SpecName('ES6', '#sec-string-objects', 'String')}}{{Spec2('ES6')}} 
+ +

Compatibilitat amb navegadors

+ +
{{CompatibilityTable}}
+ +
+ + + + + + + + + + + + + + + + + + + +
CaracterísticaChromeFirefox (Gecko)Internet ExplorerOperaSafari
Suport bàsic{{CompatChrome("0.2")}}{{CompatVersionUnknown}}{{CompatVersionUnknown}}{{CompatVersionUnknown}}{{CompatVersionUnknown}}
+
+ +
+ + + + + + + + + + + + + + + + + + + + + +
CaracterísticaAndroidChrome for AndroidFirefox Mobile (Gecko)IE MobileOpera MobileSafari Mobile
Suport bàsic{{CompatVersionUnknown}}{{CompatVersionUnknown}}{{CompatVersionUnknown}}{{CompatVersionUnknown}}{{CompatVersionUnknown}}{{CompatVersionUnknown}}
+
+ +

Vegeu també

+ + diff --git a/files/ca/web/javascript/reference/global_objects/string/indexof/index.html b/files/ca/web/javascript/reference/global_objects/string/indexof/index.html new file mode 100644 index 0000000000..9b08b04ded --- /dev/null +++ b/files/ca/web/javascript/reference/global_objects/string/indexof/index.html @@ -0,0 +1,190 @@ +--- +title: String.prototype.indexOf() +slug: Web/JavaScript/Referencia/Objectes_globals/String/indexOf +translation_of: Web/JavaScript/Reference/Global_Objects/String/indexOf +--- +
{{JSRef}}
+ +

El mètode indexOf() retorna la primera posició dins el {{jsxref("String")}} des del que es crida a la qual es troba el valor proporcionat. Retorna -1 si no es troba el valor donat.

+ +

Sintaxi

+ +
str.indexOf(valorACercar[, posicioInicial])
+ +

Paràmetres

+ +
+
valorACercar
+
Un string que representa el valor a cercar.
+
posicioInicial {{optional_inline}}
+
La posició a partir de la qual es cercarà dins la cadena. Pot ser qualsevol nombre sencer. El valor per defecte és 0, indicant que es cercarà a tota la cadena. Si posicioInicial < 0 es cercarà a tota la cadena. Si posicioInicial >= str.length, no es cercarà a la cadena i es retornarà -1 automàticament. Si valorACercar és una cadena buida es retornarà str.length.
+
+ +

Descripció

+ +

Els caràcters de la cadena s'indexen d'esquerra a dreta. La posició del primer caràcter és 0, i la posició de l'últim caràcter d'una cadena amb nom stringName és  stringName.length - 1.

+ +
'Blue Whale'.indexOf('Blue');     // returns  0
+'Blue Whale'.indexOf('Blute');    // returns -1
+'Blue Whale'.indexOf('Whale', 0); // returns  5
+'Blue Whale'.indexOf('Whale', 5); // returns  5
+'Blue Whale'.indexOf('', 9);      // returns  9
+'Blue Whale'.indexOf('', 10);     // returns 10
+'Blue Whale'.indexOf('', 11);     // returns 10
+
+ +

Distinció entre majúscules i minúscules

+ +

El mètode indexOf() distingeix entre majúscules i minúscules. Per exemple, l'expressió següent retorna -1:

+ +
'Blue Whale'.indexOf('blue'); // retorna -1
+
+ +

Comprovar troballes

+ +

Cal destacar que '0' no s'evalua a true i que '-1' no s'evalua a false. Tenim llavors que al comprovar si una cadena específica existeix dins una altra, la forma correcta de comprovar-ho seria:

+ +
'Blue Whale'.indexOf('Blue') !== -1; // true
+'Blue Whale'.indexOf('Bloe') !== -1; // false
+
+ +

Exemples

+ +

Utilitzar indexOf() i lastIndexOf()

+ +

L'exemple següent utilitza indexOf() i {{jsxref("String.prototype.lastIndexOf()", "lastIndexOf()")}} per a trobar valors dins la cadena "Brave new world".

+ +
var anyString = 'Brave new world';
+
+console.log('La posicó de la primera w des del principi és ' + anyString.indexOf('w'));
+// mostra 8
+console.log('La posició de la primera w des del final és ' + anyString.lastIndexOf('w'));
+// mostra 10
+
+console.log('La posicó de "new" des del principi és ' + anyString.indexOf('new'));
+// mostra 6
+console.log('La posició de "new" des del final és ' + anyString.lastIndexOf('new'));
+// mostra 6
+
+ +

indexOf() i distinció entre majúscules i minúscules

+ +

L'exemple següent definteix dos variables de tipus cadena. The following example defines two string variables. The variables contain the same string except that the second string contains uppercase letters. The first {{domxref("console.log()")}} method displays 19. But because the indexOf() method is case sensitive, the string "cheddar" is not found in myCapString, so the second console.log() method displays -1.

+ +
var myString    = 'brie, pepper jack, cheddar';
+var myCapString = 'Brie, Pepper Jack, Cheddar';
+
+console.log('myString.indexOf("cheddar") is ' + myString.indexOf('cheddar'));
+// logs 19
+console.log('myCapString.indexOf("cheddar") is ' + myCapString.indexOf('cheddar'));
+// logs -1
+
+ +

Using indexOf() to count occurrences of a letter in a string

+ +

The following example sets count to the number of occurrences of the letter e in the string str:

+ +
var str = 'To be, or not to be, that is the question.';
+var count = 0;
+var pos = str.indexOf('e');
+
+while (pos !== -1) {
+  count++;
+  pos = str.indexOf('e', pos + 1);
+}
+
+console.log(count); // displays 4
+
+ +

Specifications

+ + + + + + + + + + + + + + + + + + + + + + + + + + + + + +
SpecificationStatusComment
{{SpecName('ES1')}}{{Spec2('ES1')}}Initial definition.
{{SpecName('ES5.1', '#sec-15.5.4.7', 'String.prototype.indexOf')}}{{Spec2('ES5.1')}} 
{{SpecName('ES6', '#sec-string.prototype.indexof', 'String.prototype.indexOf')}}{{Spec2('ES6')}} 
{{SpecName('ESDraft', '#sec-string.prototype.indexof', 'String.prototype.indexOf')}}{{Spec2('ESDraft')}} 
+ +

Browser compatibility

+ +
{{CompatibilityTable}}
+ +
+ + + + + + + + + + + + + + + + + + + +
FeatureChromeFirefox (Gecko)Internet ExplorerOperaSafari
Basic support{{CompatVersionUnknown}}{{CompatVersionUnknown}}{{CompatVersionUnknown}}{{CompatVersionUnknown}}{{CompatVersionUnknown}}
+
+ +
+ + + + + + + + + + + + + + + + + + + + + +
FeatureAndroidChrome for AndroidFirefox Mobile (Gecko)IE MobileOpera MobileSafari Mobile
Basic support{{CompatVersionUnknown}}{{CompatVersionUnknown}}{{CompatVersionUnknown}}{{CompatVersionUnknown}}{{CompatVersionUnknown}}{{CompatVersionUnknown}}
+
+ +

See also

+ + diff --git a/files/ca/web/javascript/reference/global_objects/string/italics/index.html b/files/ca/web/javascript/reference/global_objects/string/italics/index.html new file mode 100644 index 0000000000..f38a8f9579 --- /dev/null +++ b/files/ca/web/javascript/reference/global_objects/string/italics/index.html @@ -0,0 +1,104 @@ +--- +title: String.prototype.italics() +slug: Web/JavaScript/Referencia/Objectes_globals/String/italics +translation_of: Web/JavaScript/Reference/Global_Objects/String/italics +--- +
{{JSRef}} {{deprecated_header}}
+ +

El mètode italics() crea un element HTML {{HTMLElement("i")}} que converteix una cadena en format itàlic.

+ +

Sintaxi

+ +
str.italics()
+ +

Descripció

+ +

El mètode italics() incrusta una cadena en una etiqueta <i>: "<i>str</i>".

+ +

Exemples

+ +

Utilitzar italics()

+ +

L'exemple següent utilitza mètodes string per canviar el format de la cadena:

+ +
var worldString = 'Hola, món'; console.log(worldString.blink());  // Hello, world
+console.log(worldString.bold());  // Hola, món
+console.log(worldString.italics()); //Hola, món
+console.log(worldString.strike());  // Hola, món
+ +

Especificacions

+ + + + + + + + + + + + + + +
EspecificacióEstatComentaris
{{SpecName('ES6', '#sec-string.prototype.italics', 'String.prototype.italics')}}{{Spec2('ES6')}}Definició inicial. Implemtat en JavaScript 1.0. Definit en l'Annex B (normative) per Caracerístiques Adiccionals d'ECMAScript per navegadors Web.
+ +

Compatibilitat amb navegadors

+ +
{{CompatibilityTable}}
+ +
+ + + + + + + + + + + + + + + + + + + +
CaracterísticaChromeFirefox (Gecko)Internet ExplorerOperaSafari
Suport bàsic{{CompatVersionUnknown}}{{CompatGeckoDesktop("1.0")}}{{CompatVersionUnknown}}{{CompatVersionUnknown}}{{CompatVersionUnknown}}
+
+ +
+ + + + + + + + + + + + + + + + + + + + + +
CaracterísticaAndroidChrome per AndroidFirefox Mobile (Gecko)IE MobileOpera MobileSafari Mobile
Suport bàsic{{CompatVersionUnknown}}{{CompatVersionUnknown}}{{CompatGeckoMobile("1.0")}}{{CompatVersionUnknown}}{{CompatVersionUnknown}}{{CompatVersionUnknown}}
+
+ +

Vegeu també

+ + diff --git a/files/ca/web/javascript/reference/global_objects/string/length/index.html b/files/ca/web/javascript/reference/global_objects/string/length/index.html new file mode 100644 index 0000000000..63a3114d2d --- /dev/null +++ b/files/ca/web/javascript/reference/global_objects/string/length/index.html @@ -0,0 +1,121 @@ +--- +title: String.length +slug: Web/JavaScript/Referencia/Objectes_globals/String/length +translation_of: Web/JavaScript/Reference/Global_Objects/String/length +--- +
{{JSRef("Global_Objects", "String")}}
+ +

Resum

+ +

La propietat length representa la longitud d'una cadena de caràcters.

+ +

Sintaxi

+ +
str.length
+ +

Descripció

+ +

Aquesta propietat retorna el nombre d'unitats de codi en un string. {{interwiki("wikipedia", "UTF-16")}}, el format de string utilitzar a JavaScript, utilitza un únic codi de 16 bits per a representar els caràcters més comuns, però necessita dos unitats de codi per a caràcters menys comuns, així que és possible que el valor retornat per length no encaixi amb el nombre de caràcters reals a la cadena de caràcters.

+ +

Per a una cadena buida, length és 0.

+ +

La propietat estàtica String.length retorna el valor 1.

+ +

Exemples

+ +

Exemple: Ús bàsic

+ +
var x = 'Mozilla';
+var empty = '';
+
+console.log('Mozilla té ' + x.length + ' unitats de codi');
+/* "Mozilla té 7 unitats de codi" */
+
+console.log('La string buida té una longitud de ' + empty.length);
+/* "La string buida té una longitud de 0" */
+
+ +

Especificacions

+ + + + + + + + + + + + + + + + + + + + + + + + +
EspecificacionsEstatComentaris
ECMAScript 1a Edició.StandardDefinició inicial. Implementat a JavaScript 1.0.
{{SpecName('ES5.1', '#sec-15.5.5.1', 'String.prototype.length')}}{{Spec2('ES5.1')}} 
{{SpecName('ES6', '#sec-properties-of-string-instances-length', 'String.prototype.length')}}{{Spec2('ES6')}} 
+ +

Compatibilitat amb navegadors

+ +
{{CompatibilityTable}}
+ +
+ + + + + + + + + + + + + + + + + + + +
CaracterísticaChromeFirefox (Gecko)Internet ExplorerOperaSafari
Suport bàsic{{CompatVersionUnknown}}{{CompatVersionUnknown}}{{CompatVersionUnknown}}{{CompatVersionUnknown}}{{CompatVersionUnknown}}
+
+ +
+ + + + + + + + + + + + + + + + + + + + + +
CaracterísticaAndroidChrome for AndroidFirefox Mobile (Gecko)IE MobileOpera MobileSafari Mobile
Suport bàsic{{CompatVersionUnknown}}{{CompatVersionUnknown}}{{CompatVersionUnknown}}{{CompatVersionUnknown}}{{CompatVersionUnknown}}{{CompatVersionUnknown}}
+
+ +

Vegeu també

+ + diff --git a/files/ca/web/javascript/reference/global_objects/string/link/index.html b/files/ca/web/javascript/reference/global_objects/string/link/index.html new file mode 100644 index 0000000000..efe1385ddc --- /dev/null +++ b/files/ca/web/javascript/reference/global_objects/string/link/index.html @@ -0,0 +1,119 @@ +--- +title: String.prototype.link() +slug: Web/JavaScript/Referencia/Objectes_globals/String/link +translation_of: Web/JavaScript/Reference/Global_Objects/String/link +--- +
{{JSRef}}
+ +

El mètode link() crea un element HTML {{HTMLElement("a")}} que causa que una cadena es mostri com un enllaç hipertext a una altra URL.

+ +

Sintaxi

+ +
str.link(url)
+ +

Paràmetres

+ +
+
url
+
Una cadena que especifica l'atribut href de l'etiqueta <a>: hauria de ser una URL vàlida (relativa o absoluta), amb qualsevols caràcters escapats & com &amp;, i qualsevol caràcter "  escapat com &quot;.
+
+ +

Descripció

+ +

Use the link() method to create an HTML snippet for a hypertext link. The returned string can then be added to the document via {{domxref("document.write()")}} or {{domxref("element.innerHTML")}}.

+ +

Links created with the link() method become elements in the links array of the document object. See {{domxref("document.links")}}.

+ +

Exemples

+ +

Utilitzar link()

+ +

L'exemple següent mostra la paraula "MDN" com a un enllaç hypertext lque retorna a l'usuari a la xarxa de Mozilla Developer.

+ +
var hotText = 'MDN';
+var URL = 'https://developer.mozilla.org/';
+
+console.log('Click to return to ' + hotText.link(URL));
+// Click to return to <a href="https://developer.mozilla.org/">MDN</a>
+
+ +

Especificacions

+ + + + + + + + + + + + + + +
EspecificacióEstatComentaris
{{SpecName('ES6', '#sec-string.prototype.link', 'String.prototype.link')}}{{Spec2('ES6')}}Definició inicial. Implementat en JavaScript 1.0. Definit en l'Annex B (normative) per Característiques Addiccionals d'ECMAScript per Navegadors Web.
+ +

Compatibilitat amb navegadors

+ +
{{CompatibilityTable}}
+ +
+ + + + + + + + + + + + + + + + + + + +
CaracterísticaChromeFirefox (Gecko)Internet ExplorerOperaSafari
Suport bàsic{{CompatVersionUnknown}}{{CompatGeckoDesktop("1.0")}}{{CompatVersionUnknown}}{{CompatVersionUnknown}}{{CompatVersionUnknown}}
+
+ +
+ + + + + + + + + + + + + + + + + + + + + +
CaracterísticaAndroidChrome per AndroidFirefox Mobile (Gecko)IE MobileOpera MobileSafari Mobile
Suport bàsic{{CompatVersionUnknown}}{{CompatVersionUnknown}}{{CompatGeckoMobile("1.0")}}{{CompatVersionUnknown}}{{CompatVersionUnknown}}{{CompatVersionUnknown}}
+
+ +

Notes específiques Gecko

+ + + +

Vegeu també

+ + diff --git a/files/ca/web/javascript/reference/global_objects/string/normalize/index.html b/files/ca/web/javascript/reference/global_objects/string/normalize/index.html new file mode 100644 index 0000000000..7a6bcef500 --- /dev/null +++ b/files/ca/web/javascript/reference/global_objects/string/normalize/index.html @@ -0,0 +1,154 @@ +--- +title: String.prototype.normalize() +slug: Web/JavaScript/Referencia/Objectes_globals/String/normalize +translation_of: Web/JavaScript/Reference/Global_Objects/String/normalize +--- +
{{JSRef}}
+ +

El mètode normalize() retorna la Forma Normalitzada en Unicode d'un string donat (si el valor passat no és un string, es convertirà a string primer).

+ +

Sintaxi

+ +
str.normalize([forma])
+ +

Paràmetres

+ +
+
forma
+
Una de les opcions "NFC", "NFD", "NFKC", o "NFKD", que determina quina Forma de Normalització Unicode es farà anar. Si s'omet o es passa {{jsxref("undefined")}} com a paràmetre, s'utilitzarà "NFC" per defecte. +
    +
  • NFC — Normalization Form Canonical Composition.
  • +
  • NFD — Normalization Form Canonical Decomposition.
  • +
  • NFKC — Normalization Form Compatibility Composition.
  • +
  • NFKD — Normalization Form Compatibility Decomposition.
  • +
+
+
+ +

Errors llençats

+ +
+
{{jsxref("RangeError")}}
+
Es llença un {{jsxref("RangeError")}} si forma no és un dels valors especificats adalt.
+
+ +

Descripció

+ +

El mètode normalize() retorna la Forma Normalitzada Unicode d'un string. No afecta el propi valor del string passat sino que en retorna un de nou.

+ +

Exemples

+ +

Utilitzar normalize()

+ +
// String inicial
+
+// U+1E9B: LLETRA S PETITA DEL LLATÍ AMB UN PUNT A SOBRE
+// U+0323: COMBINACIÓ AMB EL PUNT A SOTA
+var str = '\u1E9B\u0323';
+
+
+// Canonically-composed form (NFC)
+
+// U+1E9B: LLETRA S PETITA DEL LLATÍ AMB UN PUNT A SOBRE
+// U+0323: COMBINACIÓ AMB EL PUNT A SOTA
+str.normalize('NFC'); // '\u1E9B\u0323'
+str.normalize();      // el mateix que a sobre
+
+
+// Canonically-decomposed form (NFD)
+
+// U+017F: LLETRA S PETITA DEL LLATÍ AMB UN PUNT A SOBRE
+// U+0323: COMBINACIÓ AMB EL PUNT A SOTA
+// U+0307: COMBINACIÓ AMB EL PUNT A SOBRE
+str.normalize('NFD'); // '\u017F\u0323\u0307'
+
+
+// Compatibly-composed (NFKC)
+
+// U+1E69: LLETRA S PETITA DEL LLATÍ AMB UN PUNT A SOBRE
+str.normalize('NFKC'); // '\u1E69'
+
+
+// Compatibly-decomposed (NFKD)
+
+// U+0073: LLETRA S PETITA DEL LLATÍ
+// U+0323: COMBINACIÓ AMB EL PUNT A SOTA
+// U+0307: COMBINACIÓ AMB EL PUNT A SOBRE
+str.normalize('NFKD'); // '\u0073\u0323\u0307'
+
+ +

Especificacions

+ + + + + + + + + + + + + + +
EspecificacióEstatComentaris
{{SpecName('ES6', '#sec-string.prototype.normalize', 'String.prototype.normalize')}}{{Spec2('ES6')}}Definició inicial.
+ +

Compatibilitat amb navegadors

+ +
{{CompatibilityTable}}
+ +
+ + + + + + + + + + + + + + + + + + + +
CaracterísticaChromeFirefox (Gecko)Internet ExplorerOperaSafari
Suport bàsic{{CompatChrome("34")}}{{CompatGeckoDesktop("31")}}{{CompatIE("11")}}{{CompatVersionUnknown}}{{CompatNo}}
+
+ +
+ + + + + + + + + + + + + + + + + + + + + +
CaracterísticaAndroidChrome for AndroidFirefox Mobile (Gecko)IE MobileOpera MobileSafari Mobile
Suport bàsic{{CompatNo}}{{CompatChrome("34")}}{{CompatNo}}{{CompatNo}}{{CompatNo}}{{CompatNo}}
+
+ +

Vegeu també

+ + diff --git a/files/ca/web/javascript/reference/global_objects/string/small/index.html b/files/ca/web/javascript/reference/global_objects/string/small/index.html new file mode 100644 index 0000000000..761797bdda --- /dev/null +++ b/files/ca/web/javascript/reference/global_objects/string/small/index.html @@ -0,0 +1,110 @@ +--- +title: String.prototype.small() +slug: Web/JavaScript/Referencia/Objectes_globals/String/small +translation_of: Web/JavaScript/Reference/Global_Objects/String/small +--- +
{{JSRef}} {{deprecated_header}}
+ +

El mètode small() crea un element HTML {{HTMLElement("small")}} que causa que una cadena es mostri amb una font petita.

+ +

Sintaxi

+ +
str.small()
+ +

Descripció

+ +

El mètode small() incrusta una adena en una etiqueta <small>: "<small>str</small>".

+ +

Exemples

+ +

Utilitzar small()

+ +

L'exemple següent utilitza mètodes string per canviar la mida d'una cadena:

+ +
var worldString = 'Hola, món';
+
+console.log(worldString.small());     // <small>Hola, món</small>
+console.log(worldString.big());       // <big>Hola, món</big>
+console.log(worldString.fontsize(7)); // <font size="7">Hola, món</fontsize>
+
+ +

Amb l'objecte {{domxref("HTMLElement.style", "element.style")}} es pot obtenir l'atribut style  d'un element i manipular-lo més genèricament. Per exemple:

+ +
document.getElementById('yourElemId').style.fontSize = '0.7em';
+
+ +

Especificacions

+ + + + + + + + + + + + + + +
EspecificacióEstatComentaris
{{SpecName('ES6', '#sec-string.prototype.small', 'String.prototype.small')}}{{Spec2('ES6')}}Definició inicial. Implementat en JavaScript 1.0. Definit en l'Annex B (normative) per Característiques Addiccionals d'ECMAScript per Navegadors Web.
+ +

Compatibilitat amb navegadors

+ +
{{CompatibilityTable}}
+ +
+ + + + + + + + + + + + + + + + + + + +
CaracterísticaChromeFirefox (Gecko)Internet ExplorerOperaSafari
Suport bàsic{{CompatVersionUnknown}}{{CompatGeckoDesktop("1.0")}}{{CompatVersionUnknown}}{{CompatVersionUnknown}}{{CompatVersionUnknown}}
+
+ +
+ + + + + + + + + + + + + + + + + + + + + +
CaracterísticaAndroidChrome per AndroidFirefox Mobile (Gecko)IE MobileOpera MobileSafari Mobile
Suport bàsic{{CompatVersionUnknown}}{{CompatVersionUnknown}}{{CompatGeckoMobile("1.0")}}{{CompatVersionUnknown}}{{CompatVersionUnknown}}{{CompatVersionUnknown}}
+
+ +

Vegeu també

+ + diff --git a/files/ca/web/javascript/reference/global_objects/string/startswith/index.html b/files/ca/web/javascript/reference/global_objects/string/startswith/index.html new file mode 100644 index 0000000000..ca25398d51 --- /dev/null +++ b/files/ca/web/javascript/reference/global_objects/string/startswith/index.html @@ -0,0 +1,128 @@ +--- +title: String.prototype.startsWith() +slug: Web/JavaScript/Referencia/Objectes_globals/String/startsWith +translation_of: Web/JavaScript/Reference/Global_Objects/String/startsWith +--- +
{{JSRef}}
+ +

El mètode startsWith() determina si un string comença amb els caràcters d'un altre string, retornant true o false depenent d'això.

+ +

Sintaxi

+ +
str.startsWith(stringAcercar[, posició])
+ +

Paràmetres

+ +
+
stringAcercar
+
Els caràcters a cercar al començament d'aquest string.
+
posició
+
Opcional. La posició dins el string a la qual es començarà a cercar per a trobar stringAcercar; per defecte és 0.
+
+ +

Descripció

+ +

Aquest mètode us permet determinar si un string comença amb un altre string.

+ +

Exemples

+ +

Utilitzar startsWith()

+ +
var str = 'To be, or not to be, that is the question.';
+
+console.log(str.startsWith('To be'));         // true
+console.log(str.startsWith('not to be'));     // false
+console.log(str.startsWith('not to be', 10)); // true
+
+ +

Polyfill

+ +

Aquest mètode va ser afegit a l'especificació ECMAScript i pot no estar disponible encara a totes les implementacions de JavaScript. No obstant, la funció següent emula el comportament de String.prototype.startsWith():

+ +
if (!String.prototype.startsWith) {
+  String.prototype.startsWith = function(searchString, position) {
+    position = position || 0;
+    return this.indexOf(searchString, position) === position;
+  };
+}
+
+ +

Trobareu una funció Polyfill més robusta i optimitzada al GitHub de Mathias Bynens.

+ +

Especificacions

+ + + + + + + + + + + + + + +
EspecificacióEstatComentaris
{{SpecName('ES6', '#sec-string.prototype.startswith', 'String.prototype.startsWith')}}{{Spec2('ES6')}}Definició inicial.
+ +

Compatibilitat amb navegadors

+ +
{{CompatibilityTable}}
+ +
+ + + + + + + + + + + + + + + + + + + +
CaracterísticaChromeFirefox (Gecko)Internet ExplorerOperaSafari
Suport bàsic{{CompatChrome("41")}}{{CompatGeckoDesktop("17")}}{{CompatNo}}{{CompatChrome("41")}}{{CompatNo}}
+
+ +
+ + + + + + + + + + + + + + + + + + + + + +
CaracterísticaAndroidChrome for AndroidFirefox Mobile (Gecko)IE MobileOpera MobileSafari Mobile
Suport bàsic{{CompatNo}}{{CompatChrome("36")}}{{CompatGeckoMobile("17")}}{{CompatNo}}{{CompatNo}}{{CompatNo}}
+
+ +

Vegeu també

+ + diff --git a/files/ca/web/javascript/reference/global_objects/string/sub/index.html b/files/ca/web/javascript/reference/global_objects/string/sub/index.html new file mode 100644 index 0000000000..0b512d038e --- /dev/null +++ b/files/ca/web/javascript/reference/global_objects/string/sub/index.html @@ -0,0 +1,109 @@ +--- +title: String.prototype.sub() +slug: Web/JavaScript/Referencia/Objectes_globals/String/sub +translation_of: Web/JavaScript/Reference/Global_Objects/String/sub +--- +
{{JSRef}} {{deprecated_header}}
+ +

El mètode sub() crea un element HTML {{HTMLElement("sub")}} que fa que una cadena es mostri com a subíndex.

+ +

Sintaxi

+ +
str.sub()
+ +

Descripció

+ +

El mètode sub() incrusta una cadena a una etiqueta <sub>: "<sub>str</sub>".

+ +

Exemples

+ +

Utilitzar els mètodes sub() i sup()

+ +

El codi següent utiltza els mètodes sub() i {{jsxref("String.prototype.sup()", "sup()")}} per donar format a una cadena:

+ +
var superText="superíndex";
+var subText="subíndex";
+
+console.log("Així es com es veu un " + superText.sup());
+// Així es com es veu un <sup>superíndex</sup>.
+
+console.log("Així es com es veu un " + subText.sub());
+// Així es com es veu un <sub>subíndex</sub>.
+
+ +

Especificacions

+ + + + + + + + + + + + + + +
EspecificacióEstatComentaris
{{SpecName('ES6', '#sec-string.prototype.sub', 'String.prototype.sub')}}{{Spec2('ES6')}} +

Definició inicial. Implementat en JavaScript 1.0. Definit en l'Annex B (normative) per a Característiques Addicicionals d'ECMAScript per Navegadors Web.

+
+ +

Compatibilitat amb navegadors

+ +
{{CompatibilityTable}}
+ +
+ + + + + + + + + + + + + + + + + + + +
CaracterísticaChromeFirefox (Gecko)Internet ExplorerOperaSafari
Suport bàsic{{CompatVersionUnknown}}{{CompatGeckoDesktop("1.0")}}{{CompatVersionUnknown}}{{CompatVersionUnknown}}{{CompatVersionUnknown}}
+
+ +
+ + + + + + + + + + + + + + + + + + + + + +
CaracterísticaAndroidChrome per AndroidFirefox Mobile (Gecko)IE MobileOpera MobileSafari Mobile
Suport bàsic{{CompatVersionUnknown}}{{CompatVersionUnknown}}{{CompatGeckoMobile("1.0")}}{{CompatVersionUnknown}}{{CompatVersionUnknown}}{{CompatVersionUnknown}}
+
+ +

Vegeu també

+ + diff --git a/files/ca/web/javascript/reference/global_objects/string/substr/index.html b/files/ca/web/javascript/reference/global_objects/string/substr/index.html new file mode 100644 index 0000000000..5fdb1f03b4 --- /dev/null +++ b/files/ca/web/javascript/reference/global_objects/string/substr/index.html @@ -0,0 +1,156 @@ +--- +title: String.prototype.substr() +slug: Web/JavaScript/Referencia/Objectes_globals/String/substr +translation_of: Web/JavaScript/Reference/Global_Objects/String/substr +--- +
{{JSRef}}
+ +

El mètode substr() retorna els caràcters d'una cadena començant per la posició especificada fins al nombre especificat de caràcters.

+ +

Sintaxi

+ +
str.substr(començament[, llargària])
+ +

Paràmetres

+ +
+
començament
+
Lloc des d'on es comença a extraure els caràcters. Si es dóna un nombre negatiu, se'l tracta com strLength + començament on strLength és la llargària de al cadena (per exemple, si començament és -3 se'l tracta com strLength - 3.)
+
llargària
+
Opcional. El nombre de caràcter per extraure.
+
+ +

Descripció

+ +

començament is a character index. L'índex del primer caràcter és 0, i l'índex de l'últim caràcter és 1 menys que la llargària de la cadena. substr() comença extraient caràcters a començament i recull els caràcters llargària (llevat que primer s'arribi al final de la cadena, en aquest cas en retornaria menys).

+ +

Si començament és positivu i més gran o igual que la llargària de la cadena, substr() retornarà una cadena buida.

+ +

SI començament és negatiu, substr() l'utilitza com un índex de caràcter des del final de la cadena. Si començament és negatiu i  abs(comença,ent) és més gran que la llargària de la cadena, substr() utilitza 0 com a índex d'inici. Nota: El maneig de valors negatius de l'argument començament no està suportat per Microsoft JScript.

+ +

Si llargària és 0 o negatiu, substr() retorna una cadena buida. Si llargària s'omet, substr() extreu els caràcter fins al final de la cadena.

+ +

Exemples

+ +

Utilitzar substr()

+ +
var str = 'abcdefghij';
+
+console.log('(1, 2): '   + str.substr(1, 2));   // '(1, 2): bc'
+console.log('(-3, 2): '  + str.substr(-3, 2));  // '(-3, 2): hi'
+console.log('(-3): '     + str.substr(-3));     // '(-3): hij'
+console.log('(1): '      + str.substr(1));      // '(1): bcdefghij'
+console.log('(-20, 2): ' + str.substr(-20, 2)); // '(-20, 2): ab'
+console.log('(20, 2): '  + str.substr(20, 2));  // '(20, 2): '
+
+ +

Polyfill

+ +

Microsoft's JScript no suporta valors negatius per l'índex d'inici. Si desitjes utilitzar aquesta característica, pots utilitzar el codi de compatibilitat següent per evitar aquest error:

+ +
// només s'executa quan la funció substr() està trencada
+if ('ab'.substr(-1) != 'b') {
+  /**
+   *  Obtenir la subcadena d'una cadena
+   *  @param  {integer}  start   on comença la subcadena
+   *  @param  {integer}  length  quants caràcters s'han de retornar
+   *  @return {string}
+   */
+  String.prototype.substr = function(substr) {
+    return function(start, length) {
+      // crida el mètode original
+      return substr.call(this,
+      	// Si ens dóna un començament negatiu, calcular quant es des de l'inici de la cadena
+        // adjustar el paràmetre start per valor negatiu
+        start < 0 ? this.length + start : start,
+        length)
+    }
+  }(String.prototype.substr);
+}
+
+ +

Especificacions

+ + + + + + + + + + + + + + + + + + + + + + + + +
EspecificacióEstatComentaris
{{SpecName('ES3')}}{{Spec2('ES3')}}Definit en l'Annex B de Compatibilitat (informative). Implementat en JavaScript 1.0.
{{SpecName('ES5.1', '#sec-B.2.3', 'String.prototype.substr')}}{{Spec2('ES5.1')}}Definit en l'Annex B de Compatibilitat (informative)
{{SpecName('ES6', '#sec-string.prototype.substr', 'String.prototype.substr')}}{{Spec2('ES6')}}Definit en l'Annex B (normative) per Característiques addiccionals d'ECMAScript per Navegadors Web
+ +

Compatibilitat amb navegadors

+ +
{{CompatibilityTable}}
+ +
+ + + + + + + + + + + + + + + + + + + +
CaracterísticaChromeFirefox (Gecko)Internet ExplorerOperaSafari
Suport bàsic{{CompatVersionUnknown}}{{CompatVersionUnknown}}{{CompatVersionUnknown}}{{CompatVersionUnknown}}{{CompatVersionUnknown}}
+
+ +
+ + + + + + + + + + + + + + + + + + + + + +
CaracterísticaAndroidChrome per AndroidFirefox Mobile (Gecko)IE MobileOpera MobileSafari Mobile
Suport bàsic{{CompatVersionUnknown}}{{CompatVersionUnknown}}{{CompatVersionUnknown}}{{CompatVersionUnknown}}{{CompatVersionUnknown}}{{CompatVersionUnknown}}
+
+ +

Vegeu també

+ + diff --git a/files/ca/web/javascript/reference/global_objects/string/sup/index.html b/files/ca/web/javascript/reference/global_objects/string/sup/index.html new file mode 100644 index 0000000000..24b46c88ce --- /dev/null +++ b/files/ca/web/javascript/reference/global_objects/string/sup/index.html @@ -0,0 +1,107 @@ +--- +title: String.prototype.sup() +slug: Web/JavaScript/Referencia/Objectes_globals/String/sup +translation_of: Web/JavaScript/Reference/Global_Objects/String/sup +--- +
{{JSRef}} {{deprecated_header}}
+ +

El mètode sup() crea un element HTML {{HTMLElement("sup")}} que causa que la cadena es mostri com un superíndex.

+ +

Sintaxi

+ +
str.sup()
+ +

Descripció

+ +

El mètode sup() incrusta una cadena en l'etiqueta <sup>:"<sup>str</sup>".

+ +

Exemples

+ +

Utilitzar els mètodes sub() i sup()

+ +

L'exemple següent utilitza els mètodes {{jsxref("String.prototype.sub()", "sub()")}} i sup() per formatejar la cadena:

+ +
var superText = 'superíndex';
+var subText = 'subíndex';
+
+console.log('This is what a ' + superText.sup());
+// "Així es com es veu un <sup>superíndex</sup>."
+
+console.log('This is what a ' + subText.sub());
+// "Així es com es veu un <sub>subíndex</sub>."
+
+ +

Especificacions

+ + + + + + + + + + + + + + +
EspecificacióEstatComentaris
{{SpecName('ES6', '#sec-string.prototype.sup', 'String.prototype.sup')}}{{Spec2('ES6')}}Definició inicial. Implementat en JavaScript 1.0. Definit en l'Annex B (normative) per a Característiques Addicicionals d'ECMAScript per Navegadors Web.
+ +

Compatibilitat amb navegadors

+ +
{{CompatibilityTable}}
+ +
+ + + + + + + + + + + + + + + + + + + +
CaracterísticaChromeFirefox (Gecko)Internet ExplorerOperaSafari
Suport bàsic{{CompatVersionUnknown}}{{CompatGeckoDesktop("1.0")}}{{CompatVersionUnknown}}{{CompatVersionUnknown}}{{CompatVersionUnknown}}
+
+ +
+ + + + + + + + + + + + + + + + + + + + + +
CaracterísticaAndroidChrome per AndroidFirefox Mobile (Gecko)IE MobileOpera MobileSafari Mobile
Suport bàsic{{CompatVersionUnknown}}{{CompatVersionUnknown}}{{CompatGeckoMobile("1.0")}}{{CompatVersionUnknown}}{{CompatVersionUnknown}}{{CompatVersionUnknown}}
+
+ +

Vegeu també

+ + diff --git a/files/ca/web/javascript/reference/global_objects/string/tolocalelowercase/index.html b/files/ca/web/javascript/reference/global_objects/string/tolocalelowercase/index.html new file mode 100644 index 0000000000..c138197bc1 --- /dev/null +++ b/files/ca/web/javascript/reference/global_objects/string/tolocalelowercase/index.html @@ -0,0 +1,110 @@ +--- +title: String.prototype.toLocaleLowerCase() +slug: Web/JavaScript/Referencia/Objectes_globals/String/toLocaleLowerCase +translation_of: Web/JavaScript/Reference/Global_Objects/String/toLocaleLowerCase +--- +
{{JSRef}}
+ +

El mètode toLocaleLowerCase() retorna el valor del string que fa la crida convertit a minúscules , tot seguint les directrius locals específiques de conversió a minúscules.

+ +

Sintaxi

+ +
str.toLocaleLowerCase()
+ +

Descripció

+ +

El mètode toLocaleLowerCase() retorna el valor del string que fa la crida convertit a minúscules , tot seguint les directrius locals específiques de conversió a minúscules.El mètode toLocaleLowerCase() retorna el valor del string que fa la crida convertit a minúscules , tot seguint les directrius locals específiques de conversió a minúscules. En la majoria dels casos, la crida a aquest mètode produirà un resultat similar a la del mètode {{jsxref("String.prototype.toLowerCase()", "toLowerCase()")}}, però per a algunes localitzacions, com ara el Turc, en les quals el pas de majúscules a minúscules o de minúscules a majúscules no segueix les assignacions per defecte del Unicode, el resultat pot diferir.

+ +

Exemples

+ +

Utilitzar toLocaleLowerCase()

+ +
console.log('ALFABET'.toLocaleLowerCase()); // 'alfabet'
+
+ +

Especifications

+ + + + + + + + + + + + + + + + + + + + + + + + +
EspecificacióEstatComentaris
{{SpecName('ES3')}}{{Spec2('ES3')}}Definició inicial. Implementat a JavaScript 1.2.
{{SpecName('ES5.1', '#sec-15.5.4.17', 'String.prototype.toLocaleLowerCase')}}{{Spec2('ES5.1')}} 
{{SpecName('ES6', '#sec-string.prototype.tolocalelowercase', 'String.prototype.toLocaleLowerCase')}}{{Spec2('ES6')}} 
+ +

Compatibilitat amb navegadors

+ +
{{CompatibilityTable}}
+ +
+ + + + + + + + + + + + + + + + + + + +
CaracterísticaChromeFirefox (Gecko)Internet ExplorerOperaSafari
Suport bàsic{{CompatVersionUnknown}}{{CompatVersionUnknown}}{{CompatVersionUnknown}}{{CompatVersionUnknown}}{{CompatVersionUnknown}}
+
+ +
+ + + + + + + + + + + + + + + + + + + + + +
CaracterísticaAndroidChrome for AndroidFirefox Mobile (Gecko)IE MobileOpera MobileSafari Mobile
Suport bàsic{{CompatVersionUnknown}}{{CompatVersionUnknown}}{{CompatVersionUnknown}}{{CompatVersionUnknown}}{{CompatVersionUnknown}}{{CompatVersionUnknown}}
+
+ +

Vegeu també

+ + diff --git a/files/ca/web/javascript/reference/global_objects/string/tolocaleuppercase/index.html b/files/ca/web/javascript/reference/global_objects/string/tolocaleuppercase/index.html new file mode 100644 index 0000000000..8f7b2aa716 --- /dev/null +++ b/files/ca/web/javascript/reference/global_objects/string/tolocaleuppercase/index.html @@ -0,0 +1,110 @@ +--- +title: String.prototype.toLocaleUpperCase() +slug: Web/JavaScript/Referencia/Objectes_globals/String/toLocaleUpperCase +translation_of: Web/JavaScript/Reference/Global_Objects/String/toLocaleUpperCase +--- +
{{JSRef}}
+ +

El mètode toLocaleUpperCase() retorna el valor del string que fa la crida convertit a majúscules, tot seguint les directrius locals específiques de conversió a majúscules.

+ +

Sintaxi

+ +
str.toLocaleUpperCase()
+ +

Descripció

+ +

El mètode toLocaleUpperCase() retorna el valor del string que fa la crida convertit a majúscules, tot seguint les directrius locals específiques de conversió a majúscules. toLocaleUpperCase() no afecta el valor del string que fa la crida sino que en retorna un de nou. En la majoria dels casos, la crida a aquest mètode produirà un resultat similar a la del mètode {{jsxref("String.prototype.toUpperCase()", "toUpperCase()")}}, però per a algunes localitzacions, com ara el Turc, en les quals el pas de majúscules a minúscules o de minúscules a majúscules no segueix les assignacions per defecte del Unicode, el resultat pot diferir.

+ +

Exemples

+ +

Utilitzar toLocaleUpperCase()

+ +
console.log('alfabet'.toLocaleUpperCase()); // 'ALFABET'
+
+ +

Especificacions

+ + + + + + + + + + + + + + + + + + + + + + + + +
EspecificacióEstatComentaris
{{SpecName('ES3')}}{{Spec2('ES3')}}Definició inicial. Implementat a JavaScript 1.2.
{{SpecName('ES5.1', '#sec-15.5.4.19', 'String.prototype.toLocaleUpperCase')}}{{Spec2('ES5.1')}} 
{{SpecName('ES6', '#sec-string.prototype.tolocaleuppercase', 'String.prototype.toLocaleUpperCase')}}{{Spec2('ES6')}} 
+ +

Compatibilitat amb navegadors

+ +
{{CompatibilityTable}}
+ +
+ + + + + + + + + + + + + + + + + + + +
CaracterísticaChromeFirefox (Gecko)Internet ExplorerOperaSafari
Suport bàsic{{CompatVersionUnknown}}{{CompatVersionUnknown}}{{CompatVersionUnknown}}{{CompatVersionUnknown}}{{CompatVersionUnknown}}
+
+ +
+ + + + + + + + + + + + + + + + + + + + + +
CaracterísticaAndroidChrome for AndroidFirefox Mobile (Gecko)IE MobileOpera MobileSafari Mobile
Suport bàsic{{CompatVersionUnknown}}{{CompatVersionUnknown}}{{CompatVersionUnknown}}{{CompatVersionUnknown}}{{CompatVersionUnknown}}{{CompatVersionUnknown}}
+
+ +

Vegeu també

+ + diff --git a/files/ca/web/javascript/reference/global_objects/string/tolowercase/index.html b/files/ca/web/javascript/reference/global_objects/string/tolowercase/index.html new file mode 100644 index 0000000000..7147d0ea0d --- /dev/null +++ b/files/ca/web/javascript/reference/global_objects/string/tolowercase/index.html @@ -0,0 +1,111 @@ +--- +title: String.prototype.toLowerCase() +slug: Web/JavaScript/Referencia/Objectes_globals/String/toLowerCase +translation_of: Web/JavaScript/Reference/Global_Objects/String/toLowerCase +--- +
{{JSRef}}
+ +

El mètode toLowerCase() retorna  el valor del string que fa la crida convertit a majúscules.
+  

+ +

Sintaxi

+ +
str.toLowerCase()
+ +

Descripció

+ +

El mètode toLowerCase() retorna  el valor del string que fa la crida convertit a majúscules. toLowerCase() no afecta el valor del string que fa la crida sino que en retorna un de nou.

+ +

Exemples

+ +

Utilitzar toLowerCase()

+ +
console.log('ALFABET'.toLowerCase()); // 'alfabet'
+
+ +

Especificacions

+ + + + + + + + + + + + + + + + + + + + + + + + +
EspecificacionsEstatComentaris
{{SpecName('ES1')}}{{Spec2('ES1')}}Definició inicial. Implementat a JavaScript 1.0.
{{SpecName('ES5.1', '#sec-15.5.4.16', 'String.prototype.toLowerCase')}}{{Spec2('ES5.1')}} 
{{SpecName('ES6', '#sec-string.prototype.tolowercase', 'String.prototype.toLowerCase')}}{{Spec2('ES6')}} 
+ +

Compatibilitat amb navegadors

+ +
{{CompatibilityTable}}
+ +
+ + + + + + + + + + + + + + + + + + + +
CaracterísticaChromeFirefox (Gecko)Internet ExplorerOperaSafari
Suport bàsic{{CompatVersionUnknown}}{{CompatVersionUnknown}}{{CompatVersionUnknown}}{{CompatVersionUnknown}}{{CompatVersionUnknown}}
+
+ +
+ + + + + + + + + + + + + + + + + + + + + +
CaracterísticaAndroidChrome for AndroidFirefox Mobile (Gecko)IE MobileOpera MobileSafari Mobile
Suport bàsic{{CompatVersionUnknown}}{{CompatVersionUnknown}}{{CompatVersionUnknown}}{{CompatVersionUnknown}}{{CompatVersionUnknown}}{{CompatVersionUnknown}}
+
+ +

Vegeu també

+ + diff --git a/files/ca/web/javascript/reference/global_objects/string/tostring/index.html b/files/ca/web/javascript/reference/global_objects/string/tostring/index.html new file mode 100644 index 0000000000..11f2555a2f --- /dev/null +++ b/files/ca/web/javascript/reference/global_objects/string/tostring/index.html @@ -0,0 +1,113 @@ +--- +title: String.prototype.toString() +slug: Web/JavaScript/Referencia/Objectes_globals/String/toString +translation_of: Web/JavaScript/Reference/Global_Objects/String/toString +--- +
{{JSRef}}
+ +

El mètode toString() retorna un string que representa l'objecte especificat.

+ +

Sintaxi

+ +
str.toString()
+ +

Descripció

+ +

L'objecte {{jsxref("String")}} sobreescriu el mètode toString() de l'objecte {{jsxref("Object")}}; no hereta {{jsxref("Object.prototype.toString()")}}. Per a objectes {{jsxref("String")}}, el mètode toString() retorna un string que representa l'objecte i és el mateix que el que el retornat pel mètode {{jsxref("String.prototype.valueOf()")}}.

+ +

Exemples

+ +

Utilitzar toString()

+ +

L'exemple següent mostra el valor d'un objecte {{jsxref("String")}}:

+ +
var x = new String('Hello world');
+
+console.log(x.toString()); // mostra 'Hello world'
+
+ +

Especificacions

+ + + + + + + + + + + + + + + + + + + + + + + + +
EspecificacióEstatComentaris
{{SpecName('ES3')}}{{Spec2('ES3')}}Definició inicial. Implementat a JavaScript 1.1.
{{SpecName('ES5.1', '#sec-15.5.4.2', 'String.prototype.toString')}}{{Spec2('ES5.1')}} 
{{SpecName('ES6', '#sec-string.prototype.tostring', 'String.prototype.toString')}}{{Spec2('ES6')}} 
+ +

Compatibilitat amb navegadors

+ +
{{CompatibilityTable}}
+ +
+ + + + + + + + + + + + + + + + + + + +
CaracterísticaChromeFirefox (Gecko)Internet ExplorerOperaSafari
Suport bàsic{{CompatVersionUnknown}}{{CompatVersionUnknown}}{{CompatVersionUnknown}}{{CompatVersionUnknown}}{{CompatVersionUnknown}}
+
+ +
+ + + + + + + + + + + + + + + + + + + + + +
CaracterísticaAndroidChrome for AndroidFirefox Mobile (Gecko)IE MobileOpera MobileSafari Mobile
Suport bàsic{{CompatVersionUnknown}}{{CompatVersionUnknown}}{{CompatVersionUnknown}}{{CompatVersionUnknown}}{{CompatVersionUnknown}}{{CompatVersionUnknown}}
+
+ +

Vegeu també

+ + diff --git a/files/ca/web/javascript/reference/global_objects/string/touppercase/index.html b/files/ca/web/javascript/reference/global_objects/string/touppercase/index.html new file mode 100644 index 0000000000..2a3b4fe56a --- /dev/null +++ b/files/ca/web/javascript/reference/global_objects/string/touppercase/index.html @@ -0,0 +1,110 @@ +--- +title: String.prototype.toUpperCase() +slug: Web/JavaScript/Referencia/Objectes_globals/String/toUpperCase +translation_of: Web/JavaScript/Reference/Global_Objects/String/toUpperCase +--- +
{{JSRef}}
+ +

El mètode toUpperCase() retorna  el valor del string que fa la crida convertit a majúscules.

+ +

Sintaxi

+ +
str.toUpperCase()
+ +

Descripció

+ +

El mètode toUpperCase() retorna  el valor del string que fa la crida convertit a majúscules. toUpperCase() no afecta el valor del string que fa la crida sino que en retorna un de nou.

+ +

Exemples

+ +

Utilitzar toUpperCase()

+ +
console.log('alfabet'.toUpperCase()); // 'ALFABET'
+
+ +

Especificacions

+ + + + + + + + + + + + + + + + + + + + + + + + +
EspecificacióEstatComentaris
{{SpecName('ES1')}}{{Spec2('ES1')}}Definició inicial. Implementat a JavaScript 1.0.
{{SpecName('ES5.1', '#sec-15.5.4.18', 'String.prototype.toUpperCase')}}{{Spec2('ES5.1')}} 
{{SpecName('ES6', '#sec-string.prototype.touppercase', 'String.prototype.toUpperCase')}}{{Spec2('ES6')}} 
+ +

Compatibilitat amb navegadors

+ +
{{CompatibilityTable}}
+ +
+ + + + + + + + + + + + + + + + + + + +
CaracterísticaChromeFirefox (Gecko)Internet ExplorerOperaSafari
Suport bàsic{{CompatVersionUnknown}}{{CompatVersionUnknown}}{{CompatVersionUnknown}}{{CompatVersionUnknown}}{{CompatVersionUnknown}}
+
+ +
+ + + + + + + + + + + + + + + + + + + + + +
CaracterísticaAndroidChrome for AndroidFirefox Mobile (Gecko)IE MobileOpera MobileSafari Mobile
Suport bàsic{{CompatVersionUnknown}}{{CompatVersionUnknown}}{{CompatVersionUnknown}}{{CompatVersionUnknown}}{{CompatVersionUnknown}}{{CompatVersionUnknown}}
+
+ +

Vegeu també

+ + diff --git a/files/ca/web/javascript/reference/global_objects/string/trim/index.html b/files/ca/web/javascript/reference/global_objects/string/trim/index.html new file mode 100644 index 0000000000..2dd955ea62 --- /dev/null +++ b/files/ca/web/javascript/reference/global_objects/string/trim/index.html @@ -0,0 +1,123 @@ +--- +title: String.prototype.trim() +slug: Web/JavaScript/Referencia/Objectes_globals/String/Trim +translation_of: Web/JavaScript/Reference/Global_Objects/String/Trim +--- +
{{JSRef}}
+ +

El mètode trim() elimina els espais en blanc tant a l'inici com al final del string. En aquest contexte, s'entèn com a espais en blanc tots les caràcters que no imprimeixin res (espai, tabulador, espai sense salt de línia, etcètera) així com tots els caràcters terminadors de línia (LF, CR, etc.).

+ +

Sintaxi

+ +
str.trim()
+ +

Descripció

+ +

El mètode trim() retorna un string sense espais en blanc tant a l'inici com al final. trim() no afecta el valor del string ja que en retorna un de nou.

+ +

Exemples

+ +

Utilitzar trim()

+ +

L'exemple següent mostra el string 'foo':

+ +
var orig = '   foo  ';
+console.log(orig.trim()); // 'foo'
+
+// Un altre exemple de .trim() eliminant espais en blanc només d'un cantó.
+
+var orig = 'foo    ';
+console.log(orig.trim()); // 'foo'
+
+ +

Polyfill

+ +

Executar el codi que es mostra a continuació abans d'executar cap altre codi crearà la funció trim() si aquesta no està disponible de forma nativa.

+ +
if (!String.prototype.trim) {
+  String.prototype.trim = function () {
+    return this.replace(/^[\s\uFEFF\xA0]+|[\s\uFEFF\xA0]+$/g, '');
+  };
+}
+
+ +

Especificacions

+ + + + + + + + + + + + + + + + + + + +
EspecificacióEstatComentaris
{{SpecName('ES5.1', '#sec-15.5.4.20', 'String.prototype.trim')}}{{Spec2('ES5.1')}}Definició inicial. Implementat a JavaScript 1.8.1.
{{SpecName('ES6', '#sec-string.prototype.trim', 'String.prototype.trim')}}{{Spec2('ES6')}} 
+ +

Compatibilitat amb navegadors

+ +
{{CompatibilityTable}}
+ +
+ + + + + + + + + + + + + + + + + + + +
CaracterísticaChromeFirefox (Gecko)Internet ExplorerOperaSafari
Suport bàsic{{CompatVersionUnknown}}{{CompatGeckoDesktop("1.9.1")}}{{CompatIE("9")}}{{CompatOpera("10.5")}}{{CompatSafari("5")}}
+
+ +
+ + + + + + + + + + + + + + + + + + + + + +
CaracterísticaAndroidChrome for AndroidFirefox Mobile (Gecko)IE MobileOpera MobileSafari Mobile
Suport bàsic{{CompatVersionUnknown}}{{CompatVersionUnknown}}{{CompatVersionUnknown}}{{CompatVersionUnknown}}{{CompatVersionUnknown}}{{CompatVersionUnknown}}
+
+ +

Vegeu també

+ + diff --git a/files/ca/web/javascript/reference/global_objects/string/trimend/index.html b/files/ca/web/javascript/reference/global_objects/string/trimend/index.html new file mode 100644 index 0000000000..41ab89e3ca --- /dev/null +++ b/files/ca/web/javascript/reference/global_objects/string/trimend/index.html @@ -0,0 +1,94 @@ +--- +title: String.prototype.trimRight() +slug: Web/JavaScript/Referencia/Objectes_globals/String/TrimRight +translation_of: Web/JavaScript/Reference/Global_Objects/String/trimEnd +--- +
{{JSRef}} {{non-standard_header}}
+ +

El mètode trimRight() elimina els espais en blanc al final d'un string.

+ +

Sintaxi

+ +
str.trimRight()
+ +

Descripció

+ +

El mètode trimRight() retorna el string sense espais en blanc al final del mateix. trimRight() no afecta el valor del string sino que en retorna un de nou.

+ +

Exemples

+ +

Utilitzar trimRight()

+ +

L'exemple següent mostra el string ' foo':

+ +
var str = '   foo  ';
+
+console.log(str.length); // 8
+
+str = str.trimRight();
+console.log(str.length); // 5
+console.log(str);        // '   foo'
+
+ +

Especificacions

+ +

No forma part de cap standard. Implementat a JavaScript 1.8.1.

+ +

Browser compatibility

+ +
{{CompatibilityTable}}
+ +
+ + + + + + + + + + + + + + + + + + + +
CaracterísticaChromeFirefox (Gecko)Internet ExplorerOperaSafari
Suport bàsic{{CompatVersionUnknown}}{{CompatGeckoDesktop("1.9.1")}}{{CompatNo}}{{CompatUnknown}}{{CompatUnknown}}
+
+ +
+ + + + + + + + + + + + + + + + + + + + + +
CaracterísticaAndroidChrome for AndroidFirefox Mobile (Gecko)IE MobileOpera MobileSafari Mobile
Suport bàsic{{CompatUnknown}}{{CompatUnknown}}{{CompatVersionUnknown}}{{CompatUnknown}}{{CompatUnknown}}{{CompatUnknown}}
+
+ +

Vegeu també

+ + diff --git a/files/ca/web/javascript/reference/global_objects/string/trimstart/index.html b/files/ca/web/javascript/reference/global_objects/string/trimstart/index.html new file mode 100644 index 0000000000..f16a5b89fa --- /dev/null +++ b/files/ca/web/javascript/reference/global_objects/string/trimstart/index.html @@ -0,0 +1,94 @@ +--- +title: String.prototype.trimLeft() +slug: Web/JavaScript/Referencia/Objectes_globals/String/TrimLeft +translation_of: Web/JavaScript/Reference/Global_Objects/String/trimStart +--- +
{{JSRef}} {{non-standard_header}}
+ +

El mètode trimLeft() elimina els espais en blanc a l'esquerra del string.

+ +

Sintaxi

+ +
str.trimLeft()
+ +

Descripció

+ +

El mètode trimLeft() retorna un string on els espais en blanc del començament s'han eliminat. trimLeft() no afecta al valor mateix del string sino que en retorna un de nou.

+ +

Exemples

+ +

Utilitzar trimLeft()

+ +

L'exemple següent mostra el string 'foo ':

+ +
var str = '   foo  ';
+
+console.log(str.length); // 8
+
+str = str.trimLeft();
+console.log(str.length); // 5
+console.log(str);        // 'foo  '
+
+ +

Especificacions

+ +

No és part de cap standard. Implementat a JavaScript 1.8.1.

+ +

Compatibilitat amb navegadors

+ +
{{CompatibilityTable}}
+ +
+ + + + + + + + + + + + + + + + + + + +
CaracterísticaChromeFirefox (Gecko)Internet ExplorerOperaSafari
Suport bàsic{{CompatVersionUnknown}}{{CompatGeckoDesktop("1.9.1")}}{{CompatNo}}{{CompatUnknown}}{{CompatUnknown}}
+
+ +
+ + + + + + + + + + + + + + + + + + + + + +
CaracterísticaAndroidChrome for AndroidFirefox Mobile (Gecko)IE MobileOpera MobileSafari Mobile
Suport bàsic{{CompatUnknown}}{{CompatUnknown}}{{CompatVersionUnknown}}{{CompatUnknown}}{{CompatUnknown}}{{CompatUnknown}}
+
+ +

Vegeu també

+ + diff --git a/files/ca/web/javascript/reference/global_objects/syntaxerror/index.html b/files/ca/web/javascript/reference/global_objects/syntaxerror/index.html new file mode 100644 index 0000000000..2ad16e006f --- /dev/null +++ b/files/ca/web/javascript/reference/global_objects/syntaxerror/index.html @@ -0,0 +1,166 @@ +--- +title: SyntaxError +slug: Web/JavaScript/Referencia/Objectes_globals/SyntaxError +translation_of: Web/JavaScript/Reference/Global_Objects/SyntaxError +--- +
{{JSRef}}
+ +

L'objecte SyntaxError representa un error quan s'intenta interpretar un codi sintàcticament no vàlid.

+ +

Descripció

+ +

Es llança un SyntaxError quan el motor JavaScript es troba amb tokens o un token que no s'adequa a la sintaxi del llenguatge quan s'interpreta el codi.

+ +

Sintaxi

+ +
new SyntaxError([missatge[, nomFitxer[, numeroLinia]]])
+ +

Paràmetres

+ +
+
missatge
+
Opcional. Descripció llegible per humans de l'error
+
nomFitxer {{non-standard_inline}}
+
Opcional. El nom del fitxer que conté el codi que causa l'excepció
+
numeroLinia {{non-standard_inline}}
+
Opcional. El número de linia del codi que causa l'excepció
+
+ +

Propietats

+ +
+
{{jsxref("SyntaxError.prototype")}}
+
Permet l'addició de propietats a un objecte SyntaxError.
+
+ +

Mètodes

+ +

El SyntaxError global no conté cap mètode en si mateix, tanmateix, sí que hereta alguns mètodes a través de la cadena prototipus.

+ +

instànces de SyntaxError

+ +

Propietats

+ +
{{page('/en-US/docs/Web/JavaScript/Reference/Global_Objects/SyntaxError/prototype', 'Properties')}}
+ +

Mètodes

+ +
{{page('/en-US/docs/Web/JavaScript/Reference/Global_Objects/SyntaxError/prototype', 'Methods')}}
+ +

Exemples

+ +

Capturar un SyntaxError

+ +
try {
+  eval('hoo bar');
+} catch (e) {
+  console.log(e instanceof SyntaxError); // true
+  console.log(e.message);                // "missing ; before statement"
+  console.log(e.name);                   // "SyntaxError"
+  console.log(e.fileName);               // "Scratchpad/1"
+  console.log(e.lineNumber);             // 1
+  console.log(e.columnNumber);           // 4
+  console.log(e.stack);                  // "@Scratchpad/1:2:3\n"
+}
+
+ +

Crear un SyntaxError

+ +
try {
+  throw new SyntaxError('Hello', 'someFile.js', 10);
+} catch (e) {
+  console.log(e instanceof SyntaxError); // true
+  console.log(e.message);                // "Hello"
+  console.log(e.name);                   // "SyntaxError"
+  console.log(e.fileName);               // "someFile.js"
+  console.log(e.lineNumber);             // 10
+  console.log(e.columnNumber);           // 0
+  console.log(e.stack);                  // "@Scratchpad/2:11:9\n"
+}
+
+ +

Especificacions

+ + + + + + + + + + + + + + + + + + + + + + + + +
EspecificacióEstatComentaris
{{SpecName('ES3')}}{{Spec2('ES3')}}Definició inicial.
{{SpecName('ES5.1', '#sec-15.11.6.4', 'SyntaxError')}}{{Spec2('ES5.1')}} 
{{SpecName('ES6', '#sec-native-error-types-used-in-this-standard-syntaxerror', 'SyntaxError')}}{{Spec2('ES6')}} 
+ +

Compatibilitat amb navegadors

+ +
{{CompatibilityTable}}
+ +
+ + + + + + + + + + + + + + + + + + + +
CaracterísticaChromeFirefox (Gecko)Internet ExplorerOperaSafari
Suport bàsic{{CompatVersionUnknown}}{{CompatVersionUnknown}}{{CompatVersionUnknown}}{{CompatVersionUnknown}}{{CompatVersionUnknown}}
+
+ +
+ + + + + + + + + + + + + + + + + + + + + +
CaracterísticaAndroidChrome per AndroidFirefox Mobile (Gecko)IE MobileOpera MobileSafari Mobile
Suport bàsic{{CompatVersionUnknown}}{{CompatVersionUnknown}}{{CompatVersionUnknown}}{{CompatVersionUnknown}}{{CompatVersionUnknown}}{{CompatVersionUnknown}}
+
+ +

Vegeu també

+ + diff --git a/files/ca/web/javascript/reference/global_objects/undefined/index.html b/files/ca/web/javascript/reference/global_objects/undefined/index.html new file mode 100644 index 0000000000..3dd30fbefe --- /dev/null +++ b/files/ca/web/javascript/reference/global_objects/undefined/index.html @@ -0,0 +1,174 @@ +--- +title: undefined +slug: Web/JavaScript/Referencia/Objectes_globals/undefined +translation_of: Web/JavaScript/Reference/Global_Objects/undefined +--- +
+
+
{{jsSidebar("Objects")}}
+
+
+ +

Resum

+ +

El valor de la propietat global undefined representa el valor undefined. És un dels {{Glossary("Primitive", "tipus primitius")}} de JavaScript.

+ +

{{js_property_attributes(0,0,0)}}

+ +

Sintaxi

+ +
undefined
+ +

Descripció

+ +

undefined és una propietat de l'objecte global, és a dir, és una variable dins l'àmbit global.

+ +

Als navegadors moderns (JavaScript 1.8.5 / Firefox 4+), undefined és una propietat no configurable i que no pot ser escrita, tal com denota la especificació ECMAScript 5. Encara que no sigui el cas, és convenient evitar sobreescriure el seu valor.

+ +

Una variable a la que no s'ha assignat cap valor  és de tipus undefined. Un mètode o sentència retornarà undefined si la variable que s'evalua no te assignat cap valor. Una funció retornarà undefined si no es {{jsxref("Statements/return", "retorna")}} un valor explícitament.

+ +

Degut a que undefined no és una {{jsxref("Reserved_Words", "paraula reservada")}} es pot emprar com a identificador (nom de variable) a qualsvol àmbit que no sigui el global.

+ +
// mostra "foo string"
+(function(){ var undefined = 'foo'; console.log(undefined, typeof undefined); })();
+
+// mostra "foo string"
+(function(undefined){ console.log(undefined, typeof undefined); })('foo');
+
+ +

Exemples

+ +

Igualtat estricta i undefined

+ +

Es pot emprar undefined en combinació amb els operadors de igualtat i no-igualtat per determinar si una variable té assignat un valor.

+ +
var x;
+if (x === undefined) {
+   // sentències que s'executaran
+}
+else {
+   // sentències que no s'executaran
+}
+
+ +
Nota: En aquest cas s'ha de fer servir l'operador d'igualtat estricta (===) en comptes de l'operador standard d'igualtat (==) ja que x == undefined també comprova si x és null, mentre que l'operador d'igualtat estricta no ho fa. null no és equivalent a undefined. Per més detalls vegeu {{jsxref("Operators/Comparison_Operators", "comparació d'operadors")}}.
+ +

L'operador Typeof i undefined

+ +

De forma alternativa, es pot emprar {{jsxref("Operators/typeof", "typeof")}}:

+ +
var x;
+if (typeof x === 'undefined') {
+   // sentències que s'executaran
+}
+
+ +

Una raó per utilitzar {{jsxref("Operators/typeof", "typeof")}} és que no provoca un error si la variable no ha estat definida prèviament.

+ +
// x no ha estat prèviament definida
+if (typeof x === 'undefined') { // s'evalua a true sense errors
+   // sentències que s'executaran
+}
+
+if(x === undefined){ // llença ReferenceError
+
+}
+
+ +

De totes formes és recomanable evitar l'ús d'aquest tipus de tècniques. JavaScript és un llenguatge amb àmbits estàtics, de manera que per saber si una variable ha estat definida prèviament n'hi ha prou amb comprovar si ha estat definida dins l'àmbit immediat. L'única excepció és l'àmbit global. Aquest, però, està vinculat a l'objecte global, per la qual cosa comprovar si una variable existeix dins l'àmbit global és equivalent a comprovar l'existència d'una propietat dins l'objecte global (emprant l'operador {{jsxref("Operators/in", "in")}}, per exemple).

+ +

L'operador Void i undefined

+ +

L'operador {{jsxref("Operators/void", "void")}} és una altra alternativa.

+ +
var x;
+if (x === void 0) {
+   // sentències que s'executaran
+}
+
+// y no ha estat definida prèviament
+if (y === void 0) {
+   // llença ReferenceError (en oposició a `typeof`)
+}
+
+ +

Especificacions

+ + + + + + + + + + + + + + + + + + + + + + + + +
EspecificacióEstatComentaris
ECMAScript 1st Edition.StandardDefinició inicial. Impementat a JavaScript 1.3
{{SpecName('ES5.1', '#sec-15.1.1.3', 'undefined')}}{{Spec2('ES5.1')}} 
{{SpecName('ES6', '#sec-undefined', 'undefined')}}{{Spec2('ES6')}} 
+ +

Compatibilitat amb navegadors

+ +

{{ CompatibilityTable() }}

+ +
+ + + + + + + + + + + + + + + + + + + +
CaracterísticaChromeFirefox (Gecko)Internet ExplorerOperaSafari
Suport bàsic{{ CompatVersionUnknown() }}{{ CompatVersionUnknown() }}{{ CompatVersionUnknown() }}{{ CompatVersionUnknown() }}{{ CompatVersionUnknown() }}
+
+ +
+ + + + + + + + + + + + + + + + + + + + + +
CaracterísticaAndroidChrome for AndroidFirefox Mobile (Gecko)IE MobileOpera MobileSafari Mobile
Suport bàsic{{ CompatVersionUnknown() }}{{ CompatVersionUnknown() }}{{ CompatVersionUnknown() }}{{ CompatVersionUnknown() }}{{ CompatVersionUnknown() }}{{ CompatVersionUnknown() }}
+
+ +

 

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 ---- -
{{JSRef}}
- -

La propietat WeakMap.prototype representa el prototip pel constructor {{jsxref("WeakMap")}}.

- -
{{js_property_attributes(0,0,0)}}
- -

Descripció

- -

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 WeakMap.

- -

WeakMap.prototype és en si mateix només un objecte ordinari:

- -
Object.prototype.toString.call(WeakMap.prototype); // "[object Object]"
- -

Propietats

- -
-
WeakMap.prototype.constructor
-
Retorna la funció que ha creat un prototip de la instància. Aquesta és la funció {{jsxref("WeakMap")}} per defecte.
-
- -

Mètodes

- -
-
{{jsxref("WeakMap.delete", "WeakMap.prototype.delete(key)")}}
-
Elimina qualsevol valor associat a key. WeakMap.prototype.has(key) retornarà false després d'això.
-
{{jsxref("WeakMap.get", "WeakMap.prototype.get(key)")}}
-
Retorna el valor associat a key, o undefined si no n'hi ha cap.
-
{{jsxref("WeakMap.has", "WeakMap.prototype.has(key)")}}
-
Retorna un booleà afirmant si un valor s'ha associat o no a la key en l'objecte WeakMap.
-
{{jsxref("WeakMap.set", "WeakMap.prototype.set(key, value)")}}
-
Estableix el valor per la key en l'objecte WeakMap. Retorna l'objecte WeakMap.
-
{{jsxref("WeakMap.prototype.clear()")}} {{obsolete_inline}}
-
Elimina totes les parelles clau/valor de l'objecte WeakMap. Vegeu que es posible implementar un objecte WeakMap-like que tingui un mètode .clear() per mitjà d'encapsular un objecte WeakMap que no ho tingui (vegeu un exemple a la pàgina {{jsxref("WeakMap")}})
-
- -

Especificacions

- - - - - - - - - - - - - - -
EspecificacióEstatComentaris
{{SpecName('ES6', '#sec-weakmap.prototype', 'WeakMap.prototype')}}{{Spec2('ES6')}}Definició inicial
- -

Compatibilitat amb navegadors

- -

{{CompatibilityTable}}

- -
- - - - - - - - - - - - - - - - - - - - - - - - - - - -
CaracterísticaChromeFirefox (Gecko)Internet ExplorerOperaSafari
Suport bàsic36{{CompatGeckoDesktop("6.0")}}11237.1
Objecte ordinari{{CompatUnknown}}{{CompatGeckoDesktop("40")}}{{CompatUnknown}}{{CompatUnknown}}{{CompatUnknown}}
-
- -
- - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -
CaracterísticaAndroidChrome per AndroidFirefox Mobile (Gecko)IE MobileOpera MobileSafari Mobile
Suport bàsic{{CompatNo}}{{CompatNo}}{{CompatGeckoMobile("6.0")}}{{CompatNo}}{{CompatNo}}8
Objecte ordinari{{CompatUnknown}}{{CompatUnknown}}{{CompatGeckoMobile("40")}}{{CompatUnknown}}{{CompatUnknown}}{{CompatUnknown}}
-
- -

Vegeu també

- - 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 ---- -
{{JSRef}}
- -

La propietat WeakSet.prototype representa el prototip pel constructor {{jsxref("WeakSet")}}.

- -
{{js_property_attributes(0,0,0)}}
- -

Descripció

- -

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 WeakSet.

- -

WeakSet.prototype és en si mateix només un objecte ordinari

- -
Object.prototype.toString.call(WeakSet.prototype); // "[object Object]"
- -

Propietats

- -
-
WeakSet.prototype.constructor
-
Retorna la funció que ha creat un prototip de la instància. Aquesta és la funció {{jsxref("WeakSet")}} per defecte.
-
- -

Mètodes

- -
-
{{jsxref("WeakSet.add", "WeakSet.prototype.add(value)")}}
-
Afegeix un nou element amb el valor donat a l'objecte WeakSet.
-
{{jsxref("WeakSet.delete", "WeakSet.prototype.delete(value)")}}
-
Elimina l'element associat al value. WeakSet.prototype.has(value) retornarà després false.
-
{{jsxref("WeakSet.has", "WeakSet.prototype.has(value)")}}
-
Retorna un booleà afirmant si un element és o no present amb el valor donat en l'objecte WeakSet.
-
{{jsxref("WeakSet.prototype.clear()")}} {{obsolete_inline}}
-
Elimina tots els elements de l'objecte WeakSet.
-
- -

Especificacions

- - - - - - - - - - - - - - -
EspecificacióEstatComentaris
{{SpecName('ES6', '#sec-weakset.prototype', 'WeakSet.prototype')}}{{Spec2('ES6')}}Definició inicial.
- -

Compatibilitat amb navegadors

- -

{{CompatibilityTable}}

- -
- - - - - - - - - - - - - - - - - - - - - - - - - - - -
CaracterísticaChromeFirefox (Gecko)Internet ExplorerOperaSafari
Suport bàsic36{{ CompatGeckoDesktop(34) }}{{CompatNo}}23{{CompatNo}}
Objecte ordinari{{CompatUnknown}}{{CompatGeckoDesktop("40")}}{{CompatUnknown}}{{CompatUnknown}}{{CompatUnknown}}
-
- -
- - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -
CaracterísticaChrome per AndroidAndroidFirefox Mobile (Gecko)IE MobileOpera MobileSafari Mobile
Suport bàsic{{CompatNo}}{{CompatNo}}{{ CompatGeckoMobile(34) }}{{CompatNo}}{{CompatNo}}{{CompatNo}}
Objecte ordinari{{CompatUnknown}}{{CompatUnknown}}{{CompatGeckoMobile("40")}}{{CompatUnknown}}{{CompatUnknown}}{{CompatUnknown}}
-
- -

Vegeu també

- - diff --git a/files/ca/web/javascript/reference/index.html b/files/ca/web/javascript/reference/index.html new file mode 100644 index 0000000000..f524504ab2 --- /dev/null +++ b/files/ca/web/javascript/reference/index.html @@ -0,0 +1,46 @@ +--- +title: Glossari de JavaScript +slug: Web/JavaScript/Referencia +translation_of: Web/JavaScript/Reference +--- +
{{JsSidebar}}
+ +

Aquesta part de la secció de JavaScript a l'MDN serveix com a glossari de informació sobre el llenguatge JavaScript. Podeu llegir més sobre aquest glossari.

+ +

Objectes Globals

+ +

Aquest capítol documenta tots els objectes standard de JavaScript, així com els seus mètodes i propietats.

+ +

{{page('/ca/docs/Web/JavaScript/Reference/Global_Objects', 'Objectes standard (per categoria)')}}

+ +

Sentències

+ +

Aquest capítol documenta totes les sentències i declaracions disponibles a JavaScript.

+ +

{{page('/ca/docs/Web/JavaScript/Reference/Statements', 'Instruccions i declaracions disponibles (per categoria)')}}

+ +

Expressions i operadors

+ +

Aquest capítol documenta totes les expressions i els operadors soportats per JavaScript.

+ +
{{page('/ca/docs/Web/JavaScript/Reference/Operators', 'Expressions i operadors (per categoria)')}}
+ +

Funcions

+ +

Aquest capítol documenta com treballar amb funcions de JavaScript.

+ + + +

Pàgines de glossari adicionals

+ + diff --git a/files/ca/web/javascript/reference/operators/comma_operator/index.html b/files/ca/web/javascript/reference/operators/comma_operator/index.html new file mode 100644 index 0000000000..f6a62d2bc8 --- /dev/null +++ b/files/ca/web/javascript/reference/operators/comma_operator/index.html @@ -0,0 +1,129 @@ +--- +title: Operador Coma +slug: Web/JavaScript/Referencia/Operadors/Operador_Coma +translation_of: Web/JavaScript/Reference/Operators/Comma_Operator +--- +
+
{{jsSidebar("Operators")}}
+
+ +

Resum

+ +

L'operador coma avalua cadascun dels seus operands (d'esquerra a dreta) i retorna el valor de l´últim operand.

+ +

Sintaxi

+ +
expr1, expr2, expr3...
+ +

Paràmetres

+ +
+
expr1, expr2, expr3...
+
Qualsevol expressions.
+
+ +

Descripció

+ +

Es pot fer servir l'operador coma quan es vulgui incloure múltiples expressions en una localització que requereix una sola expressió. L'ús més freqüent que es fa d'aquest operador es per subministrar múltiples paràmetres en una for loop.

+ +

Exemple

+ +

Si a és un array de 2 dimesnions amb 10 elements on a side, el codi següent usa l'operador coma per incrementar dos variables al mateix temps. Vegeu que la coma en la sentència var no  és l'operador coma, ja que no existeix dins d'una expressió. Més aviat, és un caràcter especial en les sentències var que combina múltiples d'ells en un. Pràcticament, la coma es comporta quasi igual que l'operador coma. El codi imprimeix els valors dels elements de la diagonal de l'array:

+ +
for (var i = 0, j = 9; i <= 9; i++, j--)
+  document.writeln("a[" + i + "][" + j + "] = " + a[i][j]);
+ +

Processar i després retornar

+ +

Un altre exemple sobre l'ús que es pot fer sobre l'operador coma és processar abansd e retornar. Com s'indica, només l'últim element serà retornat, però tots els altres també seràn avaluats. Així doncs, es podria fer:

+ +
function myFunc () {
+  var x = 0;
+
+  return (x += 1, x); // the same of return ++x;
+}
+ +

Especificacions

+ + + + + + + + + + + + + + + + + + + + + + + + +
EspecificacióEstatComentari
ECMAScript 1st Edition.EstàndardDefinició inicial.
{{SpecName('ES5.1', '#sec-11.14', 'Comma operator')}}{{Spec2('ES5.1')}} 
{{SpecName('ES6', '#sec-comma-operator', 'Comma operator')}}{{Spec2('ES6')}} 
+ +

Compatibilitat amb navegadors

+ +

{{ CompatibilityTable() }}

+ +
+ + + + + + + + + + + + + + + + + + + +
CaracterísticaChromeFirefox (Gecko)Internet ExplorerOperaSafari
Suport bàsic3.0
+
+ +
+ + + + + + + + + + + + + + + + + + + + + +
CaracterísticaAndroidChrome per AndroidFirefox Mobile (Gecko)IE MobileOpera MobileSafari Mobile
Suport bàsic
+
+ +

Vegeu també

+ + diff --git a/files/ca/web/javascript/reference/operators/conditional_operator/index.html b/files/ca/web/javascript/reference/operators/conditional_operator/index.html new file mode 100644 index 0000000000..15265c62b3 --- /dev/null +++ b/files/ca/web/javascript/reference/operators/conditional_operator/index.html @@ -0,0 +1,170 @@ +--- +title: Operador Condicional (ternari) +slug: Web/JavaScript/Referencia/Operadors/Conditional_Operator +translation_of: Web/JavaScript/Reference/Operators/Conditional_Operator +--- +
+
{{jsSidebar("Operators")}}
+
+ +

Resum

+ +

L'operador condicional (ternari) és l'únic operador de JavaScript que opera amb tres operands. Aquest operador és freqüentment usat com una simplificació de la sentència if.

+ +

Sintaxi

+ +
condition ? expr1 : expr2 
+ +

Paràmetres

+ +
+
condition
+
Una expressió que avalua true o false.
+
+ +
+
expr1, expr2
+
Expressions amb valors de qualsevol tipus.
+
+ +

Descripció

+ +

Si condition és true, l'operador retorna el valor de expr1; de ser el contrari, retorna el valor de expr2. Per exemple, per mostrar diferents missatges basats en el valor de la variable isMember, es podria fer servir aquesta sentència:

+ +
"The fee is " + (isMember ? "$2.00" : "$10.00")
+
+ +

També es pot assignar variables depenent del resultat ternari:

+ +
var elvisLives = Math.PI > 4 ? "Yep" : "Nope";
+ +

És possible realitzar avaluacions ternàries múltiples (nota: L'operador condicional operator s'associa per la dreta):

+ +
var firstCheck = false,
+    secondCheck = false,
+    access = firstCheck ? "Access denied" : secondCheck ? "Access denied" : "Access granted";
+
+console.log( access ); // logs "Access granted"
+ +

També es pot usar avaluacions ternàries en espais lliures per tal de fer diferents operacions:

+ +
var stop = false, age = 16;
+
+age > 18 ? location.assign("continue.html") : stop = true;
+
+ +

També es pot fer més d'una sola operació per cas, separant-les amb una coma:

+ +
var stop = false, age = 23;
+
+age > 18 ? (
+    alert("OK, you can go."),
+    location.assign("continue.html")
+) : (
+    stop = true,
+    alert("Sorry, you are much too young!")
+);
+
+ +

I per últim, també es pot fer més d'una operació durant l'assignació d'un valor. En aquest cas, el últim valor del parèntesis serparat per una coma serà el valor assignat.

+ +
var age = 16;
+
+var url = age > 18 ? (
+    alert("OK, you can go."),
+    // alert returns "undefined", but it will be ignored because
+    // isn't the last comma-separated value of the parenthesis
+    "continue.html" // the value to be assigned if age > 18
+) : (
+    alert("You are much too young!"),
+    alert("Sorry :-("),
+    // etc. etc.
+    "stop.html" // the value to be assigned if !(age > 18)
+);
+
+location.assign(url); // "stop.html"
+ +

Especificacions

+ + + + + + + + + + + + + + + + + + + + + + + + +
EspecificacióEstatComentaris
1a edició deECMAScript.EstàndardDefinició inicial. Implementat en JavaScript 1.0
{{SpecName('ES5.1', '#sec-11.12', 'The conditional operator')}}{{Spec2('ES5.1')}} 
{{SpecName('ES6', '#sec-conditional-operator', 'Conditional Operator')}}{{Spec2('ES6')}} 
+ +

Compatibilitat amb navegadors

+ +

{{CompatibilityTable}}

+ +
+ + + + + + + + + + + + + + + + + + + +
CaracterísticaChromeFirefox (Gecko)Internet ExplorerOperaSafari
Suport bàsic{{CompatVersionUnknown}}{{CompatVersionUnknown}}{{CompatVersionUnknown}}{{CompatVersionUnknown}}{{CompatVersionUnknown}}
+
+ +
+ + + + + + + + + + + + + + + + + + + + + +
CaracterísticaAndroidChrome per AndroidFirefox Mobile (Gecko)IE MobileOpera MobileSafari Mobile
Suport bàsic{{CompatVersionUnknown}}{{CompatVersionUnknown}}{{CompatVersionUnknown}}{{CompatVersionUnknown}}{{CompatVersionUnknown}}{{CompatVersionUnknown}}
+
+ +

Vegeu també

+ + diff --git a/files/ca/web/javascript/reference/operators/function/index.html b/files/ca/web/javascript/reference/operators/function/index.html new file mode 100644 index 0000000000..0908f591b6 --- /dev/null +++ b/files/ca/web/javascript/reference/operators/function/index.html @@ -0,0 +1,146 @@ +--- +title: function expression +slug: Web/JavaScript/Referencia/Operadors/function +translation_of: Web/JavaScript/Reference/Operators/function +--- +
{{jsSidebar("Operators")}}
+ +

La paraula clau function es pot utilitzar per definir una funció dins d'una expressió.

+ +

Sintaxi

+ +
function [nom]([paràm1[, paràm2[, ..., paràmN]]]) {
+   sentències
+}
+ +

Paràmetres

+ +
+
nom
+
El nom de la funció. Es pot ometre, i en aquest cas la funció seria anònima. El nom és només local pel cos de la funció.
+
paràmN
+
El nom d'un argument que es passa a la funció.
+
sentències
+
Les sentències que constitueixen el cos de la funció.
+
+ +

Descripció

+ +

Una expressió d'una funció és molt semblant i té gairebé la mateixa sintaxi que una sentència d'una funció (function sentència d'una funció per més detalls). La principal diferència entre l'expressió d'una funció i una sentèndia d'una expressió és el nom de la functió, el qual es pot ometre en expressions de funcions per tal de crear funcions anònimes. Una expressió d'una funció es pot utilitzar com a un IIFE (Immediately Invoked Function Expression) que s'executa un cop s'ha definit. Vegeu també el capítol sobre funcions per més informació.

+ +

Exemples

+ +

L'exemple següent defineix una funció sense nom i l'assigna a x. La funció retorna el quadrat del seu argument:

+ +
var x = function(y) {
+   return y * y;
+};
+
+ +

Expressió d'una funció amb nom

+ +

Si vols fer referència a la funció actual dins del cos de la funció, necessitaràs crear una expressió d'una funció amb nom. Aquest nom és llavors només local pel cos de la funció (àmbit). AIxò també evita utilitzar la propietat no estàndard arguments.callee.

+ +
var math = {
+  'factorial': function factorial(n) {
+    if (n <= 1)
+      return 1;
+    return n * factorial(n - 1);
+  }
+};
+
+ +

Especificacions

+ + + + + + + + + + + + + + + + + + + + + + + + + + + + + +
EspecificacióEstatComentaris
{{SpecName('ESDraft', '#sec-function-definitions', 'Function definitions')}}{{Spec2('ESDraft')}} 
{{SpecName('ES6', '#sec-function-definitions', 'Function definitions')}}{{Spec2('ES6')}} 
{{SpecName('ES5.1', '#sec-13', 'Function definition')}}{{Spec2('ES5.1')}} 
{{SpecName('ES3', '#sec-13', 'Function definition')}}{{Spec2('ES3')}}Definició inicial. Implementat en JavaScript 1.5.
+ +

Compatibilitat amb navegadors

+ +

{{CompatibilityTable}}

+ +
+ + + + + + + + + + + + + + + + + + + +
CaracterísticaChromeFirefox (Gecko)Internet ExplorerOperaSafari
Suport bàsic{{CompatVersionUnknown}}{{CompatVersionUnknown}}{{CompatVersionUnknown}}{{CompatVersionUnknown}}{{CompatVersionUnknown}}
+
+ +
+ + + + + + + + + + + + + + + + + + + + + +
CaracterísticaAndroidChrome per AndroidFirefox Mobile (Gecko)IE MobileOpera MobileSafari Mobile
Suport bàsic{{CompatVersionUnknown}}{{CompatVersionUnknown}}{{CompatVersionUnknown}}{{CompatVersionUnknown}}{{CompatVersionUnknown}}{{CompatVersionUnknown}}
+
+ +

Vegeu també

+ + diff --git a/files/ca/web/javascript/reference/operators/grouping/index.html b/files/ca/web/javascript/reference/operators/grouping/index.html new file mode 100644 index 0000000000..45e8566806 --- /dev/null +++ b/files/ca/web/javascript/reference/operators/grouping/index.html @@ -0,0 +1,128 @@ +--- +title: Operador d'agrupament +slug: Web/JavaScript/Referencia/Operadors/Grouping +translation_of: Web/JavaScript/Reference/Operators/Grouping +--- +
+
{{jsSidebar("Operators")}}
+
+ +

Resum

+ +

L'operador d'agrupament ( ) controla la precedència de l'avaluació en expresions.

+ +

Sintaxi

+ +
 ( )
+ +

Descripció

+ +

L'operador agrupament consisteix en un parell de parèntesis que embolcallen una expressió o una sub-expressió per anular la precedència d'operadors normal de forma que expressions amb un nivell més baix de precedència poden ser avaluades abans d'una expressió amb més prioritat.

+ +

Exemples

+ +

Primer predomina la multiplicació i la divisió, després la suma i la resta per tal d'avaluar primer la suma.

+ +
var a = 1;
+var b = 2;
+var c = 3;
+
+// default precedence
+a + b * c     // 7
+// evaluated by default like this
+a + (b * c)   // 7
+
+// now overriding precedence
+// addition before multiplication
+(a + b) * c   // 9
+
+// which is equivalent to
+a * c + b * c // 9
+
+ +

Especificacions

+ + + + + + + + + + + + + + + + + + + + + + + + +
EspecificacióEstatComentaris
1a edició de ECMAScript.EstàndardDefinició inicial. Implementat en JavaScript 1.0
{{SpecName('ES5.1', '#sec-11.1.6', 'The Grouping Operator')}}{{Spec2('ES5.1')}} 
{{SpecName('ES6', '#sec-grouping-operator', 'The Grouping Operator')}}{{Spec2('ES6')}} 
+ +

Compatibilitat amb navegadors

+ +

{{ CompatibilityTable() }}

+ +
+ + + + + + + + + + + + + + + + + + + +
CaracterísticaChromeFirefox (Gecko)Internet ExplorerOperaSafari
Suport bàsic{{ CompatVersionUnknown() }}{{ CompatVersionUnknown() }}{{ CompatVersionUnknown() }}{{ CompatVersionUnknown() }}{{ CompatVersionUnknown() }}
+
+ +
+ + + + + + + + + + + + + + + + + + + + + +
CaracterísticaAndroidChrome per AndroidFirefox Mobile (Gecko)IE MobileOpera MobileSafari Mobile
Suport bàsic{{ CompatVersionUnknown() }}{{ CompatVersionUnknown() }}{{ CompatVersionUnknown() }}{{ CompatVersionUnknown() }}{{ CompatVersionUnknown() }}{{ CompatVersionUnknown() }}
+
+ +

Vegeu també

+ + diff --git a/files/ca/web/javascript/reference/operators/index.html b/files/ca/web/javascript/reference/operators/index.html new file mode 100644 index 0000000000..4a70edc4fb --- /dev/null +++ b/files/ca/web/javascript/reference/operators/index.html @@ -0,0 +1,282 @@ +--- +title: Expressions and operators +slug: Web/JavaScript/Referencia/Operadors +tags: + - JavaScript + - NeedsTranslation + - Operators + - TopicStub +translation_of: Web/JavaScript/Reference/Operators +--- +
{{jsSidebar("Operators")}}
+ +

Aquest capítol documenta totls els operadors, expressions i paraules clau del llenguatge JavaScript.

+ +

Expressions i operadors per categoria

+ +

Per a un llistat en order alfabetic vegeu el menú de l'esquerra.

+ +

Expressions primàries

+ +

Paraules clau bàsiques i expressions generals en JavaScript.

+ +
+
{{jsxref("Operadors/this", "this")}}
+
La paraula clau this fa referència al contexte d'execució de la funció actual.
+
{{jsxref("Operadors/function", "function")}}
+
La paraula clau function defineix una expressió de funció.
+
{{experimental_inline()}} {{jsxref("Operadors/function*", "function*")}}
+
La paraula clau function* defineix una expressió de funció generadora.
+
{{experimental_inline()}} {{jsxref("Operadors/yield", "yield")}}
+
Pausa i resumeix una funció generadora.
+
{{experimental_inline()}} {{jsxref("Operadors/yield*", "yield*")}}
+
Delega a una altra funció generadora o objecte iterable.
+
{{jsxref("Global_Objects/Array", "[]")}}
+
Sintaxi d'inicialització o literal d'arrays.
+
{{jsxref("Operators/Object_initializer", "{}")}}
+
Sintaxi d'inicialitzador o literal d'objectes.
+
{{jsxref("Global_Objects/RegExp", "/ab+c/i")}}
+
Sintaxi de literals formats per expressions regulars.
+
{{experimental_inline()}} {{jsxref("Operadors/Array_comprehensions", "[for (x of y) x]")}}
+
Comprensió d'arrays.
+
{{experimental_inline()}} {{jsxref("Operadors/Generator_comprehensions", "(for (x of y) y)")}}
+
Comprensió de generators.
+
{{jsxref("Operadors/Grouping", "( )")}}
+
Operador d'agrupament.
+
+ +

Expressions de banda esquerra

+ +

Els valors de l'esquerra són la destinació d'una assignació.

+ +
+
{{jsxref("Operadors/Property_accessors", "Property accessors", "", 1)}}
+
Els operadors membres proporcionen accés a una propietat o mètode d'un objecte
+ (object.property i object["property"]).
+
{{jsxref("Operadors/new", "new")}}
+
L'operador new crea una instància d'un constructor.
+
{{experimental_inline()}} {{jsxref("Operadors/super", "super")}}
+
La paraula clau super crida el constructor de l'objecte pare.
+
{{experimental_inline()}} {{jsxref("Operadors/Spread_operator", "...obj")}}
+
L'operador d'extensió permet que una expressió s'expandeixi en llocs on s'esperen mútiples argurments (per a crides de funcions) o elements (per a literals d'arrays).
+
+ +

Increment i decrement

+ +

Operadors de increment o decrement en forma de prefix/sufix.

+ +
+
{{jsxref("Operadors/Arithmetic_Operators", "A++", "#Increment")}}
+
Operador sufix d'increment.
+
{{jsxref("Operadors/Arithmetic_Operators", "A--", "#Decrement")}}
+
Operador sufix de decrement.
+
{{jsxref("Operadors/Arithmetic_Operators", "++A", "#Increment")}}
+
Operador prefix d'increment.
+
{{jsxref("Operadors/Arithmetic_Operators", "--A", "#Decrement")}}
+
Operador prefix de decrement.
+
+ +

Operadors unaris

+ +

Un operador unari és un operador que només accepta un operand.

+ +
+
{{jsxref("Operadors/delete", "delete")}}
+
L'operador delete esborra una propietat d'un objecte.
+
{{jsxref("Operadors/void", "void")}}
+
L'operador void evalua una expressió i descarta el que retorni.
+
{{jsxref("Operadors/typeof", "typeof")}}
+
L'operador typeof determina el tipus d'un objecte donat.
+
{{jsxref("Operadors/Arithmetic_Operators", "+", "#Unary_plus")}}
+
L'operador unari més converteix l'operand donat al tipus Number.
+
{{jsxref("Operadors/Arithmetic_Operators", "-", "#Unary_negation")}}
+
L'operador unari negació converteix l'operand donat al tipus Number i llavors el nega.
+
{{jsxref("Operadors/Bitwise_Operators", "~", "#Bitwise_NOT")}}
+
Operador binari NOT.
+
{{jsxref("Operadors/Logical_Operators", "!", "#Logical_NOT")}}
+
Operador lògic NOT.
+
+ +

Operadors aritmètics

+ +

Els operadors aritmètics accepten valors numèrics (ja siguin literals o variables) com a operands i retornen un únic valor numèric.

+ +
+
{{jsxref("Operadors/Arithmetic_Operators", "+", "#Addition")}}
+
Operador de suma.
+
{{jsxref("Operadors/Arithmetic_Operators", "-", "#Subtraction")}}
+
Operador de resta.
+
{{jsxref("Operadors/Arithmetic_Operators", "/", "#Division")}}
+
Operador de divisió.
+
{{jsxref("Operadors/Arithmetic_Operators", "*", "#Multiplication")}}
+
Operador de multiplicació.
+
{{jsxref("Operadors/Arithmetic_Operators", "%", "#Remainder")}}
+
Operador de mòdul.
+
+ +

Operadors relacionals

+ +

Els operadors relacionals compara els operands donats i retorna un valor de tipus Boolean value basat en si la relació és certa o no.

+ +
+
{{jsxref("Operadors/in", "in")}}
+
L'operador in determina si un objecte té la propietat donada.
+
{{jsxref("Operadors/instanceof", "instanceof")}}
+
L'operador instanceof determina si un objecte és una instància d'un altre objecte.
+
{{jsxref("Operadors/Comparison_Operators", "<", "#Less_than_operator")}}
+
Operador menor que.
+
{{jsxref("Operadors/Comparison_Operators", ">", "#Greater_than_operator")}}
+
Operador major que.
+
{{jsxref("Operadors/Comparison_Operators", "<=", "#Less_than_or_equal_operator")}}
+
Operador menor o igual que.
+
{{jsxref("Operadors/Comparison_Operators", ">=", "#Greater_than_or_equal_operator")}}
+
Operador major o igual que.
+
+ +

Operadors d'igualtat

+ +

El resultat d'evaluar un operador d'igualtat és sempre de tipus Boolean i el resultat es basa en si la comparació és certa.

+ +
+
{{jsxref("Operadors/Comparison_Operators", "==", "#Equality")}}
+
Operador d'igulatat.
+
{{jsxref("Operadors/Comparison_Operators", "!=", "#Inequality")}}
+
Operador de no igualtat.
+
{{jsxref("Operadors/Comparison_Operators", "===", "#Identity")}}
+
Operador identitat.
+
{{jsxref("Operadors/Comparison_Operators", "!==", "#Nonidentity")}}
+
Operador de no identitat.
+
+ +

Operadors de desplaçament de bits

+ +

Operacions que desplacen tots els bits d'un operand.

+ +
+
{{jsxref("Operadors/Bitwise_Operators", "<<", "#Left_shift")}}
+
Operador de desplaçament de bits a l'esquerra.
+
{{jsxref("Operadors/Bitwise_Operators", ">>", "#Right_shift")}}
+
Operador de desplaçament de bits a la dreta.
+
{{jsxref("Operadors/Bitwise_Operators", ">>>", "#Unsigned_right_shift")}}
+
Operador de desplaçament a la dreta sense signe.
+
+ +

Operadors binaris

+ +

Els operadors binaris tracten els seus operands com un conjunt de 32 bits (uns i zeros) i retornen valors numèrics standards de JavaScript.

+ +
+
{{jsxref("Operadors/Bitwise_Operators", "&", "#Bitwise_AND")}}
+
AND binari.
+
{{jsxref("Operadors/Bitwise_Operators", "|", "#Bitwise_OR")}}
+
OR binari.
+
{{jsxref("Operadors/Bitwise_Operators", "^", "#Bitwise_XOR")}}
+
XOR binari.
+
+ +

Operadors lògics

+ +

Els operadors lògics típicament s'utilitzen amb valors booleans (és a dir, logics) i retornen un valor booleà.

+ +
+
{{jsxref("Operadors/Logical_Operators", "&&", "#Logical_AND")}}
+
AND lògic.
+
{{jsxref("Operadors/Logical_Operators", "||", "#Logical_OR")}}
+
OR lògic.
+
+ +

Operador condicional (ternari)

+ +
+
{{jsxref("Operadors/Conditional_Operator", "(condition ? ifTrue : ifFalse)")}}
+
+

L'operador condicional retorna un dels dos valors basat en l'evaluació lògica de la condició.

+
+
+ +

Operadors d'assignació

+ +

Els operadors d'assignació asignen un valor a l'operand de l'esquerra basant-se en l'evaluació de l'operand de la dreta.

+ +
+
{{jsxref("Operadors/Assignment_Operators", "=", "#Assignment")}}
+
Operador d'assignació.
+
{{jsxref("Operadors/Assignment_Operators", "*=", "#Multiplication_assignment")}}
+
Assignació de la multiplicació.
+
{{jsxref("Operadors/Assignment_Operators", "/=", "#Division_assignment")}}
+
Assignació de la divisó.
+
{{jsxref("Operadors/Assignment_Operators", "%=", "#Remainder_assignment")}}
+
Assignació del mòdul.
+
{{jsxref("Operadors/Assignment_Operators", "+=", "#Addition_assignment")}}
+
Assignació de la suma.
+
{{jsxref("Operadors/Assignment_Operators", "-=", "#Subtraction_assignment")}}
+
Assignació de la resta.
+
{{jsxref("Operadors/Assignment_Operators", "<<=", "#Left_shift_assignment")}}
+
Assignació del desplaçament a l'esquerra.
+
{{jsxref("Operadors/Assignment_Operators", ">>=", "#Right_shift_assignment")}}
+
Assignació del desplaçament a la dreta.
+
{{jsxref("Operadors/Assignment_Operators", ">>>=", "#Unsigned_right_shift_assignment")}}
+
Assignació del desplaçament a la dreta sense signe.
+
{{jsxref("Operadors/Assignment_Operators", "&=", "#Bitwise_AND_assignment")}}
+
Assignació de l'AND binari.
+
{{jsxref("Operadors/Assignment_Operators", "^=", "#Bitwise_XOR_assignment")}}
+
Assignació del XOR binari.
+
{{jsxref("Operadors/Assignment_Operators", "|=", "#Bitwise_OR_assignment")}}
+
Assignació de l'OR binari.
+
{{experimental_inline()}} {{jsxref("Operadors/Destructuring_assignment", "[a, b] = [1, 2]")}}
+ {{experimental_inline()}} {{jsxref("Operadors/Destructuring_assignment", "{a, b} = {a:1, b:2}")}}
+
+

L'assignació de desestructuració permet assignar les propietats d'un array o objecte a variables utilitzant una sintaxi que recorda la de literals d'arrays o objectes.

+
+
+ +

Operador coma

+ +
+
{{jsxref("Operadors/Comma_Operator", ",")}}
+
L'operador coma permet que múltiples expressions siguin evaluades en una sola sentència i retorna el resultat de l'última expressió.
+
+ +

Característiques no standard

+ +
+
{{non-standard_inline}} {{jsxref("Operadors/Legacy_generator_function", "Legacy generator function", "", 1)}}
+
La paraula clau function es pot emprar per a definir una funció generadora obsoleta dins una expressió. Per a crear una funció generadora obsoleta el cos de la funció ha de contindre al menys una expressió {{jsxref("Operators/yield", "yield")}}.
+
{{non-standard_inline}} {{jsxref("Operadors/Expression_closures", "Expression closures", "", 1)}}
+
La sintaxi d'expressions closure és una abreviació per a escriure funcions simples.
+
+ +

Especificacions

+ + + + + + + + + + + + + + + + + + + + + + + + +
EspecificacióEstatComentaris
ECMAScript 1a Edició.StandardDefinició inicial.
{{SpecName('ES5.1', '#sec-11', 'Expressions')}}{{Spec2('ES5.1')}} 
{{SpecName('ES6', '#sec-ecmascript-language-expressions', 'Llenguatge ECMAScript: Expressions')}}{{Spec2('ES6')}} +

Nou: L'operador d'extensió, l'assignació de desestructuració, la paraula clau super, la comprensió d'arrays i la comprensió de generadors

+
+ +

Vegeu també

+ + diff --git a/files/ca/web/javascript/reference/operators/super/index.html b/files/ca/web/javascript/reference/operators/super/index.html new file mode 100644 index 0000000000..c19e58cba1 --- /dev/null +++ b/files/ca/web/javascript/reference/operators/super/index.html @@ -0,0 +1,119 @@ +--- +title: super +slug: Web/JavaScript/Referencia/Operadors/super +translation_of: Web/JavaScript/Reference/Operators/super +--- +
{{jsSidebar("Operators")}}
+ +

Resum

+ +

La paraula clau super s'utilitza per cridar funcions del pare de l'objecte.

+ +

Sintaxi

+ +
super([arguments]); // crida el constructor del pare.
+super.functionOnParent([arguments]);
+
+ +

Descripció

+ +

Quan s'utilitza en un constructor, la paraula clau super apareix sola i s'ha d'utilitzar abans de la paraula clau this. Aquesta paraula clau també es pot utilitzar per cridar funcions en un objecte pare.

+ +

Exemple

+ +

Aquest fragment de codi es pren de la mostra de classes  mostra de classes (demostració en viu).

+ +
class Square extends Polygon {
+  constructor(length) {
+    // Aquí es crida el constructor del pare de la classe amb les longituds
+    // proveïdes per l'alçada i l'amplada del polígon
+    super(length, length);
+    // Nota: En classes derivades, s'ha de cridar super() abans de poder
+    // utilitzar 'this'. Obviar això causarà un error de referència.
+    this.name = 'Square';
+  }
+
+  get area() {
+    return this.height * this.width;
+  }
+
+  set area(value) {
+    this.area = value;
+  }
+}
+ +

Especificacions

+ + + + + + + + + + + + + + +
EspecificacióEstatComentaris
{{SpecName('ES6', '#sec-super-keyword', 'super')}}{{Spec2('ES6')}}Definició inicial.
+ +

Compatibilitat amb navegadors

+ +

{{CompatibilityTable}}

+ +
+ + + + + + + + + + + + + + + + + + + +
CaracterísticaChromeFirefox (Gecko)Internet ExplorerOperaSafari
Suport bàsic{{CompatChrome(42.0)}}{{CompatNo}}
+ {{bug(1066239)}}
{{CompatUnknown}}{{CompatUnknown}}{{CompatUnknown}}
+
+ +
Safari Mobile + + + + + + + + + + + + + + + + + + + + +
CaracterísticaAndroidChrome per AndroidFirefox Mobile (Gecko)IE MobileOpera Mobile
Suport bàsic{{CompatUnknown}}{{CompatChrome(42.0)}}{{CompatNo}}
+ {{bug(1066239)}}
{{CompatUnknown}}{{CompatUnknown}}{{CompatUnknown}}
+
+ +

Vegeu també

+ + diff --git a/files/ca/web/javascript/reference/operators/typeof/index.html b/files/ca/web/javascript/reference/operators/typeof/index.html new file mode 100644 index 0000000000..a7407e79ce --- /dev/null +++ b/files/ca/web/javascript/reference/operators/typeof/index.html @@ -0,0 +1,240 @@ +--- +title: typeof +slug: Web/JavaScript/Referencia/Operadors/typeof +translation_of: Web/JavaScript/Reference/Operators/typeof +--- +
+
{{jsSidebar("Operators")}}
+
+ +

Resum

+ +

L'operador typeof retorna una cadena de caràcters que representa el tipus de l'operand, que en cap cas és evaluat.

+ +

Sintaxi

+ +

L'operador typeof va seguit del seu operand:

+ +
typeof operand
+ +

Paràmetres

+ +

operand és una expressió que representa l'objecte o {{Glossary("Primitive", "primitive")}} del qual es retornarà el tipus.

+ +

Descripció

+ +

La taula següent resumeix els possibles valor de typeof. Per més informació sobre tipus i tipus primitius, vegeu també la pàgina de JavaScript data structure.

+ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +
TipusResultat
Undefined"undefined"
Null"object" (vegeu a sota)
Boolean"boolean"
Number"number"
String"string"
Symbol (nou a l'ECMAScript 6)"symbol"
Host object (proporcionat per l'entorn JS)Depenent de l'implementació
Objecte Funció (implements [[Call]] in ECMA-262 terms)"function"
Qualsevol altre objecte"object"
+ +

Exemples

+ +

Casos normals

+ +
// Numbers
+typeof 37 === 'number';
+typeof 3.14 === 'number';
+typeof Math.LN2 === 'number';
+typeof Infinity === 'number';
+typeof NaN === 'number'; // A pesar de ser un "Not-A-Number"
+typeof Number(1) === 'number'; // però no l'utilitzeu mai així!
+
+
+// Strings
+typeof "" === 'string';
+typeof "bla" === 'string';
+typeof (typeof 1) === 'string'; // typeof sempre retorna una string
+typeof String("abc") === 'string'; // però no l'utilitzeu mai així!
+
+
+// Booleans
+typeof true === 'boolean';
+typeof false === 'boolean';
+typeof Boolean(true) === 'boolean'; // però no l'utilitzeu mai així!
+
+
+// Symbols
+typeof Symbol() === 'symbol'
+typeof Symbol('foo') === 'symbol'
+typeof Symbol.iterator === 'symbol'
+
+
+// Undefined
+typeof undefined === 'undefined';
+typeof blabla === 'undefined'; // una variable no definida
+
+
+// Objects
+typeof {a:1} === 'object';
+
+// utilitzeu Array.isArray o bé Object.prototype.toString.call
+// per a diferenciar objectes normals d'arrays
+typeof [1, 2, 4] === 'object';
+
+typeof new Date() === 'object';
+
+
+// Els següents exemples són confusos, no els utilitzeu!
+typeof new Boolean(true) === 'object';
+typeof new Number(1) === 'object';
+typeof new String("abc") === 'object';
+
+
+// Funcions
+typeof function(){} === 'function';
+typeof Math.sin === 'function';
+
+ +

null

+ +
// Això es manté així des de l'inici de JavaScript
+typeof null === 'object';
+
+ +

A la primera implementació de JavaScript, els valors de JavaScript es representaven com a una etiqueta de tipus i un valor. L'etiqueta de tipus per objectes era 0. null era representat amb el punter NULL (0x00 a la majoria de plataformes). D'aquesta manera null tenia 0 com a etiqueta de tipus, i això és el que determina que typeof retorni 'object' per a null. (referència)

+ +

Es va proposar una esmena per a canviar aquest comportament per l'ECMAScript (via una opt-in), però aquesta va ser rebutjada. El resultat hagués estat typeof null === 'null'.

+ +

Expressions regulars

+ +

Expressions regulars que poden ser cridades van ser un afegit no standard en alguns navegadors web.

+ +
typeof /s/ === 'function'; // Chrome 1-12 No cumpleix l'standard ECMAScript 5.1
+typeof /s/ === 'object';   // Firefox 5+  D'acord amb ECMAScript 5.1
+
+ +

Especificacions

+ + + + + + + + + + + + + + + + + + + + + + + + +
EspecificacióEstatComentari
1a edició ECMAScript.EstàndardDefinició inicial. Implementat en JavaScript 1.1
{{SpecName('ES5.1', '#sec-11.4.3', 'The typeof Operator')}}{{Spec2('ES5.1')}} 
{{SpecName('ES6', '#sec-typeof-operator', 'The typeof Operator')}}{{Spec2('ES6')}} 
+ +

Compatibilitat amb navegadors

+ +

{{ CompatibilityTable() }}

+ +
+ + + + + + + + + + + + + + + + + + + +
CaracterísticaChromeFirefox (Gecko)Internet ExplorerOperaSafari
Suport bàsic{{ CompatVersionUnknown() }}{{ CompatVersionUnknown() }}{{ CompatVersionUnknown() }}{{ CompatVersionUnknown() }}{{ CompatVersionUnknown() }}
+
+ +
+ + + + + + + + + + + + + + + + + + + + + +
CaracterísticaAndroidChrome per AndroidFirefox Mobile (Gecko)IE MobileOpera MobileSafari Mobile
Suport bàsic{{ CompatVersionUnknown() }}{{ CompatVersionUnknown() }}{{ CompatVersionUnknown() }}{{ CompatVersionUnknown() }}{{ CompatVersionUnknown() }}{{ CompatVersionUnknown() }}
+
+ +

Els objects host a Internet Explorer són objectes en comptes de funcions

+ +

A IE 6, 7, i 8 molts dels host objects són objectes i no funcions. Per exemple:

+ +
typeof alert === 'object'
+ +

Vegeu també

+ + diff --git a/files/ca/web/javascript/reference/operators/void/index.html b/files/ca/web/javascript/reference/operators/void/index.html new file mode 100644 index 0000000000..ddf98ebfd9 --- /dev/null +++ b/files/ca/web/javascript/reference/operators/void/index.html @@ -0,0 +1,138 @@ +--- +title: L'operador void +slug: Web/JavaScript/Referencia/Operadors/void +translation_of: Web/JavaScript/Reference/Operators/void +--- +
{{jsSidebar("Operators")}}
+ +

Resum

+ +

L'operador void evalua l'expressió donada i retorna undefined.

+ +

Sintaxi

+ +
void expressió
+ +

Descripció

+ +

Aquest operador permet inserir expressions que produeixen efectes secundaris en llocs on es vol una expressió que s'evalui a undefined.

+ +

L'operador void tot sovint s'utilitza simplement per a obtenir el valor primitiu undefined, normalment usant "void(0)" (que és equivalent a "void 0"). En aquests casos es pot utilitzar la variable global undefined en comptes de l'operador void (asumint que no ha sigut assignada a un valor no standard).

+ +

Expressions de funció invocades de forma immediata

+ +

A l'utilitzar una expressió de funció invocada de forma immediata, es pot usar void per a forçar que la paraula clau function sigui tractada com a una expressió en comptes d'una declaració.

+ +
void function iife() {
+    var bar = function () {};
+    var baz = function () {};
+    var foo = function () {
+        bar();
+        baz();
+     };
+    var biz = function () {};
+
+    foo();
+    biz();
+}();
+
+ +

URIs de JavaScript

+ +

Quan un navegador segueix una URI de l'estil javascript: , aquest evalua el codi que hi ha a la URI i llavors reemplaça el contingut de la pàgina amb el valor retornat, a no ser que el valor retornat sigui undefined. L'operador void pot ser emprat en aquest case per a retornar undefined. Per exemple:

+ +
<a href="javascript:void(0);">
+  Cliqueu aquí per a no fer res
+</a>
+
+<a href="javascript:void(document.body.style.backgroundColor='green');">
+  Clique aquí per a un fons de color verd
+</a>
+
+ +

Tingueu en compte, però, que el pseudo protocol javascript: no és recomanat ja que existeixen alternatives, com ara manegadors d'events no obtrusius.

+ +

Especificacions

+ + + + + + + + + + + + + + + + + + + + + + + + +
EspecificacióEstatComentaris
ECMAScript 1a Edició.StandardDefinició inicial. Implementat al JavaScript 1.1
{{SpecName('ES5.1', '#sec-11.4.2', 'The void Operator')}}{{Spec2('ES5.1')}} 
{{SpecName('ES6', '#sec-void-operator', 'The void Operator')}}{{Spec2('ES6')}} 
+ +

Compatibilitat amb navegadors

+ +

{{ CompatibilityTable() }}

+ +
+ + + + + + + + + + + + + + + + + + + +
CaracterísticaChromeFirefox (Gecko)Internet ExplorerOperaSafari
Suport bàsic{{ CompatVersionUnknown() }}{{ CompatVersionUnknown() }}{{ CompatVersionUnknown() }}{{ CompatVersionUnknown() }}{{ CompatVersionUnknown() }}
+
+ +
+ + + + + + + + + + + + + + + + + + + + + +
CaracterísticaAndroidChrome for AndroidFirefox Mobile (Gecko)IE MobileOpera MobileSafari Mobile
Suport bàsic{{ CompatVersionUnknown() }}{{ CompatVersionUnknown() }}{{ CompatVersionUnknown() }}{{ CompatVersionUnknown() }}{{ CompatVersionUnknown() }}{{ CompatVersionUnknown() }}
+
+ +

Vegeu també

+ + diff --git a/files/ca/web/javascript/reference/operators/yield/index.html b/files/ca/web/javascript/reference/operators/yield/index.html new file mode 100644 index 0000000000..d01f641767 --- /dev/null +++ b/files/ca/web/javascript/reference/operators/yield/index.html @@ -0,0 +1,152 @@ +--- +title: yield +slug: Web/JavaScript/Referencia/Operadors/yield +translation_of: Web/JavaScript/Reference/Operators/yield +--- +
{{jsSidebar("Operators")}}
+ +

Resum

+ +

La paraula clau yield s'utilitza per a pausar i reprendre una funció generadora ({{jsxref("Statements/function*", "function*")}} o bé una funció generadora obsoleta).

+ +

Sintaxi

+ +
 yield [[expressió]];
+ +
+
expressió
+
La expresssió a retornar. Si s'omet es retorna undefined.
+
+ +

Descripció

+ +

La paraula clau yield causa que l'execució d'una funció generadora es pausi i retorni el valor de l'expressió que la segueix. La paraula clau yield es pot entendre com una versió de la paraula clau return per a generadors.

+ +

La paraula clau yield retorna en realitat un objecte de tipus IteratorResult amb dues propietats: value i done. La propietat value és el resultat d'evaluar l'expresssió que segueix yield mentre que la propietat done és de tipus booleà i indica si la funció generadora ha completat la seva execució o no.

+ +

Un cop pausada mitjançant una expressió yield, l'execució de codi del generador no es reprendrà a no ser que s'invoqui externament mitjançant la crida a la funció next() del generador. Això permet un control directe de l'execució del generador i valors de retorn incrementals.

+ +

Exemples

+ +

El següent codi és un exemple de la declaració d'una funció generadora al llarg d'una funció d'ajut.

+ +
function* foo(){
+  var index = 0;
+  while (index <= 2) // quan index arriba a 3,
+                     // la propietat done del yield serà true
+                     // i el seu valor serà undefined;
+    yield index++;
+}
+ +

Un cop la funció generadora és definida es pot utilitzar tot construïnt un iterador tal i com es mostra a continuació:

+ +
var iterator = foo();
+console.log(iterator.next()); // { value:0, done:false }
+console.log(iterator.next()); // { value:1, done:false }
+console.log(iterator.next()); // { value:2, done:false }
+console.log(iterator.next()); // { value:undefined, done:true }
+ +

Especificacions

+ + + + + + + + + + + + + + + + +
EspecificacióEstatComentaris
{{SpecName('ES6', '#', 'Yield')}}{{Spec2('ES6')}}Definició inicial
+ +

Compatibilitat amb navegadors

+ +

{{CompatibilityTable}}

+ +
+ + + + + + + + + + + + + + + + + + + + + + + + + + + +
CaracterísticaChromeFirefox (Gecko)Internet ExplorerOperaSafari (WebKit)
Suport bàsic39{{CompatGeckoDesktop("26.0")}}{{CompatUnknown}}{{CompatUnknown}}{{CompatUnknown}}
Objecte IteratorResult en comptes de throwing{{CompatUnknown}}{{CompatGeckoDesktop("29.0")}}{{CompatUnknown}}{{CompatUnknown}}{{CompatUnknown}}
+
+ +
+ + + + + + + + + + + + + + + + + + + + + + + + + + + +
CaracterísticaAndroidFirefox Mobile (Gecko)IE MobileOpera MobileSafari Mobile
Suport bàsicyes (when?){{CompatGeckoMobile("26.0")}}{{CompatUnknown}}{{ CompatUnknown}}{{CompatUnknown}}
Objecte IteratorResult en comptes de throwing{{CompatUnknown}}{{CompatGeckoMobile("29.0")}}{{CompatUnknown}}{{CompatUnknown}}{{CompatUnknown}}
+
+ +

Notes específiques per a Firefox

+ + + +

Vegeu tambè

+ + diff --git a/files/ca/web/javascript/reference/statements/block/index.html b/files/ca/web/javascript/reference/statements/block/index.html new file mode 100644 index 0000000000..cfa5d7fd20 --- /dev/null +++ b/files/ca/web/javascript/reference/statements/block/index.html @@ -0,0 +1,138 @@ +--- +title: block +slug: Web/JavaScript/Referencia/Sentencies/block +translation_of: Web/JavaScript/Reference/Statements/block +--- +
+
{{jsSidebar("Statements")}}
+
+ +

Resum

+ +

Una sentència bloc (o sentència composta en altres llengües) s'usa per agrupar zero o més sentències. El bloc està delimitat per un parell de claus.

+ +

Sintaxi

+ +
{
+  sentència_1;
+  sentència_2;
+  ...
+  sentència_n;
+}
+
+ +
+
statement_1, statement_2, statement_n
+
Sentències agrupades dins la sentència block.
+
+ +

Descripció

+ +

Aquesta sentència s'utilitza normalment amb les sentències de control de flux (p.ex. if, for, while). Per exemple:

+ +
while (x < 10) {
+  x++;
+}
+
+ +

Tingueu en compte que la sentència block no acaba amb un punt i coma.

+ +

La sentència bloc sovint s'anomena sentència composta en altres llengües. Aquesta sentència permet usar múltiples sentències allà on JavaScript espera només una única sentència. Combinar sentències en blocs és una pràctica comuna en JavaScript. El comportament oposat és possible fent servir una sentència buida, on no es proporciona cap declaració, encara que es requereixi una.

+ +

Fora de l'àmbit del bloc

+ +

Important: Les variables declarades amb var no tenen àmbit de bloc. Les variables introduïdes amb un bloc estàn en l'àmbit de la funció o l'script que els conté, i els efectes d'establir-los persisteixen més enllà del mateix bloc. En altres paraules, les sentències de bloc no introdueixen un àmbit. Encara que els blocs "independents" són sintàcticament vàlids, no és desitjable usar-los en JavaScript, ja que no fan el que pensem que fan, en el cas que penseu que fan alguna cosa semblant als blocs en C o Java. Per exemple:

+ +
var x = 1;
+{
+  var x = 2;
+}
+console.log(x); // logs 2
+
+ +

Això registra 2 ja que la sentència var x dins el bloc es troba en el mateix àmbit que la sentència var x anterior al bloc. En C o Java, el codi equivalent hauria emès 1.

+ +

Especificacions

+ + + + + + + + + + + + + + + + + + + + + + + + +
EspecificacionsEstatComentaris
1a edició d'ECMAScript.EstàndardDefinició inicial. Implementat en JavaScript 1.0
{{SpecName('ES5.1', '#sec-12.1', 'Block statement')}}{{Spec2('ES5.1')}} 
{{SpecName('ES6', '#sec-block', 'Block statement')}}{{Spec2('ES6')}} 
+ +

Compatibilitat amb navegadors

+ +

{{ CompatibilityTable() }}

+ +
+ + + + + + + + + + + + + + + + + + + +
CaracterísticaChromeFirefox (Gecko)Internet ExplorerOperaSafari
Suport bàsic{{ CompatVersionUnknown() }}{{ CompatVersionUnknown() }}{{ CompatVersionUnknown() }}{{ CompatVersionUnknown() }}{{ CompatVersionUnknown() }}
+
+ +
+ + + + + + + + + + + + + + + + + + + + + +
CaracterísticaAndroidChrome per AndroidFirefox Mobile (Gecko)IE MobileOpera MobileSafari Mobile
Suport bàsic{{ CompatVersionUnknown() }}{{ CompatVersionUnknown() }}{{ CompatVersionUnknown() }}{{ CompatVersionUnknown() }}{{ CompatVersionUnknown() }}{{ CompatVersionUnknown() }}
+
+ +

Vegeu també

+ + diff --git a/files/ca/web/javascript/reference/statements/break/index.html b/files/ca/web/javascript/reference/statements/break/index.html new file mode 100644 index 0000000000..d71eff620d --- /dev/null +++ b/files/ca/web/javascript/reference/statements/break/index.html @@ -0,0 +1,154 @@ +--- +title: break +slug: Web/JavaScript/Referencia/Sentencies/break +translation_of: Web/JavaScript/Reference/Statements/break +--- +
{{jsSidebar("Statements")}}
+ +

La sentència break acaba el bucle actual, {{jsxref("Statements/switch", "switch")}}, o una sentència {{jsxref("Statements/label", "label")}} i transfereix el control de programa a la sentència següent de la sentència acabada.

+ +

Sintaxi

+ +
break [etiqueta];
+ +
+
Etiqueta
+
Opcional. És l'identificador associat amb l'etiqueta de la sentència. Si la sentència no és un bucle o un {{jsxref("Statements/switch", "switch")}}, això és necessari.
+
+ +

Descripció

+ +

La sentència break inclou una etiqueta opcional que permet al programa sortir de la sentència etiquetada. La sentència break necessita ser imbricada dins l'etiqueta de referència. La sentència etiquetada pot ser qualsevol sentència {{jsxref("Statements/block", "block")}}, no ha de ser precedida per una sentència de bucle.

+ +

Exemples

+ +

La funció següent té una sentència break que acaba amb el bucle{{jsxref("Statements/while", "while")}} quan i és 3, per després retornar el valor 3 * x.

+ +
function testBreak(x) {
+  var i = 0;
+
+  while (i < 6) {
+    if (i == 3) {
+      break;
+    }
+    i += 1;
+  }
+
+  return i * x;
+}
+ +

El codi següent utilitza sentències break amb blocs etiquetats. Una sentència break ha de ser imbricada dins de qualsevol etiqueta que fa referència. Vegeu que inner_block és troba imbricada dins outer_block.

+ +
outer_block: {
+  inner_block: {
+    console.log('1');
+    break outer_block; // surt tan de inner_block com de outer_block
+    console.log(':-('); // es salta
+  }
+  console.log('2'); // es salta
+}
+
+ +

El codi següent també utilitza sentències break amb blocs etiquetats però cenera un Syntax Error perquè la sentència break es troba dins de block_1 però fa referència a block_2. Una sentència break ha d'estar sempre imbricada dins de l'eitqueta a la que fa referència.

+ +
block_1: {
+  console.log('1');
+  break block_2; // SyntaxError: etiqueta no trobada
+}
+
+block_2: {
+  console.log('2');
+}
+
+ +

Especificacions

+ + + + + + + + + + + + + + + + + + + + + + + + + + + + + +
EspecificacióEstatComentaris
{{SpecName('ES1')}}{{Spec2('ES1')}}Definició inicial. Versió no etiquetada.
{{SpecName('ES3')}}{{Spec2('ES3')}}versió etiquetada afegida.
{{SpecName('ES5.1', '#sec-12.8', 'Break statement')}}{{Spec2('ES5.1')}} 
{{SpecName('ES6', '#sec-break-statement', 'Break statement')}}{{Spec2('ES6')}} 
+ +

Compatibilitat amb navegadors

+ +

{{CompatibilityTable}}

+ +
+ + + + + + + + + + + + + + + + + + + +
CaracterísticaChromeFirefox (Gecko)Internet ExplorerOperaSafari
Suport bàsic{{CompatVersionUnknown}}{{CompatVersionUnknown}}{{CompatVersionUnknown}}{{CompatVersionUnknown}}{{CompatVersionUnknown}}
+
+ +
+ + + + + + + + + + + + + + + + + + + + + +
CaracterísticaAndroidChrome per AndroidFirefox Mobile (Gecko)IE MobileOpera MobileSafari Mobile
Suport bàsic{{CompatVersionUnknown}}{{CompatVersionUnknown}}{{CompatVersionUnknown}}{{CompatVersionUnknown}}{{CompatVersionUnknown}}{{CompatVersionUnknown}}
+
+ +

Vegeu també

+ + diff --git a/files/ca/web/javascript/reference/statements/continue/index.html b/files/ca/web/javascript/reference/statements/continue/index.html new file mode 100644 index 0000000000..a6928d15b7 --- /dev/null +++ b/files/ca/web/javascript/reference/statements/continue/index.html @@ -0,0 +1,199 @@ +--- +title: continue +slug: Web/JavaScript/Referencia/Sentencies/continue +translation_of: Web/JavaScript/Reference/Statements/continue +--- +
{{jsSidebar("Statements")}}
+ +

La sentència continue acaba l'execució de les sentències en la iteració actual del bucle actual o etiquetat, i continua l'execució del bucle amb la següent iteració.

+ +

Sintaxi

+ +
continue [etiqueta];
+ +
+
Etiqueta
+
Identificador associat amb l'etiqueta de la sentència.
+
+ +

Descripció

+ +

En contrast amb la sentència {{jsxref("Statements/break", "break")}} , continue no acaba l'execució del bucle: En comptes d'això,

+ + + + + +

La sentència continue pot incloure una etiqueta opcional que permet al programa saltar a la següent iteració d'una sentència d'un bucle etiquetat en comptes del bucle actual. En aquest cas, la sentència continue necessita trobar-se imbricada dins de la sentència etiquetada.

+ +

Exemples

+ +

Utilitzar continue amb while

+ +

L'exemple següent mostra un bucle{{jsxref("Statements/while", "while")}} que contè una sentència continue que s'executa quan el valor de i és 3. Així doncs, n pren els valors 1, 3, 7, i 12.

+ +
var i = 0;
+var n = 0;
+
+while (i < 5) {
+  i++;
+
+  if (i === 3) {
+    continue;
+  }
+
+  n += i;
+}
+
+ +

Utilitzar continue amb una etiqueta

+ +

En l'exemple següent, una sentència etiquetada checkiandj contè una sentència etiquetada checkj. si es troba un continue, el programa continua al començament de la sentència checkj. Cada cop que es troba continue, checkj reitera fins que la condició retorna falç. Quan es retorna falç, es completa la resta de la sentència checkiandj.

+ +

Si continue té una etiqueta de checkiandj, el programa continuarà al començament de la sentència checkiandj.

+ +

Vegeu també {{jsxref("Statements/label", "label")}}.

+ +
var i = 0;
+var j = 8;
+
+checkiandj: while (i < 4) {
+  console.log("i: " + i);
+  i += 1;
+
+  checkj: while (j > 4) {
+    console.log("j: "+ j);
+    j -= 1;
+
+    if ((j % 2) == 0)
+      continue checkj;
+    console.log(j + " is odd.");
+  }
+  console.log("i = " + i);
+  console.log("j = " + j);
+}
+
+ +

Resultat:

+ +
"i: 0"
+
+// start checkj
+"j: 8"
+"7 is odd."
+"j: 7"
+"j: 6"
+"5 is odd."
+"j: 5"
+// end checkj
+
+"i = 1"
+"j = 4"
+
+"i: 1"
+"i = 2"
+"j = 4"
+
+"i: 2"
+"i = 3"
+"j = 4"
+
+"i: 3"
+"i = 4"
+"j = 4"
+
+ +

Especificacions

+ + + + + + + + + + + + + + + + + + + + + + + + + + + + + +
EspecificacióEstatComentaris
{{SpecName('ES1')}}{{Spec2('ES1')}}Definició inicial. Versió sense etiqueta.
{{SpecName('ES3')}}{{Spec2('ES3')}}Versió amb etiqueta afegida.
{{SpecName('ES5.1', '#sec-12.7', 'Continue statement')}}{{Spec2('ES5.1')}} 
{{SpecName('ES6', '#sec-continue-statement', 'Continue statement')}}{{Spec2('ES6')}} 
+ +

Compatibilitat amb navegadors

+ +

{{CompatibilityTable}}

+ +
+ + + + + + + + + + + + + + + + + + + +
CaracterísticaChromeFirefox (Gecko)Internet ExplorerOperaSafari
Suport bàsic{{CompatVersionUnknown}}{{CompatVersionUnknown}}{{CompatVersionUnknown}}{{CompatVersionUnknown}}{{CompatVersionUnknown}}
+
+ +
+ + + + + + + + + + + + + + + + + + + + + +
CaracterísticaAndroidChrome per AndroidFirefox Mobile (Gecko)IE MobileOpera MobileSafari Mobile
Suport bàsic{{CompatVersionUnknown}}{{CompatVersionUnknown}}{{CompatVersionUnknown}}{{CompatVersionUnknown}}{{CompatVersionUnknown}}{{CompatVersionUnknown}}
+
+ +

Vegeu també

+ + diff --git a/files/ca/web/javascript/reference/statements/debugger/index.html b/files/ca/web/javascript/reference/statements/debugger/index.html new file mode 100644 index 0000000000..54d8d02e3d --- /dev/null +++ b/files/ca/web/javascript/reference/statements/debugger/index.html @@ -0,0 +1,116 @@ +--- +title: debugger +slug: Web/JavaScript/Referencia/Sentencies/debugger +translation_of: Web/JavaScript/Reference/Statements/debugger +--- +
{{jsSidebar("Statements")}}
+ +

La sentència debugger invoca qualsevol funcionalitat de depuració disponible, com l'establiment d'un breakpoint (punt de ruptura). Si no hi ha cap funcionalitat de depuració disponible, aquesta sentència queda sense efecte.

+ +

Sintaxi

+ +
debugger;
+ +

Exemples

+ +

L'exemple següent mostra un codi on s'ha insertat una sentència de depuració, de forma que es crida un debugger (si existeix) quan es crida la funció.

+ +
function potentiallyBuggyCode() {
+    debugger;
+    // codi potencialment erroni a examinar, executar pas a pas, etc.
+}
+ +

Quan es crida el debugger, s'atura l'execució a la sentència del debugger. Es com un breakpoint en la font de l'script.

+ +

Paused at a debugger statement.

+ +

Especificacions

+ + + + + + + + + + + + + + + + + + + + + + + + + + + + + +
EspecificacióEstatComentaris
{{SpecName('ES6', '#sec-debugger-statement', 'Debugger statement')}}{{Spec2('ES6')}} 
{{SpecName('ES5.1', '#sec-12.15', 'Debugger statement')}}{{Spec2('ES5.1')}}Definició inicial
{{SpecName('ES3', '#sec-7.5.3', 'Debugger statement')}}{{Spec2('ES3')}} 
{{SpecName('ES1', '#sec-7.4.3', 'Debugger statement')}}{{Spec2('ES1')}}Només mencionat com a paraula reservada.
+ +

Compatibilitat amb navegadors

+ +

{{CompatibilityTable}}

+ +
+ + + + + + + + + + + + + + + + + + + +
CaracterísticaChromeFirefox (Gecko)Internet ExplorerOperaSafari
Suport bàsic{{CompatVersionUnknown}}{{CompatVersionUnknown}}{{CompatVersionUnknown}}{{CompatVersionUnknown}}{{CompatVersionUnknown}}
+
+ +
+ + + + + + + + + + + + + + + + + + + + + +
CaracterísticaAndroidChrome per AndroidFirefox Mobile (Gecko)IE MobileOpera MobileSafari Mobile
Suport bàsic{{CompatVersionUnknown}}{{CompatVersionUnknown}}{{CompatVersionUnknown}}{{CompatVersionUnknown}}{{CompatVersionUnknown}}{{CompatVersionUnknown}}
+
+ +

Vegeu també

+ + diff --git a/files/ca/web/javascript/reference/statements/do...while/index.html b/files/ca/web/javascript/reference/statements/do...while/index.html new file mode 100644 index 0000000000..88f221f83d --- /dev/null +++ b/files/ca/web/javascript/reference/statements/do...while/index.html @@ -0,0 +1,124 @@ +--- +title: do...while +slug: Web/JavaScript/Referencia/Sentencies/do...while +translation_of: Web/JavaScript/Reference/Statements/do...while +--- +
{{jsSidebar("Statements")}}
+ +

La sentència do...while crea un bucle que executa una sentència especificada fins que la condició avalui a fals. La condició s'avalua després de la sentència, donant lloc a l'execució de la sentència especificada almenys un cop.

+ +

Sintaxi

+ +
do
+   sentència
+while (condició);
+
+ +
+
sentència
+
Una sentència que s'executa almenys un cop i que es torna a executar cada cop que la condició avalui a certa. Per executar múltiples sentències dins d'un bucle, utilitzeu una sentència {{jsxref("Statements/block", "block")}} ({ ... }) per agrupar aquestes sentències.
+
+ +
+
condició
+
Una expressió que s'avalua després de cada volta del bucle. si condició avalua a certa, la sentència es torna a executar. Quan la condició avalua a falç, control passa a la següent sentència que segueix el do...while.
+
+ +

Exemples

+ +

Utilitzar el do...while

+ +

En l'exemple següent, el bucle do...while itera almenys un cop i torna a iterar fins que i deixa de ser més petit que 5.

+ +
var i = 0;
+do {
+   i += 1;
+   console.log(i);
+} while (i < 5);
+
+ +

Especificacions

+ + + + + + + + + + + + + + + + + + + + + + + + +
EspecificacióEstatComentaris
{{SpecName('ES3')}}{{Spec2('ES3')}}Definició inicial. Implementat en JavaScript 1.2
{{SpecName('ES5.1', '#sec-12.6.1', 'do-while statement')}}{{Spec2('ES5.1')}} 
{{SpecName('ES6', '#sec-do-while-statement', 'do-while statement')}}{{Spec2('ES6')}}Trailing ; ara és opcional.
+ +

Browser compatibility

+ +

{{CompatibilityTable}}

+ +
+ + + + + + + + + + + + + + + + + + + +
CaracterísticaChromeFirefox (Gecko)Internet ExplorerOperaSafari
Suport bàsic{{CompatVersionUnknown}}{{CompatVersionUnknown}}6{{CompatVersionUnknown}}{{CompatVersionUnknown}}
+
+ +
+ + + + + + + + + + + + + + + + + + + + + +
CaracterísticaAndroidChrome per AndroidFirefox Mobile (Gecko)IE MobileOpera MobileSafari Mobile
Suport bàsic{{CompatVersionUnknown}}{{CompatVersionUnknown}}{{CompatVersionUnknown}}{{CompatVersionUnknown}}{{CompatVersionUnknown}}{{CompatVersionUnknown}}
+
+ +

Vegeu també

+ + diff --git a/files/ca/web/javascript/reference/statements/empty/index.html b/files/ca/web/javascript/reference/statements/empty/index.html new file mode 100644 index 0000000000..6800d476f8 --- /dev/null +++ b/files/ca/web/javascript/reference/statements/empty/index.html @@ -0,0 +1,138 @@ +--- +title: Buida +slug: Web/JavaScript/Referencia/Sentencies/Buida +translation_of: Web/JavaScript/Reference/Statements/Empty +--- +
+
{{jsSidebar("Statements")}}
+
+ +

Resum

+ +

Una sentència buida es fa servir per no proveïr cap sentència, encara que la sintaxi de JavaScript n'esperaria una.

+ +

Sintaxi

+ +
;
+
+ +

Descripció

+ +

La sentència buida és un punt i coma (;) que indica que cap sentència s'executarà, encara que la sintaxi de JavaScript en requereixi una. Pel contrari, quan es vol realitzar múltiples sentències, però JavaScript només en permet un, és possible realitzar-ho mitjançant l'ús d'una sentència de block; que combina diverses sentències en una única sentència.

+ +

Exemples

+ +

La sentència buida sovint s'utilitza amb sentències de bucles. Vegeu l'exemple segúent amb el cos del bucle buit:

+ +
var arr = [1, 2, 3];
+
+// Assign all array values to 0
+for (i = 0; i < arr.length; arr[i++] = 0) /* empty statement */ ;
+
+console.log(arr)
+// [0, 0, 0]
+
+ +

Nota: És una bona idea comentar l'ús intencional de la sentència buida, ja que no és fa molt obvi diferenciar-lo d'un punt i coma normal. En el següent exemple l'ús probablement no és intencional:

+ +
if (condition);       // Caution, this "if" does nothing!
+   killTheUniverse()  // So this gets always executed!!!
+
+ +

Un altre exemple: Una sentència if...else sense claus ({}). Si tres és cert, no passarà res, four does not matter, ni tampoc s'executarà la funció launchRocket() en el cas else.

+ +
if (one)
+  doOne();
+else if (two)
+  doTwo();
+else if (three)
+  ; // nothing here
+else if (four)
+  doFour();
+else
+  launchRocket();
+ +

Especificacions

+ + + + + + + + + + + + + + + + + + + + + + + + +
EspecificacióEstatComentaris
1a edició de ECMAScript.EstàndardDefinició inicial.
{{SpecName('ES5.1', '#sec-12.3', 'Empty statement')}}{{Spec2('ES5.1')}} 
{{SpecName('ES6', '#sec-empty-statement', 'Empty statement')}}{{Spec2('ES6')}} 
+ +

Compatibilitat amb navegadors

+ +

{{ CompatibilityTable() }}

+ +
+ + + + + + + + + + + + + + + + + + + +
CaracterísticaChromeFirefox (Gecko)Internet ExplorerOperaSafari
Suport bàsic{{ CompatVersionUnknown() }}{{ CompatVersionUnknown() }}{{ CompatVersionUnknown() }}{{ CompatVersionUnknown() }}{{ CompatVersionUnknown() }}
+
+ +
+ + + + + + + + + + + + + + + + + + + + + +
CaracterísticaAndroidChrome for AndroidFirefox Mobile (Gecko)IE MobileOpera MobileSafari Mobile
Suport bàsic{{ CompatVersionUnknown() }}{{ CompatVersionUnknown() }}{{ CompatVersionUnknown() }}{{ CompatVersionUnknown() }}{{ CompatVersionUnknown() }}{{ CompatVersionUnknown() }}
+
+ +

Vegeu també

+ + diff --git a/files/ca/web/javascript/reference/statements/export/index.html b/files/ca/web/javascript/reference/statements/export/index.html new file mode 100644 index 0000000000..c1d92ab504 --- /dev/null +++ b/files/ca/web/javascript/reference/statements/export/index.html @@ -0,0 +1,158 @@ +--- +title: export +slug: Web/JavaScript/Referencia/Sentencies/export +translation_of: Web/JavaScript/Reference/Statements/export +--- +
{{jsSidebar("Statements")}}
+ +

La sentència export s'utilitza per exportar funcions, objectes o valors primitius d'un fitxer donat (o mòdul) per a que els puguin fer servir altres programes amb la sentència {{jsxref("Statements/import", "import")}}.

+ +

Els mòduls exportats estan sempre {{jsxref("Strict_mode","strict mode", "", 1)}}  tan si es declaren així com si no. La sentència export no es pot fer servir en mòduls incrustats (embedded).

+ +

Sintaxi

+ +
export nom1, nom2, ..., nomN;
+export default nom1 
+ +
+
nomN
+
Propietat, funció, o objecte que s'ha d'exportar (de manera que es pot importar a través de import en un altre script).
+
+ +

Descripció

+ +

Hi ha dos tipus diferents d'export:

+ + + +

Les exportacions amb nom són útils per exportar diversos valors. Durant la importació, un serà capaç d'utilitzar el mateix nom per referir-se al valor corresponent.

+ +

Sobre la exportació per defecte, només pot haver-n'hi una per mòdul. Una exportació per defecte pot ser una funció, una classe un objecte o qualsevol altra cosa. Aquest valor es considerarà el principal valor exportat, ja que serà el més fàcil d'importar.

+ +

Exemples

+ +

Usant les exportacions nominals

+ +

En el mòdul podem fer servir el codi següent:

+ +
// "modul.js"
+export function cub(x) {
+  return x * x * x;
+}
+const foo = Math.PI + Math.SQRT2;
+export foo;
+
+ +

Així, en un altre mòdul podem tenir:

+ +
import { cub, foo } from 'modul.js';
+console.log(cub(3)); // 9
+console.log(foo);    // 4.555806215962888
+ +

Usant l'exportació per defecte

+ +

Si volem exportar un únic valor o tenir un valor per defecte per al nostre mòdul podem fer::

+ +
// "modul.js"
+var function cub(x) {
+  return x * x * x;
+}
+export default cub;
+ +

Així, en un altre mòdul podem importar directament:

+ +
import laFuncio from 'modul';
+console.log(laFuncio(3)); // 9
+
+ +

Especificacions

+ + + + + + + + + + + + + + +
EspecificacióEstatComentaris
{{SpecName('ES6', '#sec-imports', 'Imports')}}{{Spec2('ES6')}}Definició inicial
+ +

Compatibilitat amb navegadors

+ +

{{CompatibilityTable}}

+ +
+ + + + + + + + + + + + + + + + + + + +
CaracterísticaChromeFirefox (Gecko)Internet ExplorerOperaSafari
Suport bàsic{{CompatNo}}{{CompatNo}}{{CompatNo}}{{CompatNo}}{{CompatNo}}
+
+ +
+ + + + + + + + + + + + + + + + + + + + + +
CaracterísticaAndroidChrome per AndroidFirefox Mobile (Gecko)IE MobileOpera MobileSafari Mobile
Suport bàsic{{CompatNo}}{{CompatNo}}{{CompatNo}}{{CompatNo}}{{CompatNo}}{{CompatNo}}
+
+ +

Vegeu també

+ + diff --git a/files/ca/web/javascript/reference/statements/for...of/index.html b/files/ca/web/javascript/reference/statements/for...of/index.html new file mode 100644 index 0000000000..5cc16f52f8 --- /dev/null +++ b/files/ca/web/javascript/reference/statements/for...of/index.html @@ -0,0 +1,181 @@ +--- +title: for...of +slug: Web/JavaScript/Referencia/Sentencies/for...of +translation_of: Web/JavaScript/Reference/Statements/for...of +--- +
+
{{jsSidebar("Statements")}}
+
+ +

Resum

+ +

La instrucció for...of crea un bucle que itera sobre objectes iterables (incloent {{jsxref("Array")}}, {{jsxref("Map")}}, {{jsxref("Set")}}, l'objecte arguments, etcètera), tot invocant un bloc de codi amb les instruccions a executar per a cada valor de la propietat.

+ +

Sintaxi

+ +
for (variable of objecte)
+  codi
+
+ +
+
variable
+
A cada iteració el valor d'una propietat diferent és asignat a variable.
+
objecte
+
L'objecte del qual s'iteren les propietats, que són iterables.
+
+ +

Exemples

+ +

Diferència entre for...of i for...in

+ +

El següent exemple mostra la diferència entre el bucle for...of i el bucle for...in. Mentre for...in itera sobre noms de propietats, for...of itera sobre els valors de les propietats:

+ +
let arr = [3, 5, 7];
+arr.foo = "hola";
+
+for (let i in arr) {
+   console.log(i); // mostra "0", "1", "2", "foo"
+}
+
+for (let i of arr) {
+   console.log(i); // mostra "3", "5", "7"
+}
+
+ +

Ús de Array.prototype.forEach()

+ +

Per a aconseguir els mateixos valors que s'obtenen amb for...of també es pot utilitzar el mètode {{jsxref("Array.prototype.forEach()")}}:

+ +
let arr = [3, 5, 7];
+arr.foo = "hola";
+
+arr.forEach(function (element, index) {
+    console.log(element); // mostra "3", "5", "7"
+    console.log(index);   // mostra "0", "1", "2"
+});
+
+// or with Object.keys()
+
+Object.keys(arr).forEach(function (element, index) {
+    console.log(arr[element]); // mostra "3", "5", "7", "hello"
+    console.log(arr[index]);   // mostra "3", "5", "7"
+});
+ +

Iteració de coleccions del DOM

+ +

Iterant sobre coleccions del DOM com {{domxref("NodeList")}}: el següent exemple afegeix la classe read als paràgrafs que són descendens directes d'un article:

+ +
// Nota: Això només funcionarà en plataformes que
+// implementen NodeList.prototype[Symbol.iterator]
+let articleParagraphs = document.querySelectorAll("article > p");
+
+for (let paragraph of articleParagraphs) {
+  paragraph.classList.add("read");
+}
+
+ +

Iteració de generadors:

+ +

Els generadors també són iterables:

+ +
function* fibonacci() { // una funció generadora
+    let [prev, curr] = [0, 1];
+    for (;;) {
+        [prev, curr] = [curr, prev + curr];
+        yield curr;
+    }
+}
+
+for (let n of fibonacci()) {
+    // trunca la seqüència als 1000
+    if (n > 1000)
+        break;
+    print(n);
+}
+
+ +

Especificacions

+ + + + + + + + + + + + + + +
EspecificacióEstatComentari
{{SpecName('ES6', '#sec-for-in-and-for-of-statements', 'for...of statement')}}{{Spec2('ES6')}}Definició inicial.
+ +

Compatibilitat amb navegadors

+ +

{{CompatibilityTable()}}

+ +
+ + + + + + + + + + + + + + + + + + + +
CaracterísticaChromeFirefox (Gecko)Internet ExplorerOperaSafari
Suport bàsic{{CompatChrome(29)}}[1]
+ {{CompatChrome(38)}}
{{CompatGeckoDesktop("13")}}
+ {{CompatGeckoDesktop("17")}} (.iterator)
+ {{CompatGeckoDesktop("27")}} ("@@iterator")
+ {{CompatGeckoDesktop("36")}} (Symbol.iterator)
{{CompatNo}}257.1
+
+ +
+ + + + + + + + + + + + + + + + + + + + + +
CaracterísticaAndroidChrome for AndroidFirefox Mobile (Gecko)IE MobileOpera MobileSafari Mobile
Suport bàsic{{CompatUnknown}}{{CompatChrome(29)}}[1]
+ {{CompatChrome(38)}}
{{CompatGeckoMobile("13")}}
+ {{CompatGeckoMobile("17")}} (.iterator)
+ {{CompatGeckoMobile("27")}} ("@@iterator")
+ {{CompatGeckoMobile("36")}} (Symbol.iterator)
{{CompatUnknown}}{{CompatUnknown}}iOS 8
+
+ +

[1] La característica està disponible sota una preferència. A chrome://flags/#enable-javascript-harmony, activar la entrada “Enable Experimental JavaScript”.

+ +

Vegeu també

+ + diff --git a/files/ca/web/javascript/reference/statements/for/index.html b/files/ca/web/javascript/reference/statements/for/index.html new file mode 100644 index 0000000000..00a16b62df --- /dev/null +++ b/files/ca/web/javascript/reference/statements/for/index.html @@ -0,0 +1,190 @@ +--- +title: for +slug: Web/JavaScript/Referencia/Sentencies/for +translation_of: Web/JavaScript/Reference/Statements/for +--- +
+
{{jsSidebar("Statements")}}
+
+ +

Resum

+ +

La sentència for crea un bucle que consta de tres expressions opcionals, embolcallades entre paràntesis i separades per punts i comes, seguits d'una sentència o un grup de sentències executades en el bucle.

+ +

Sintaxi

+ +
for ([inicialització]; [condició]; [expressió final])
+   sentència
+
+ +
+
inicialització
+
Una expressió (incloent expressions d'assignació) o declaració de variables. Normalment s'usa per inicialitzar una variable al contador. Opcionalment aquesta expressió pot declarar noves variables amb la paraula clau var.  Aquestes variables no sóc locals pel bucle, és a dir, es troben en el mateix àmbit en que es troba el bucle for. El resultat d'aquesta expressió es descarta.
+
condició
+
Una expressió que s'avalua abans de cada iteració del bucle. Si aquesta expressió s'avalua true, s'executa la sentència. Aquesta prova condicional és opcional. Si s'omet, la condició sempre avalua true. Si l'expressió avalua a false, l'execució salta a la primera expressió que es trobi després del constructe for.
+
Expressió final
+
Una expressió per ser avaluada al final de cada iteració del bucle. Això passa abans de la següent avaluació de condició. Generalment s'usa per actualitzar o incrementar la variable contador.
+
sentència
+
Una sentència que s'executa mentre la condició avalui a true. Per executar múltiples sentències dins el bucle, utilitzeu una sentència block ({ ... }) per agrupar aquestes sentències. Per no executar cap sentència dins el bucle, utilitzeu una sentència buida  (;).
+
+ +

Exemples

+ +

Exemple: Fer servir for

+ +

La següent sentència for comença declarant la variable i i l'inicialitza a 0. Comprova que  i és menor que nou, realitza les dues sentències següents, i incrementa i per 1 després de cada pas pel bucle.

+ +
for (var i = 0; i < 9; i++) {
+   console.log(i);
+   // more statements
+}
+
+ +

Exemple: Expressions for opcionals

+ +

Les tres expressions en la capçalera del bucle for són opcionals.

+ +

Per exemple, enel bloc d'inicialització no es requereix inicialitzar les variablesblock it is not required to initialize variables:

+ +
var i = 0;
+for (; i < 9; i++) {
+    console.log(i);
+    // more statements
+}
+
+ +

Com el bloc d'inicialització, el bloc de condició també és opcional. Si s'omet aquesta expressió, s'ha de d'assegurar de trencar el bucle en el cos per evitar crear un bucle infinit.

+ +
for (var i = 0;; i++) {
+   console.log(i);
+   if (i > 3) break;
+   // more statements
+}
+ +

També es pot ometre els tres blocs. Un alre cop, assegureu-vos de fer servir la sentència break per finalitzar el bucle i també modificar (incrementar) una variable, de forma que la condició per la sentència break esdevé certa en algun moment determinat.

+ +
var i = 0;
+
+for (;;) {
+  if (i > 3) break;
+  console.log(i);
+  i++;
+}
+
+ +

Exemple: Fer servir for amb una sentència buida

+ +

El cicle for següent callcula la possició de desplaçament d'un node en la secció  [expressió final], i per tant no requereix l'ús d'una sentència o secció de sentències block, es fa servir una sentència buida en el seu lloc.

+ +
function showOffsetPos (sId) {
+  var nLeft = 0, nTop = 0;
+
+  for (var oItNode = document.getElementById(sId); // initialization
+       oItNode; // condition
+       nLeft += oItNode.offsetLeft, nTop += oItNode.offsetTop, oItNode = oItNode.offsetParent) // final-expression
+       /* empty statement */ ;
+
+  console.log("Offset position of \"" + sId + "\" element:\n left: " + nLeft + "px;\n top: " + nTop + "px;");
+}
+
+// Example call:
+
+showOffsetPos("content");
+
+// Output:
+// "Offset position of "content" element:
+// left: 0px;
+// top: 153px;"
+ +
Nota: En aquest cas, quan no es fa servir la secció sentència, es fica un punt i coma immediatament despres de la declaració del cicle.
+ +

Especificacions

+ + + + + + + + + + + + + + + + + + + + + + + + +
EspecificacióEstatComentaris
1a edició de ECMAScript.EstàndardDefinició inicial.
{{SpecName('ES5.1', '#sec-12.6.3', 'for statement')}}{{Spec2('ES5.1')}} 
{{SpecName('ES6', '#sec-for-statement', 'for statement')}}{{Spec2('ES6')}} 
+ +

Compatibilitat amb navegadors

+ +

{{ CompatibilityTable() }}

+ +
+ + + + + + + + + + + + + + + + + + + +
CaracterísticaChromeFirefox (Gecko)Internet ExplorerOperaSafari
Suport bàsic{{ CompatVersionUnknown() }}{{ CompatVersionUnknown() }}{{ CompatVersionUnknown() }}{{ CompatVersionUnknown() }}{{ CompatVersionUnknown() }}
+
+ +
+ + + + + + + + + + + + + + + + + + + + + +
CaracterísticaAndroidChrome for AndroidFirefox Mobile (Gecko)IE MobileOpera MobileSafari Mobile
Suport bàsic{{ CompatVersionUnknown() }}{{ CompatVersionUnknown() }}{{ CompatVersionUnknown() }}{{ CompatVersionUnknown() }}{{ CompatVersionUnknown() }}{{ CompatVersionUnknown() }}
+
+ +

Vegeu també

+ + diff --git a/files/ca/web/javascript/reference/statements/function/index.html b/files/ca/web/javascript/reference/statements/function/index.html new file mode 100644 index 0000000000..37deff748f --- /dev/null +++ b/files/ca/web/javascript/reference/statements/function/index.html @@ -0,0 +1,171 @@ +--- +title: function +slug: Web/JavaScript/Referencia/Sentencies/function +translation_of: Web/JavaScript/Reference/Statements/function +--- +
+
{{jsSidebar("Statements")}}
+
+ +

Resum

+ +

La declaració d'una funció defineix una funció amb uns paràmetres especificats.

+ +
+

També podeu definir funcions fent servir el constructor {{jsxref("Function")}} i un {{jsxref("Operators/function", "function expression")}}.

+
+ +

Sintaxi

+ +
function nom([paràm,[, paràm,[..., paràm]]]) {
+   [sentències]
+}
+
+ +
+
nom
+
El nom de la funció.
+
+ +
+
paràm
+
El nom d'un argument que se li passarà a la funció. Una funció pot arribar a tenir fins a 255 arguments.
+
+ +
+
sentències
+
Les sentències que comprenen el cos de la funció.
+
+ +

Descripció

+ +

Una funció creada amb una declaració d'una funció és un objecte Function i té totes les propietats, mètodes i comportament dels objectes Function. Vegeu {{jsxref("Function")}} per informació detallada sobre funcions.

+ +

Una funció també es pot crear fent servir una expressió (vegeu {{jsxref("Operators/function", "function expression")}}).

+ +

Per defecte, les funcions retornen undefined. Per tal de retornar qualsevol altre valor, la funció ha de tenir una sentència {{jsxref("Statements/return", "return")}} que especifiqui el valor que retorna.

+ +

Funcions creades de forma condicional

+ +

Les funcions poden ser declarades de forma condicional, és a dir, una sentència d'una funció pot estar aniuada dins d'una sentència if. La majoria de navegadors que no siguin Mozilla tractaran aquestes declaracions condicionals com a declaracions incondicionals i crearàn la funció tant si la condició és vertadera o falsa, vegeu aquest article per una visió general. Per tant, no s'haurien de fer servir, per creacions condicionals feu servir expressions de funcions.

+ +

Declarar les funcions abans de definir-les (hosting)

+ +

Function declarations in JavaScript are hoisting the function definition. En Javascript es pot ser cridar una funció abans de declarar-la. En anglès existeix un ver:

+ +
hoisted(); // logs "foo"
+
+function hoisted() {
+  console.log("foo");
+}
+
+ +

Vegeu que {{jsxref("Operators/function", "function expressions")}} no estan hoisted:

+ +
notHoisted(); // TypeError: notHoisted is not a function
+
+var notHoisted = function() {
+   console.log("bar");
+};
+
+ +

Exemples

+ +

Exemple: Fer servir function

+ +

El codi següent declara una funció que retorna la quantitat total de vendes, quan se li dóna el nombre d'unitat venudes d' a, b, i c.

+ +
function calc_sales(units_a, units_b, units_c) {
+   return units_a*79 + units_b * 129 + units_c * 699;
+}
+
+ +

Especificacions

+ + + + + + + + + + + + + + + + + + + + + + + + +
EspecificacióEstatComentaris
1a edició de ECMAScript.EstàndardDefinició iniciañ. Implementat en JavaScript 1.0
{{SpecName('ES5.1', '#sec-13', 'Function definition')}}{{Spec2('ES5.1')}} 
{{SpecName('ES6', '#sec-function-definitions', 'Function definitions')}}{{Spec2('ES6')}} 
+ +

Compatibilitat amb navegadors

+ +

{{ CompatibilityTable() }}

+ +
+ + + + + + + + + + + + + + + + + + + +
CaracterísticaChromeFirefox (Gecko)Internet ExplorerOperaSafari
Suport bàsic{{ CompatVersionUnknown() }}{{ CompatVersionUnknown() }}{{ CompatVersionUnknown() }}{{ CompatVersionUnknown() }}{{ CompatVersionUnknown() }}
+
+ +
+ + + + + + + + + + + + + + + + + + + + + +
CaracterísticaAndroidChrome per AndroidFirefox Mobile (Gecko)IE MobileOpera MobileSafari Mobile
Suport bàsic{{ CompatVersionUnknown() }}{{ CompatVersionUnknown() }}{{ CompatVersionUnknown() }}{{ CompatVersionUnknown() }}{{ CompatVersionUnknown() }}{{ CompatVersionUnknown() }}
+
+ +

Vegeu també

+ + diff --git a/files/ca/web/javascript/reference/statements/if...else/index.html b/files/ca/web/javascript/reference/statements/if...else/index.html new file mode 100644 index 0000000000..b45e9bea3c --- /dev/null +++ b/files/ca/web/javascript/reference/statements/if...else/index.html @@ -0,0 +1,203 @@ +--- +title: if...else +slug: Web/JavaScript/Referencia/Sentencies/if...else +translation_of: Web/JavaScript/Reference/Statements/if...else +--- +
+
{{jsSidebar("Statements")}}
+
+ +

Resum

+ +

La sentència if executa una sentència si una condició especificada és certa. Si la condició és falsa, opcionalment s'executa una declaració diferent.

+ +

Sintaxi

+ +
if (condició)
+   sentència1
+[else
+   sentència2]
+
+ +
+
condició
+
Una expressió que esdevé o certa o falsa.
+
+ +
+
sentència1
+
És la sentència que s'executa si la condició esdevé certa. Pot ser qualsevol declaració, incloent més sentències if aniuades. Per executar múltimples sentències, es fa servir una sentència block ({ ... }) per agrupar aquestes sentències, si no es vol executar cap sentència, es fa servir una sentència buida.
+
+ +
+
sentència2
+
La sentència que s'executa si la condition esdevé falsa i hi ha la clàusula else. Pot ser qualsevol sentència, incloent sentències en block i més sentències if aniuades.
+
+ +

Descripció

+ +

Múltiples sentències if...else poden aniuar-se per crear una clàusula else if. Fixeu-vos que no hi ha la paraula clau elseif (en una paraula) en JavaScript.

+ +
if (condició1)
+   sentència1
+else if (condició2)
+   sentència2
+else if (condició3)
+   sentència3
+...
+else
+   sentènciaN
+
+ +

Per veure com funciona, així es com es veuria amb l'aniuament degudament indentat.

+ +
if (condició1)
+   sentència1
+else
+   if (condició2)
+      sentència2
+   else
+      if (condició3)
+...
+
+ +

Per executar múltiples sentències dins una clàusula, utilitzeu una sentència block ({ ... }) per agrupar aquestes sentències. En general, és una bona pràctica utilitzar sempre sentències de block, especialment en codi que inclogui sentències if aniuades:

+ +
if (condició) {
+   sentència1
+} else {
+   sentència2
+}
+
+ +

No confongueu els valors booleans primitius true i false amb els valors cert i fals de l'objecte Boolean. Qualsevol valor que no sigui undefined, null, 0, NaN, o una cadena buida (""), i qualsevol objecte, incloent un objecte Boolean que tingui el valor fals, esdevé cert quan es passa a una sentència condicional. Per exemple:

+ +
var b = new Boolean(false);
+if (b) // this condition evaluates to true
+
+ +

Exemples

+ +

Exemple: Fer servir if...else

+ +
if (cipher_char === from_char) {
+   result = result + to_char;
+   x++;
+} else {
+   result = result + clear_char;
+}
+
+ +

Exemple: Fer servir else if

+ +

Vegeu que no hi ha cap sintaxi elseif en JavaScript. Tanmateix, es pot escriure amb un espai entre else i if:

+ +
if (x > 5) {
+
+} else if (x > 50) {
+
+} else {
+
+}
+ +

Exemple: Assignació dins l'expressió condicional

+ +

És recomanable no utilitzar assignacions simples en una expressió condicional, atès que l'assignació es pot confondre amb l'igualtat quan es mira per sobre el codi. Per exemple, no utilitzeu el codi següent:

+ +
if (x = y) {
+   /* do the right thing */
+}
+
+ +

Si necessiteu usar una assignació dins d'una expressió condicional, una pràctica comuna és ficar parèntesis addicionals embolcallant l'assignació. Per exemple:

+ +
if ((x = y)) {
+   /* do the right thing */
+}
+
+ +

Especificacions

+ + + + + + + + + + + + + + + + + + + + + + + + +
EspecificacóEstatComentaris
1a edició de ECMAScript.EstàndardDefinció inicial.
{{SpecName('ES5.1', '#sec-12.5', 'if statement')}}{{Spec2('ES5.1')}} 
{{SpecName('ES6', '#sec-if-statement', 'if statement')}}{{Spec2('ES6')}} 
+ +

Compatibilitat amb navegadors

+ +

{{ CompatibilityTable() }}

+ +
+ + + + + + + + + + + + + + + + + + + +
CaracterísticaChromeFirefox (Gecko)Internet ExplorerOperaSafari
Suport bàsic{{ CompatVersionUnknown() }}{{ CompatVersionUnknown() }}{{ CompatVersionUnknown() }}{{ CompatVersionUnknown() }}{{ CompatVersionUnknown() }}
+
+ +
+ + + + + + + + + + + + + + + + + + + + + +
CaracterísticaAndroidChrome for AndroidFirefox Mobile (Gecko)IE MobileOpera MobileSafari Mobile
Suport bàsic{{ CompatVersionUnknown() }}{{ CompatVersionUnknown() }}{{ CompatVersionUnknown() }}{{ CompatVersionUnknown() }}{{ CompatVersionUnknown() }}{{ CompatVersionUnknown() }}
+
+ +

Vegeu també

+ + diff --git a/files/ca/web/javascript/reference/statements/index.html b/files/ca/web/javascript/reference/statements/index.html new file mode 100644 index 0000000000..e91e446cbf --- /dev/null +++ b/files/ca/web/javascript/reference/statements/index.html @@ -0,0 +1,129 @@ +--- +title: Statements and declarations +slug: Web/JavaScript/Referencia/Sentencies +tags: + - JavaScript + - NeedsTranslation + - Reference + - TopicStub + - statements +translation_of: Web/JavaScript/Reference/Statements +--- +
{{jsSidebar("Statements")}}
+ +

Les aplicacions de JavaScript consisteixen en sentències amb una sintaxi adequada. Una sola sentència pot ocupar múltiples línies. Múltiples sentències poden donar-se en una sola línia si cada sentència és separada per un punt i coma. Això no és una paraula clau sino un grup de paraules claus.

+ +

Sentències i declaracions per categoria

+ +

Per a un llistat alfabetic vegeu el menú de l'esquerra.

+ +

Control de fluxe

+ +
+
{{jsxref("Sentencies/block", "Block")}}
+
Una sentència bloc s'utilitza per a agrupar zero o més sentències. El bloc és delimitat per un parell de claus {}.
+
{{jsxref("Sentencies/break", "break")}}
+
Acaba la sentència bucle, switch o label actual i transfereix el control del programa a la sentència que segueix la sentència que tot just s'ha acabat.
+
{{jsxref("Sentencies/continue", "continue")}}
+
Acaba l'execució de les sentències de la iteració del bucle actual o bé del bucle especificat, i continua l'execució del bucle amb la següent iteració.
+
{{jsxref("Sentencies/Empty", "Empty")}}
+
Una sentència buida s'utilitza per a proporcionar una sentència que no fa res quan JavaScript espera una sentència però no se'n necesita executar cap.
+
{{jsxref("Sentencies/if...else", "if...else")}}
+
Executa una sentència si la condició especificada és certa. Si la condició és falsa una altra sentència pot ser executada.
+
{{jsxref("Sentencies/switch", "switch")}}
+
Evalua una expressió, compara el resultat de l'evaluació amb una clàusula de tipus case i executa la sentència pertanyent a la clàusula case que és igual a l'evaluació de l'expressió.
+
{{jsxref("Sentencies/throw", "throw")}}
+
Llença una excepció definida per l'usuari.
+
{{jsxref("Sentencies/try...catch", "try...catch")}}
+
Executa un bloc de sentències i, en cas que alguna sentència del bloc llenci una excepció, executa una sentència alternativa.
+
+ +

Declaracions

+ +
+
{{jsxref("Sentencies/var", "var")}}
+
Declara una variable, opcionalment li assigna un valor.
+
{{experimental_inline()}} {{jsxref("Sentencies/let", "let")}}
+
Declara un bloc de variables d'àmbit local, opcionalment li assigna un valor.
+
{{experimental_inline()}} {{jsxref("Sentencies/const", "const")}}
+
Declara una constant de només lectura.
+
+ +

Funcions

+ +
+
{{jsxref("Sentencies/function", "function")}}
+
Declara una funció amb els paràmetres especificats.
+
{{experimental_inline()}} {{jsxref("Sentencies/function*", "function*")}}
+
Funcions generadores que permeten escriure iteradors de forma més senzilla.
+
{{jsxref("Sentencies/return", "return")}}
+
Especifica el valor que retornarà una funció.
+
+ +

Iteracions

+ +
+
{{jsxref("Sentencies/do...while", "do...while")}}
+
Crea un bucle que executa una sentència especificada fins que la condició de test s'evalua a fals. La condició s'evalua després d'executar la sentència, resultant en que la sentència especificada s'executa al menys un cop.
+
{{jsxref("Sentencies/for", "for")}}
+
Crea un bucle que sonsisteix en tres expressions opcionals embolcallades per parèntesi i separades per punts i coma, seguides d'una sentència que s'executarà en el bucle.
+
{{deprecated_inline()}} {{non-standard_inline()}} {{jsxref("Sentencies/for_each...in", "for each...in")}}
+
Itera sobre tots els valors de les propietats d'un objecte, assignant a una variable determinada el seu valor. Per a cada propietat distinta s'executa una sentència.
+
{{jsxref("Sentencies/for...in", "for...in")}}
+
Itera sobre les propietats enumerables d'un objecte en un ordre arbitrari. Per a cada propietat distinta s'executa una sentència.
+
{{experimental_inline()}} {{jsxref("Sentencies/for...of", "for...of")}}
+
Itera sobre objectes iterables (incloent arrays, objectes similar a arrays, iteradors i generadors), executant una sentència per al valor de cada propietat distinta.
+
{{jsxref("Sentencies/while", "while")}}
+
Crea un bucle que executa la sentència donada mentre una condició sigui certa. La condició s'evalua abans d'executar la sentència.
+
+ +

Altres

+ +
+
{{jsxref("Sentencies/debugger", "debugger")}}
+
Invoca qualsevol funcionalitat de depuració que estigui disponible. Si no hi ha cap funcionalitat de depuració disponible aquesta sentència no te cap efecte.
+
{{experimental_inline()}} {{jsxref("Sentencies/export", "export")}}
+
Utilitzada per a exportar funcions per a que aquestes estiguin disponibles per a imports a mòduls externs, en altres scripts.
+
{{experimental_inline()}} {{jsxref("Sentencies/import", "import")}}
+
Utilitzada per a importar funcions exportades d'un mòdul extern, un altre script.
+
{{jsxref("Sentencies/label", "label")}}
+
Asigna un identificador a una sentència. Aquest identificador pot ser emprat en sentències break o continue.
+
+ +
+
{{deprecated_inline()}} {{jsxref("Sentencies/with", "with")}}
+
Extèn la cadena d'àmbit per a una sentència.
+
+ +

Especificacions

+ + + + + + + + + + + + + + + + + + + + + + + + +
EspecificacióEstatComentari
ECMAScript 1a EdicióStandardDefinició inicial.
{{SpecName('ES5.1', '#sec-12', 'Statements')}}{{Spec2('ES5.1')}} 
{{SpecName('ES6', '#sec-ecmascript-language-statements-and-declarations', 'Llenguatge ECMAScript: Sentències i declaracions')}}{{Spec2('ES6')}}Nou: function*, let, for...of, yield
+ +

Vegeu també

+ + diff --git a/files/ca/web/javascript/reference/statements/return/index.html b/files/ca/web/javascript/reference/statements/return/index.html new file mode 100644 index 0000000000..5b3c3e902a --- /dev/null +++ b/files/ca/web/javascript/reference/statements/return/index.html @@ -0,0 +1,183 @@ +--- +title: return +slug: Web/JavaScript/Referencia/Sentencies/return +translation_of: Web/JavaScript/Reference/Statements/return +--- +
+
{{jsSidebar("Statements")}}
+
+ +

Resum

+ +

La sentència return finalitza l'execució de la funció i especifica un valor que retornarà a la funció que l'ha cridat.

+ +

Sintaxi

+ +
return [[expressió]]; 
+ +
+
expressió
+
L'expressió que retorna. En cas d'ometre-s, es retorna undefined.
+
+ +

Descripció

+ +

Quan una sentència return és cridada dins una funció, l'execució d'aquesta funció s'atura. En cas d'especificar-se, un valor donat és retornat a la funció que l'ha cridat. Si s'omet l'expressió, es retornarà undefined. En les següents sentències return totes aturen l'execució de la funció:

+ +
return;
+return true;
+return false;
+return x;
+return x + y / 3;
+
+ +

Insersió automàtica de punt i coma

+ +

La sentència return es veu afectada per la insersió automàtica de punt i coma (). No hi ha cap final de línia entre la paraula clau return i l'expressió permesa.

+ +
return
+a + b;
+
+// is transformed by ASI into
+
+return;
+a + b;
+
+ +

Exemples

+ +

Exemple: Fer servir return

+ +

La següent funció retorna el quadrat del seu argument, x, on x és un nombre.

+ +
function square(x) {
+   return x * x;
+}
+
+ +

Exemple: Interrompre una funció

+ +

Una funció s'atura immediatament en el moment en que es crida return.

+ +
function counter() {
+  for (var count = 1; ; count++) {  // infinite loop
+    console.log(count + "A"); // until 5
+      if (count === 5) {
+        return;
+      }
+      console.log(count + "B");  // until 4
+    }
+  console.log(count + "C");  // never appears
+}
+
+counter();
+
+// Output:
+// 1A
+// 1B
+// 2A
+// 2B
+// 3A
+// 3B
+// 4A
+// 4B
+// 5A
+
+ +

Exemple: Returning a function

+ +

Per més informació sobre closures, llegiu la Guia de JavaScript.

+ +
function magic(x) {
+  return function calc(x) { return x * 42};
+}
+
+var answer = magic();
+answer(1337); // 56154
+
+ +

Especificacions

+ + + + + + + + + + + + + + + + + + + + + + + + +
EspecificacióEstatComentaris
1a edició de ECMAScriptEstàndardDefinició inicial.
{{SpecName('ES5.1', '#sec-12.9', 'Return statement')}}{{Spec2('ES5.1')}} 
{{SpecName('ES6', '#sec-return-statement', 'Return statement')}}{{Spec2('ES6')}} 
+ +

Compatibilitat amb navegadors

+ +

{{ CompatibilityTable() }}

+ +
+ + + + + + + + + + + + + + + + + + + +
CaracterísticaChromeFirefox (Gecko)Internet ExplorerOperaSafari
Suport bàsic{{ CompatVersionUnknown() }}{{ CompatVersionUnknown() }}{{ CompatVersionUnknown() }}{{ CompatVersionUnknown() }}{{ CompatVersionUnknown() }}
+
+ +
+ + + + + + + + + + + + + + + + + + + + + +
CaracterísticaAndroidChrome per AndroidFirefox Mobile (Gecko)IE MobileOpera MobileSafari Mobile
Suport bàsic{{ CompatVersionUnknown() }}{{ CompatVersionUnknown() }}{{ CompatVersionUnknown() }}{{ CompatVersionUnknown() }}{{ CompatVersionUnknown() }}{{ CompatVersionUnknown() }}
+
+ +

Vegeu també

+ + diff --git a/files/ca/web/javascript/reference/statements/throw/index.html b/files/ca/web/javascript/reference/statements/throw/index.html new file mode 100644 index 0000000000..37d13b964b --- /dev/null +++ b/files/ca/web/javascript/reference/statements/throw/index.html @@ -0,0 +1,228 @@ +--- +title: throw +slug: Web/JavaScript/Referencia/Sentencies/throw +translation_of: Web/JavaScript/Reference/Statements/throw +--- +
{{jsSidebar("Statements")}}
+ +

La sentència throw llença una excepció definida per l'usuari. L'execució de la funció actual s'aturarà (les sentències de després de throw no s'executaran) i es passarà el control al primer bloc catch en la pila de crides. Si no existeix cap bloc catch en les funcions de crides, el programa s'acabarà.

+ +

Sintaxi

+ +
throw expressió; 
+ +
+
expressió
+
L'expressió que es llença.
+
+ +

Descripció

+ +

Utilitzeu una sentència throw per llençar una excepció. Quan es llença l'excepció, expression especifica el valor de l'excepció. Cadascun dels exemples següents llença una excepció:

+ +
throw "Error2"; // genera una excepció amb un valor tipus cadena
+throw 42;       // genera una excepció amb el valor 42
+throw true;     // genera una excepció amb el valor true
+ +

Tingueu en compte que la sentència throw queda afectada per insersió automàtica de punts i comes (ASI) ja que no es permet cap final de línia entre la paraula clau throw i l'expressió.

+ +

Exemples

+ +

Llença un objecte

+ +

Es pot especificar un objecte quan es llença una excepció. Es pot fer referència a les propietats de l'objecte en el bloc catch. L'exemple següent crea un objecte myUserException de tipus UserException i l'utilitza en una sentència throw.

+ +
function UserException(message) {
+   this.message = message;
+   this.name = "UserException";
+}
+function getMonthName(mo) {
+   mo = mo-1; // Adjustar el número de mes per un índex d'array (1=Jan, 12=Dec)
+   var months = ["Jan", "Feb", "Mar", "Apr", "May", "Jun", "Jul",
+      "Aug", "Sep", "Oct", "Nov", "Dec"];
+   if (months[mo] !== undefined) {
+      return months[mo];
+   } else {
+      throw new UserException("InvalidMonthNo");
+   }
+}
+
+try {
+   // sentències que s'intentarà exxecutar
+   var myMonth = 15; // 15 està fora del rang i llençarà l'excepció
+   monthName = getMonthName(myMonth);
+} catch (e) {
+   monthName = "unknown";
+   logMyErrors(e.message, e.name); // es pasa l'objecte excepció al manegador d'errors
+}
+
+ +

Un altre exemple de llençar un objecte

+ +

L'exemple següent comprova si una cadena donada és un codi postal per EE.UT. SI el codi postal utilitza un format invàlid, la sentència throw llença una excepció creant un objecte de tipus ZipCodeFormatException.

+ +
/*
+ * Crea un objecte ZipCode.
+ *
+ * Els formats acceptats per a un codi postal són:
+ *    12345
+ *    12345-6789
+ *    123456789
+ *    12345 6789
+ *
+ * Si l'argument passat al constructor ZipCode no s'adjusta a
+ * un d'aquests patrons, es llença una excepció.
+ */
+
+function ZipCode(zip) {
+   zip = new String(zip);
+   pattern = /[0-9]{5}([- ]?[0-9]{4})?/;
+   if (pattern.test(zip)) {
+      // el valor del codi postal serà el primer trobat dins la cadena
+      this.value = zip.match(pattern)[0];
+      this.valueOf = function() {
+         return this.value
+      };
+      this.toString = function() {
+         return String(this.value)
+      };
+   } else {
+      throw new ZipCodeFormatException(zip);
+   }
+}
+
+function ZipCodeFormatException(value) {
+   this.value = value;
+   this.message = "no s'adjusta al format esperat per a un codi postal";
+   this.toString = function() {
+      return this.value + this.message;
+   };
+}
+
+/*
+ * Això podria trobar-se en un script que valida adresses d'EE.UU.
+ */
+
+const ZIPCODE_INVALID = -1;
+const ZIPCODE_UNKNOWN_ERROR = -2;
+
+function verifyZipCode(z) {
+   try {
+      z = new ZipCode(z);
+   } catch (e) {
+      if (e instanceof ZipCodeFormatException) {
+         return ZIPCODE_INVALID;
+      } else {
+         return ZIPCODE_UNKNOWN_ERROR;
+      }
+   }
+   return z;
+}
+
+a = verifyZipCode(95060);         // retorna 95060
+b = verifyZipCode(9560);          // retorna -1
+c = verifyZipCode("a");           // retorna -1
+d = verifyZipCode("95060");       // retorna 95060
+e = verifyZipCode("95060 1234");  // retorna 95060 1234
+
+ +

Rellençar una excepció

+ +

Es pot utilitzar throw per rellençar una excepció després de caputrar-la. L'exemple següent captura una excepció amb un valor numèric i el rellença si el valor és major de 50. L'excepció rellençada es propaga fins a la funció que l'envolcalla o al nivell superior de forma que l'usuari ho vegi.

+ +
try {
+   throw n; // llença una excepció amb un valor numèric
+} catch (e) {
+   if (e <= 50) {
+      // sentències per manejar excepcions 1-50
+   } else {
+      // no es pot manejar aquesta excepció, per tant es rellença
+      throw e;
+   }
+}
+
+ +

Especificacions

+ + + + + + + + + + + + + + + + + + + + + + + + +
EspecificacióEstatComentaris
{{SpecName('ES3')}}{{Spec2('ES3')}}Definició inicial. Implementat en JavaScript 1.4
{{SpecName('ES5.1', '#sec-12.13', 'throw statement')}}{{Spec2('ES5.1')}} 
{{SpecName('ES6', '#sec-throw-statement', 'throw statement')}}{{Spec2('ES6')}} 
+ +

Compatibilitat amb navegadors

+ +

{{CompatibilityTable}}

+ +
+ + + + + + + + + + + + + + + + + + + +
CaracterísticaChromeFirefox (Gecko)Internet ExplorerOperaSafari
Suport bàsic{{CompatVersionUnknown}}{{CompatVersionUnknown}}{{CompatVersionUnknown}}{{CompatVersionUnknown}}{{CompatVersionUnknown}}
+
+ +
+ + + + + + + + + + + + + + + + + + + + + +
CaracterísticaAndroidChrome per AndroidFirefox Mobile (Gecko)IE MobileOpera MobileSafari Mobile
Suport bàsic{{CompatVersionUnknown}}{{CompatVersionUnknown}}{{CompatVersionUnknown}}{{CompatVersionUnknown}}{{CompatVersionUnknown}}{{CompatVersionUnknown}}
+
+ +

Vegeu també

+ + diff --git a/files/ca/web/javascript/reference/statements/while/index.html b/files/ca/web/javascript/reference/statements/while/index.html new file mode 100644 index 0000000000..d3997dbefd --- /dev/null +++ b/files/ca/web/javascript/reference/statements/while/index.html @@ -0,0 +1,131 @@ +--- +title: while +slug: Web/JavaScript/Referencia/Sentencies/while +translation_of: Web/JavaScript/Reference/Statements/while +--- +
{{jsSidebar("Statements")}}
+ +

Resum

+ +

la sentència while crea un bucle que executa una sentència especificada sempre que la condició s'avalui certa. La condició s'avalua abans d'executar la sentència..

+ +

Sintaxi

+ +
while (condició) {
+  sentència
+}
+ +
+
condició
+
Una expressió que s'avalua abans de cada passada del bucle. Si aquesta condició esdevé certa, s'executa la sentència. Quan la condició esdevé falsa, l'execució continua amb la sentència posterior al bucle while.
+
sentència
+
Una sentència que s'executa sempre que la condició esdevingui certa. Per executar múltiples sentències dins un bucle, podeu fer ús de la sentència block ({ ... }) per agrupar aquestes sentències.
+
+ +

Exemples

+ +

El següent bucle while itera sempre que n sigui menor que tres.

+ +
var n = 0;
+var x = 0;
+
+while (n < 3) {
+  n++;
+  x += n;
+}
+ +

En cada iteració, el bucle incrementa n i ho suma a x. Per tant, x i n prenen els següents valors:

+ + + +

Després de completar la tercera volta, la condició n < 3 ja no esdevé més certa, i per tant finalitza el bucle.

+ +

Especificacions

+ + + + + + + + + + + + + + + + + + + + + + + + +
EspecificacióEstatComentaris
1a edició de ECMAScript.EstàndardDefinició inicial.
{{SpecName('ES5.1', '#sec-12.6.2', 'while statement')}}{{Spec2('ES5.1')}} 
{{SpecName('ES6', '#sec-while-statement', 'while statement')}}{{Spec2('ES6')}} 
+ +

Compatibilitat amb navegadors

+ +

{{ CompatibilityTable() }}

+ +
+ + + + + + + + + + + + + + + + + + + +
CaracterísticaChromeFirefox (Gecko)Internet ExplorerOperaSafari
Suport bàsic{{ CompatVersionUnknown() }}{{ CompatVersionUnknown() }}{{ CompatVersionUnknown() }}{{ CompatVersionUnknown() }}{{ CompatVersionUnknown() }}
+
+ +
+ + + + + + + + + + + + + + + + + + + + + +
CaracterísticaAndroidChrome per AndroidFirefox Mobile (Gecko)IE MobileOpera MobileSafari Mobile
Suport bàsic{{ CompatVersionUnknown() }}{{ CompatVersionUnknown() }}{{ CompatVersionUnknown() }}{{ CompatVersionUnknown() }}{{ CompatVersionUnknown() }}{{ CompatVersionUnknown() }}
+
+ +

Vegeu també

+ + -- cgit v1.2.3-54-g00ecf From 656b8007e3ac28600241104d0eaa210870561395 Mon Sep 17 00:00:00 2001 From: Florian Merz Date: Thu, 11 Feb 2021 14:45:13 +0100 Subject: unslug ca: modify --- files/ca/_redirects.txt | 571 ++- files/ca/_wikihistory.json | 3870 ++++++++++---------- .../cascade_and_inheritance/index.html | 5 +- .../learn/css/building_blocks/index.html | 5 +- .../learn/css/building_blocks/selectors/index.html | 5 +- .../css/building_blocks/styling_tables/index.html | 5 +- .../building_blocks/values_and_units/index.html | 5 +- .../ca/conflicting/learn/css/css_layout/index.html | 5 +- .../first_steps/how_css_is_structured/index.html | 5 +- .../learn/css/first_steps/how_css_works/index.html | 5 +- .../index.html | 6 +- .../index.html | 6 +- .../conflicting/learn/css/first_steps/index.html | 5 +- .../learn/css/styling_text/fundamentals/index.html | 5 +- .../css/styling_text/styling_lists/index.html | 5 +- files/ca/conflicting/web/guide/index.html | 3 +- .../reference/global_objects/boolean/index.html | 3 +- .../reference/global_objects/dataview/index.html | 3 +- .../reference/global_objects/date/index.html | 3 +- .../reference/global_objects/error/index.html | 3 +- .../reference/global_objects/evalerror/index.html | 3 +- .../reference/global_objects/map/index.html | 3 +- .../reference/global_objects/number/index.html | 3 +- .../reference/global_objects/object/index.html | 3 +- .../reference/global_objects/set/index.html | 3 +- .../global_objects/syntaxerror/index.html | 3 +- .../reference/global_objects/weakmap/index.html | 3 +- .../reference/global_objects/weakset/index.html | 3 +- .../web/javascript/reference/operators/index.html | 3 +- .../index.html | 4 +- .../index.html | 4 +- files/ca/glossary/attribute/index.html | 3 +- files/ca/glossary/browser/index.html | 3 +- files/ca/glossary/character/index.html | 3 +- files/ca/glossary/character_encoding/index.html | 3 +- files/ca/glossary/function/index.html | 3 +- files/ca/glossary/ip_address/index.html | 3 +- files/ca/glossary/method/index.html | 3 +- files/ca/glossary/object/index.html | 3 +- files/ca/glossary/object_reference/index.html | 3 +- files/ca/glossary/primitive/index.html | 3 +- files/ca/glossary/property/index.html | 3 +- files/ca/glossary/scope/index.html | 3 +- files/ca/glossary/server/index.html | 3 +- files/ca/glossary/speculative_parsing/index.html | 3 +- files/ca/glossary/tag/index.html | 3 +- files/ca/glossary/value/index.html | 3 +- .../accessibility/what_is_accessibility/index.html | 3 +- .../building_blocks/a_cool_looking_box/index.html | 3 +- .../backgrounds_and_borders/index.html | 3 +- .../cascade_and_inheritance/index.html | 3 +- .../creating_fancy_letterheaded_paper/index.html | 3 +- .../css/building_blocks/debugging_css/index.html | 3 +- .../fundamental_css_comprehension/index.html | 3 +- .../building_blocks/overflowing_content/index.html | 3 +- .../selectors/attribute_selectors/index.html | 3 +- .../selectors/combinators/index.html | 3 +- .../learn/css/building_blocks/selectors/index.html | 3 +- .../pseudo-classes_and_pseudo-elements/index.html | 3 +- .../type_class_and_id_selectors/index.html | 5 +- .../building_blocks/sizing_items_in_css/index.html | 3 +- .../building_blocks/values_and_units/index.html | 3 +- files/ca/learn/css/css_layout/flexbox/index.html | 3 +- files/ca/learn/css/css_layout/floats/index.html | 3 +- files/ca/learn/css/css_layout/grids/index.html | 3 +- files/ca/learn/css/css_layout/index.html | 3 +- .../learn/css/css_layout/introduction/index.html | 3 +- .../ca/learn/css/css_layout/normal_flow/index.html | 3 +- .../ca/learn/css/css_layout/positioning/index.html | 3 +- .../practical_positioning_examples/index.html | 3 +- .../css/css_layout/responsive_design/index.html | 3 +- .../supporting_older_browsers/index.html | 3 +- .../css/first_steps/getting_started/index.html | 3 +- .../first_steps/how_css_is_structured/index.html | 3 +- .../learn/css/first_steps/how_css_works/index.html | 3 +- .../learn/css/first_steps/what_is_css/index.html | 3 +- .../learn/css/styling_text/fundamentals/index.html | 3 +- files/ca/learn/css/styling_text/index.html | 3 +- .../css/styling_text/styling_links/index.html | 3 +- .../css/styling_text/styling_lists/index.html | 3 +- .../styling_text/typesetting_a_homepage/index.html | 3 +- .../ca/learn/css/styling_text/web_fonts/index.html | 3 +- .../forms/basic_native_form_controls/index.html | 3 +- files/ca/learn/forms/form_validation/index.html | 3 +- .../forms/how_to_structure_a_web_form/index.html | 3 +- files/ca/learn/forms/index.html | 3 +- files/ca/learn/forms/your_first_form/index.html | 3 +- .../css_basics/index.html | 5 +- .../dealing_with_files/index.html | 5 +- .../how_the_web_works/index.html | 5 +- .../installing_basic_software/index.html | 5 +- .../javascript_basics/index.html | 5 +- .../publishing_your_website/index.html | 5 +- .../what_will_your_website_look_like/index.html | 5 +- .../author_fast-loading_html_pages/index.html | 3 +- .../advanced_text_formatting/index.html | 3 +- .../creating_hyperlinks/index.html | 3 +- .../introduction_to_html/debugging_html/index.html | 3 +- .../document_and_website_structure/index.html | 3 +- .../getting_started/index.html | 3 +- .../html_text_fundamentals/index.html | 3 +- .../ca/learn/html/introduction_to_html/index.html | 3 +- .../marking_up_a_letter/index.html | 3 +- .../structuring_a_page_of_content/index.html | 3 +- .../the_head_metadata_in_html/index.html | 3 +- .../adding_vector_graphics_to_the_web/index.html | 3 +- .../images_in_html/index.html | 3 +- .../learn/html/multimedia_and_embedding/index.html | 3 +- .../mozilla_splash_page/index.html | 3 +- .../other_embedding_technologies/index.html | 5 +- .../responsive_images/index.html | 3 +- .../video_and_audio_content/index.html | 3 +- files/ca/learn/html/tables/advanced/index.html | 3 +- files/ca/learn/html/tables/basics/index.html | 3 +- files/ca/learn/html/tables/index.html | 3 +- .../html/tables/structuring_planet_data/index.html | 3 +- .../manipulating_documents/index.html | 5 +- files/ca/learn/javascript/objects/index.html | 3 +- files/ca/mdn/at_ten/index.html | 3 +- files/ca/mdn/contribute/processes/index.html | 3 +- files/ca/mdn/yari/index.html | 3 +- files/ca/mozilla/firefox/releases/2/index.html | 3 +- files/ca/orphaned/mdn/community/index.html | 3 +- .../howto/create_an_mdn_account/index.html | 3 +- .../orphaned/web/html/element/command/index.html | 3 +- .../orphaned/web/html/element/element/index.html | 3 +- .../web/html/global_attributes/dropzone/index.html | 3 +- .../global_objects/array/prototype/index.html | 3 +- .../tutorial/advanced_animations/index.html | 3 +- .../tutorial/applying_styles_and_colors/index.html | 3 +- .../tutorial/basic_animations/index.html | 3 +- .../api/canvas_api/tutorial/basic_usage/index.html | 3 +- .../api/canvas_api/tutorial/compositing/index.html | 3 +- .../canvas_api/tutorial/drawing_text/index.html | 3 +- .../pixel_manipulation_with_canvas/index.html | 3 +- .../canvas_api/tutorial/transformations/index.html | 3 +- files/ca/web/css/_colon_is/index.html | 7 +- .../web/css/adjacent_sibling_combinator/index.html | 3 +- files/ca/web/css/attribute_selectors/index.html | 3 +- files/ca/web/css/child_combinator/index.html | 3 +- files/ca/web/css/class_selectors/index.html | 3 +- .../introduction_to_the_css_box_model/index.html | 3 +- .../mastering_margin_collapsing/index.html | 3 +- files/ca/web/css/css_selectors/index.html | 3 +- .../index.html | 7 +- files/ca/web/css/descendant_combinator/index.html | 3 +- .../web/css/general_sibling_combinator/index.html | 3 +- files/ca/web/css/id_selectors/index.html | 3 +- files/ca/web/css/reference/index.html | 5 +- files/ca/web/css/syntax/index.html | 3 +- files/ca/web/css/type_selectors/index.html | 3 +- files/ca/web/css/universal_selectors/index.html | 3 +- files/ca/web/guide/ajax/getting_started/index.html | 3 +- files/ca/web/guide/graphics/index.html | 3 +- .../using_html_sections_and_outlines/index.html | 3 +- .../web/guide/mobile/a_hybrid_approach/index.html | 3 +- files/ca/web/guide/mobile/index.html | 3 +- .../guide/mobile/mobile-friendliness/index.html | 3 +- .../ca/web/guide/mobile/separate_sites/index.html | 3 +- files/ca/web/html/inline_elements/index.html | 5 +- .../ca/web/javascript/about_javascript/index.html | 3 +- .../guide/expressions_and_operators/index.html | 3 +- .../web/javascript/guide/introduction/index.html | 3 +- files/ca/web/javascript/reference/about/index.html | 3 +- .../reference/classes/constructor/index.html | 3 +- .../ca/web/javascript/reference/classes/index.html | 3 +- .../javascript/reference/classes/static/index.html | 3 +- .../reference/errors/read-only/index.html | 3 +- .../reference/functions/rest_parameters/index.html | 3 +- .../global_objects/array/entries/index.html | 3 +- .../global_objects/array/every/index.html | 3 +- .../reference/global_objects/array/fill/index.html | 3 +- .../global_objects/array/filter/index.html | 3 +- .../reference/global_objects/array/find/index.html | 3 +- .../global_objects/array/findindex/index.html | 3 +- .../global_objects/array/foreach/index.html | 3 +- .../global_objects/array/includes/index.html | 3 +- .../reference/global_objects/array/index.html | 3 +- .../global_objects/array/indexof/index.html | 3 +- .../global_objects/array/isarray/index.html | 3 +- .../reference/global_objects/array/join/index.html | 3 +- .../reference/global_objects/array/keys/index.html | 3 +- .../global_objects/array/lastindexof/index.html | 3 +- .../global_objects/array/length/index.html | 3 +- .../reference/global_objects/array/map/index.html | 3 +- .../reference/global_objects/array/of/index.html | 3 +- .../reference/global_objects/array/pop/index.html | 3 +- .../reference/global_objects/array/push/index.html | 3 +- .../global_objects/array/reduce/index.html | 3 +- .../global_objects/array/reverse/index.html | 3 +- .../global_objects/array/shift/index.html | 3 +- .../global_objects/array/slice/index.html | 3 +- .../reference/global_objects/array/some/index.html | 3 +- .../global_objects/array/splice/index.html | 3 +- .../reference/global_objects/boolean/index.html | 3 +- .../global_objects/boolean/tosource/index.html | 3 +- .../global_objects/boolean/tostring/index.html | 3 +- .../global_objects/boolean/valueof/index.html | 3 +- .../global_objects/date/getdate/index.html | 3 +- .../global_objects/date/getday/index.html | 3 +- .../global_objects/date/getfullyear/index.html | 3 +- .../global_objects/date/gethours/index.html | 3 +- .../global_objects/date/getmilliseconds/index.html | 3 +- .../global_objects/date/getminutes/index.html | 3 +- .../global_objects/date/getmonth/index.html | 3 +- .../global_objects/date/getseconds/index.html | 3 +- .../global_objects/date/gettime/index.html | 3 +- .../date/gettimezoneoffset/index.html | 3 +- .../global_objects/date/getutcdate/index.html | 3 +- .../global_objects/date/getutcday/index.html | 3 +- .../global_objects/date/getutcfullyear/index.html | 3 +- .../global_objects/date/getutchours/index.html | 3 +- .../date/getutcmilliseconds/index.html | 3 +- .../global_objects/date/getutcminutes/index.html | 3 +- .../global_objects/date/getutcmonth/index.html | 3 +- .../global_objects/date/getutcseconds/index.html | 3 +- .../global_objects/date/getyear/index.html | 3 +- .../reference/global_objects/date/index.html | 3 +- .../reference/global_objects/date/now/index.html | 3 +- .../global_objects/date/setdate/index.html | 3 +- .../global_objects/date/setfullyear/index.html | 3 +- .../global_objects/date/sethours/index.html | 3 +- .../global_objects/date/setmilliseconds/index.html | 3 +- .../global_objects/date/setminutes/index.html | 3 +- .../global_objects/date/setmonth/index.html | 3 +- .../global_objects/date/setseconds/index.html | 3 +- .../global_objects/date/settime/index.html | 3 +- .../global_objects/date/setutcdate/index.html | 3 +- .../global_objects/date/setutcfullyear/index.html | 3 +- .../global_objects/date/setutchours/index.html | 3 +- .../date/setutcmilliseconds/index.html | 3 +- .../global_objects/date/setutcminutes/index.html | 3 +- .../global_objects/date/setutcmonth/index.html | 3 +- .../global_objects/date/setutcseconds/index.html | 3 +- .../global_objects/date/setyear/index.html | 3 +- .../global_objects/date/todatestring/index.html | 3 +- .../global_objects/date/togmtstring/index.html | 3 +- .../global_objects/date/toisostring/index.html | 3 +- .../global_objects/date/tojson/index.html | 3 +- .../global_objects/date/tostring/index.html | 3 +- .../global_objects/date/totimestring/index.html | 3 +- .../reference/global_objects/date/utc/index.html | 3 +- .../global_objects/date/valueof/index.html | 3 +- .../global_objects/error/columnnumber/index.html | 3 +- .../global_objects/error/filename/index.html | 3 +- .../reference/global_objects/error/index.html | 3 +- .../global_objects/error/linenumber/index.html | 3 +- .../global_objects/error/message/index.html | 3 +- .../reference/global_objects/error/name/index.html | 3 +- .../global_objects/error/stack/index.html | 3 +- .../global_objects/error/tosource/index.html | 3 +- .../global_objects/error/tostring/index.html | 3 +- .../javascript/reference/global_objects/index.html | 3 +- .../reference/global_objects/infinity/index.html | 3 +- .../reference/global_objects/json/index.html | 3 +- .../reference/global_objects/map/clear/index.html | 3 +- .../reference/global_objects/map/delete/index.html | 3 +- .../global_objects/map/entries/index.html | 3 +- .../global_objects/map/foreach/index.html | 3 +- .../reference/global_objects/map/get/index.html | 3 +- .../reference/global_objects/map/has/index.html | 3 +- .../reference/global_objects/map/index.html | 3 +- .../reference/global_objects/map/keys/index.html | 3 +- .../reference/global_objects/map/set/index.html | 3 +- .../reference/global_objects/map/size/index.html | 3 +- .../reference/global_objects/map/values/index.html | 3 +- .../reference/global_objects/math/abs/index.html | 3 +- .../reference/global_objects/math/acos/index.html | 3 +- .../reference/global_objects/math/acosh/index.html | 3 +- .../reference/global_objects/math/asin/index.html | 3 +- .../reference/global_objects/math/asinh/index.html | 3 +- .../reference/global_objects/math/atan/index.html | 3 +- .../reference/global_objects/math/atan2/index.html | 3 +- .../reference/global_objects/math/atanh/index.html | 3 +- .../reference/global_objects/math/cbrt/index.html | 3 +- .../reference/global_objects/math/ceil/index.html | 3 +- .../reference/global_objects/math/clz32/index.html | 3 +- .../reference/global_objects/math/cos/index.html | 3 +- .../reference/global_objects/math/cosh/index.html | 3 +- .../reference/global_objects/math/e/index.html | 3 +- .../reference/global_objects/math/exp/index.html | 3 +- .../reference/global_objects/math/expm1/index.html | 3 +- .../reference/global_objects/math/floor/index.html | 3 +- .../global_objects/math/fround/index.html | 3 +- .../reference/global_objects/math/hypot/index.html | 3 +- .../reference/global_objects/math/imul/index.html | 3 +- .../reference/global_objects/math/index.html | 3 +- .../reference/global_objects/math/ln10/index.html | 3 +- .../reference/global_objects/math/ln2/index.html | 3 +- .../reference/global_objects/math/log/index.html | 3 +- .../reference/global_objects/math/log10/index.html | 3 +- .../global_objects/math/log10e/index.html | 3 +- .../reference/global_objects/math/log1p/index.html | 3 +- .../reference/global_objects/math/log2/index.html | 3 +- .../reference/global_objects/math/log2e/index.html | 3 +- .../reference/global_objects/math/max/index.html | 3 +- .../reference/global_objects/math/min/index.html | 3 +- .../reference/global_objects/math/pi/index.html | 3 +- .../reference/global_objects/math/pow/index.html | 3 +- .../global_objects/math/random/index.html | 3 +- .../reference/global_objects/math/round/index.html | 3 +- .../reference/global_objects/math/sign/index.html | 3 +- .../reference/global_objects/math/sin/index.html | 3 +- .../reference/global_objects/math/sinh/index.html | 3 +- .../reference/global_objects/math/sqrt/index.html | 3 +- .../global_objects/math/sqrt1_2/index.html | 3 +- .../reference/global_objects/math/sqrt2/index.html | 3 +- .../reference/global_objects/math/tan/index.html | 3 +- .../reference/global_objects/math/tanh/index.html | 3 +- .../reference/global_objects/math/trunc/index.html | 3 +- .../reference/global_objects/nan/index.html | 3 +- .../reference/global_objects/null/index.html | 3 +- .../global_objects/number/epsilon/index.html | 3 +- .../reference/global_objects/number/index.html | 3 +- .../global_objects/number/isfinite/index.html | 3 +- .../global_objects/number/isinteger/index.html | 3 +- .../global_objects/number/isnan/index.html | 3 +- .../global_objects/number/issafeinteger/index.html | 3 +- .../number/max_safe_integer/index.html | 3 +- .../global_objects/number/max_value/index.html | 3 +- .../number/min_safe_integer/index.html | 3 +- .../global_objects/number/min_value/index.html | 3 +- .../reference/global_objects/number/nan/index.html | 3 +- .../number/negative_infinity/index.html | 3 +- .../global_objects/number/parsefloat/index.html | 3 +- .../global_objects/number/parseint/index.html | 3 +- .../number/positive_infinity/index.html | 3 +- .../global_objects/number/toexponential/index.html | 3 +- .../global_objects/number/tofixed/index.html | 3 +- .../global_objects/number/toprecision/index.html | 3 +- .../global_objects/number/tostring/index.html | 3 +- .../reference/global_objects/parsefloat/index.html | 3 +- .../reference/global_objects/set/add/index.html | 3 +- .../reference/global_objects/set/clear/index.html | 3 +- .../reference/global_objects/set/delete/index.html | 3 +- .../global_objects/set/entries/index.html | 3 +- .../reference/global_objects/set/has/index.html | 3 +- .../reference/global_objects/set/index.html | 3 +- .../reference/global_objects/set/values/index.html | 3 +- .../global_objects/string/anchor/index.html | 3 +- .../reference/global_objects/string/big/index.html | 3 +- .../global_objects/string/blink/index.html | 3 +- .../global_objects/string/bold/index.html | 3 +- .../global_objects/string/charat/index.html | 3 +- .../global_objects/string/concat/index.html | 3 +- .../global_objects/string/endswith/index.html | 3 +- .../global_objects/string/fixed/index.html | 3 +- .../global_objects/string/fontcolor/index.html | 3 +- .../global_objects/string/fontsize/index.html | 3 +- .../global_objects/string/fromcharcode/index.html | 3 +- .../reference/global_objects/string/index.html | 3 +- .../global_objects/string/indexof/index.html | 3 +- .../global_objects/string/italics/index.html | 3 +- .../global_objects/string/length/index.html | 3 +- .../global_objects/string/link/index.html | 3 +- .../global_objects/string/normalize/index.html | 3 +- .../global_objects/string/small/index.html | 3 +- .../global_objects/string/startswith/index.html | 3 +- .../reference/global_objects/string/sub/index.html | 3 +- .../global_objects/string/substr/index.html | 3 +- .../reference/global_objects/string/sup/index.html | 3 +- .../string/tolocalelowercase/index.html | 3 +- .../string/tolocaleuppercase/index.html | 3 +- .../global_objects/string/tolowercase/index.html | 3 +- .../global_objects/string/tostring/index.html | 3 +- .../global_objects/string/touppercase/index.html | 3 +- .../global_objects/string/trim/index.html | 3 +- .../global_objects/string/trimend/index.html | 3 +- .../global_objects/string/trimstart/index.html | 3 +- .../global_objects/syntaxerror/index.html | 3 +- .../reference/global_objects/undefined/index.html | 3 +- files/ca/web/javascript/reference/index.html | 3 +- .../reference/operators/comma_operator/index.html | 3 +- .../operators/conditional_operator/index.html | 3 +- .../reference/operators/function/index.html | 3 +- .../reference/operators/grouping/index.html | 3 +- .../web/javascript/reference/operators/index.html | 3 +- .../reference/operators/super/index.html | 3 +- .../reference/operators/typeof/index.html | 3 +- .../javascript/reference/operators/void/index.html | 3 +- .../reference/operators/yield/index.html | 3 +- .../reference/statements/block/index.html | 3 +- .../reference/statements/break/index.html | 3 +- .../reference/statements/continue/index.html | 3 +- .../reference/statements/debugger/index.html | 3 +- .../reference/statements/do...while/index.html | 3 +- .../reference/statements/empty/index.html | 3 +- .../reference/statements/export/index.html | 3 +- .../reference/statements/for...of/index.html | 3 +- .../javascript/reference/statements/for/index.html | 3 +- .../reference/statements/function/index.html | 3 +- .../reference/statements/if...else/index.html | 3 +- .../web/javascript/reference/statements/index.html | 3 +- .../reference/statements/return/index.html | 3 +- .../reference/statements/throw/index.html | 3 +- .../reference/statements/while/index.html | 3 +- files/ca/web/opensearch/index.html | 3 +- files/ca/web/progressive_web_apps/index.html | 3 +- .../responsive/media_types/index.html | 5 +- files/ca/web/svg/tutorial/svg_and_css/index.html | 5 +- 400 files changed, 3242 insertions(+), 2459 deletions(-) (limited to 'files/ca/web/javascript/reference') diff --git a/files/ca/_redirects.txt b/files/ca/_redirects.txt index 6cf87b3187..2a95ee3217 100644 --- a/files/ca/_redirects.txt +++ b/files/ca/_redirects.txt @@ -1,23 +1,75 @@ # FROM-URL TO-URL /ca/docs/AJAX /ca/docs/Web/Guide/AJAX -/ca/docs/AJAX/Primers_passos /ca/docs/Web/Guide/AJAX/Primers_passos -/ca/docs/AJAX:Primers_passos /ca/docs/Web/Guide/AJAX/Primers_passos +/ca/docs/AJAX/Primers_passos /ca/docs/Web/Guide/AJAX/Getting_Started +/ca/docs/AJAX:Primers_passos /ca/docs/Web/Guide/AJAX/Getting_Started +/ca/docs/Addició_de_motors_de_cerca_a_les_pàgines_web /ca/docs/Web/OpenSearch /ca/docs/CSS /ca/docs/Web/CSS -/ca/docs/Firefox_2 /ca/docs/Firefox_2_per_a_desenvolupadors -/ca/docs/Firefox_2.0_per_a_desenvolupadors /ca/docs/Firefox_2_per_a_desenvolupadors +/ca/docs/Firefox_2 /ca/docs/Mozilla/Firefox/Releases/2 +/ca/docs/Firefox_2.0_per_a_desenvolupadors /ca/docs/Mozilla/Firefox/Releases/2 +/ca/docs/Firefox_2_per_a_desenvolupadors /ca/docs/Mozilla/Firefox/Releases/2 +/ca/docs/Glossary/Atribut /ca/docs/Glossary/Attribute +/ca/docs/Glossary/Caràcter /ca/docs/Glossary/Character +/ca/docs/Glossary/Codificació_de_caràcters /ca/docs/Glossary/character_encoding +/ca/docs/Glossary/Etiqueta /ca/docs/Glossary/Tag +/ca/docs/Glossary/Funció /ca/docs/Glossary/Function +/ca/docs/Glossary/Mètode /ca/docs/Glossary/Method +/ca/docs/Glossary/Navegador /ca/docs/Glossary/Browser +/ca/docs/Glossary/Objecte /ca/docs/Glossary/Object +/ca/docs/Glossary/Primitiu /ca/docs/Glossary/Primitive +/ca/docs/Glossary/Propietat /ca/docs/Glossary/property +/ca/docs/Glossary/Servidor /ca/docs/Glossary/Server +/ca/docs/Glossary/Valor /ca/docs/Glossary/Value +/ca/docs/Glossary/adreça_IP /ca/docs/Glossary/IP_Address +/ca/docs/Glossary/referències_a_objectes /ca/docs/Glossary/Object_reference +/ca/docs/Glossary/Àmbit /ca/docs/Glossary/Scope /ca/docs/JavaScript /ca/docs/Web/JavaScript -/ca/docs/JavaScript/Referencia /ca/docs/Web/JavaScript/Referencia -/ca/docs/JavaScript/Referencia/Sobre /ca/docs/Web/JavaScript/Referencia/Sobre +/ca/docs/JavaScript/Referencia /ca/docs/Web/JavaScript/Reference +/ca/docs/JavaScript/Referencia/Sobre /ca/docs/Web/JavaScript/Reference/About +/ca/docs/Learn/Accessibility/Que_es_accessibilitat /ca/docs/Learn/Accessibility/What_is_accessibility +/ca/docs/Learn/CSS/Building_blocks/Cascada_i_herència /ca/docs/Learn/CSS/Building_blocks/Cascade_and_inheritance +/ca/docs/Learn/CSS/Building_blocks/Depurar_el_CSS /ca/docs/Learn/CSS/Building_blocks/Debugging_CSS +/ca/docs/Learn/CSS/Building_blocks/Desbordament_de_contingut /ca/docs/Learn/CSS/Building_blocks/Overflowing_content +/ca/docs/Learn/CSS/Building_blocks/Dimensionar_elements_en_CSS /ca/docs/Learn/CSS/Building_blocks/Sizing_items_in_CSS +/ca/docs/Learn/CSS/Building_blocks/Fons_i_vores /ca/docs/Learn/CSS/Building_blocks/Backgrounds_and_borders +/ca/docs/Learn/CSS/Building_blocks/Selectors_CSS /ca/docs/Learn/CSS/Building_blocks/Selectors +/ca/docs/Learn/CSS/Building_blocks/Selectors_CSS/Combinadors /ca/docs/Learn/CSS/Building_blocks/Selectors/Combinators +/ca/docs/Learn/CSS/Building_blocks/Selectors_CSS/Pseudo-classes_and_pseudo-elements /ca/docs/Learn/CSS/Building_blocks/Selectors/Pseudo-classes_and_pseudo-elements +/ca/docs/Learn/CSS/Building_blocks/Selectors_CSS/Selectors_atribut /ca/docs/Learn/CSS/Building_blocks/Selectors/Attribute_selectors +/ca/docs/Learn/CSS/Building_blocks/Selectors_CSS/Selectors_de_tipus_classe_i_ID /ca/docs/Learn/CSS/Building_blocks/Selectors/Type_Class_and_ID_Selectors +/ca/docs/Learn/CSS/Building_blocks/Valors_i_unitats_CSS /ca/docs/Learn/CSS/Building_blocks/Values_and_units /ca/docs/Learn/CSS/Caixes_estil /en-US/docs/Learn/CSS/Building_blocks +/ca/docs/Learn/CSS/Caixes_estil/Caixa_aspecte_interessant /ca/docs/Learn/CSS/Building_blocks/A_cool_looking_box +/ca/docs/Learn/CSS/Caixes_estil/Creació_carta /ca/docs/Learn/CSS/Building_blocks/Creating_fancy_letterheaded_paper /ca/docs/Learn/CSS/Caixes_estil/Efectes_avançats_caixa /ca/docs/Learn/CSS/Building_blocks/Advanced_styling_effects /ca/docs/Learn/CSS/Caixes_estil/Fons /en-US/docs/Learn/CSS/Building_blocks/Backgrounds_and_borders /ca/docs/Learn/CSS/Caixes_estil/Recapitulació_model_caixa /en-US/docs/Learn/CSS/Building_blocks/The_box_model /ca/docs/Learn/CSS/Caixes_estil/Taules_estil /ca/docs/Learn/CSS/Building_blocks/Styling_tables /ca/docs/Learn/CSS/Caixes_estil/Vores /en-US/docs/Learn/CSS/Building_blocks/Backgrounds_and_borders +/ca/docs/Learn/CSS/Disseny_CSS /ca/docs/Learn/CSS/CSS_layout +/ca/docs/Learn/CSS/Disseny_CSS/Disseny_responsiu /ca/docs/Learn/CSS/CSS_layout/Responsive_Design +/ca/docs/Learn/CSS/Disseny_CSS/Exemples_pràctics_posicionament /ca/docs/Learn/CSS/CSS_layout/Practical_positioning_examples +/ca/docs/Learn/CSS/Disseny_CSS/Flexbox /ca/docs/Learn/CSS/CSS_layout/Flexbox +/ca/docs/Learn/CSS/Disseny_CSS/Flotadors /ca/docs/Learn/CSS/CSS_layout/Floats +/ca/docs/Learn/CSS/Disseny_CSS/Flux_normal /ca/docs/Learn/CSS/CSS_layout/Normal_Flow +/ca/docs/Learn/CSS/Disseny_CSS/Graelles /ca/docs/Learn/CSS/CSS_layout/Grids +/ca/docs/Learn/CSS/Disseny_CSS/Introduccio_disseny_CSS /ca/docs/Learn/CSS/CSS_layout/Introduction +/ca/docs/Learn/CSS/Disseny_CSS/Posicionament /ca/docs/Learn/CSS/CSS_layout/Positioning +/ca/docs/Learn/CSS/Disseny_CSS/Suport_en_navegadors_antics /ca/docs/Learn/CSS/CSS_layout/Supporting_Older_Browsers +/ca/docs/Learn/CSS/Estilitzar_text /ca/docs/Learn/CSS/Styling_text +/ca/docs/Learn/CSS/Estilitzar_text/Composició_pàgina_inici /ca/docs/Learn/CSS/Styling_text/Typesetting_a_homepage +/ca/docs/Learn/CSS/Estilitzar_text/Estilitzar_enllaços /ca/docs/Learn/CSS/Styling_text/Styling_links +/ca/docs/Learn/CSS/Estilitzar_text/Fonts_Web /ca/docs/Learn/CSS/Styling_text/Web_fonts +/ca/docs/Learn/CSS/Estilitzar_text/Llistes_estil /ca/docs/Learn/CSS/Styling_text/Styling_lists +/ca/docs/Learn/CSS/Estilitzar_text/Text_fonamental /ca/docs/Learn/CSS/Styling_text/Fundamentals +/ca/docs/Learn/CSS/First_steps/Com_començar_amb_CSS /ca/docs/Learn/CSS/First_steps/Getting_started +/ca/docs/Learn/CSS/First_steps/Com_estructurar_el_CSS /ca/docs/Learn/CSS/First_steps/How_CSS_is_structured +/ca/docs/Learn/CSS/First_steps/Com_funciona_el_CSS /ca/docs/Learn/CSS/First_steps/How_CSS_works +/ca/docs/Learn/CSS/First_steps/Que_es_el_CSS /ca/docs/Learn/CSS/First_steps/What_is_CSS /ca/docs/Learn/CSS/Introducció_a_CSS /en-US/docs/Learn/CSS/First_steps /ca/docs/Learn/CSS/Introducció_a_CSS/Cascada_i_herència /en-US/docs/Learn/CSS/Building_blocks/Cascade_and_inheritance /ca/docs/Learn/CSS/Introducció_a_CSS/Com_funciona_CSS /en-US/docs/Learn/CSS/First_steps/How_CSS_works /ca/docs/Learn/CSS/Introducció_a_CSS/Combinadors_i_selectors_multiples /en-US/docs/Learn/CSS/Building_blocks/Selectors/Combinators +/ca/docs/Learn/CSS/Introducció_a_CSS/Comprensió_CSS_fonamental /ca/docs/Learn/CSS/Building_blocks/Fundamental_CSS_comprehension /ca/docs/Learn/CSS/Introducció_a_CSS/Depuracio_CSS /en-US/docs/Learn/CSS/Building_blocks/Debugging_CSS /ca/docs/Learn/CSS/Introducció_a_CSS/Pseudo-classes_and_pseudo-elements /en-US/docs/Learn/CSS/Building_blocks/Selectors/Pseudo-classes_and_pseudo-elements /ca/docs/Learn/CSS/Introducció_a_CSS/Selectors /en-US/docs/Learn/CSS/Building_blocks/Selectors @@ -26,101 +78,430 @@ /ca/docs/Learn/CSS/Introducció_a_CSS/Sintaxi_CSS /en-US/docs/Learn/CSS/First_steps/How_CSS_is_structured /ca/docs/Learn/CSS/Introducció_a_CSS/Valors_i_unitats /en-US/docs/Learn/CSS/Building_blocks/Values_and_units /ca/docs/Learn/CSS/Introducció_a_CSS/model_caixa /en-US/docs/Learn/CSS/Building_blocks/The_box_model +/ca/docs/Learn/Getting_started_with_the_web/CSS_bàsic /ca/docs/Learn/Getting_started_with_the_web/CSS_basics +/ca/docs/Learn/Getting_started_with_the_web/Com_funciona_Web /ca/docs/Learn/Getting_started_with_the_web/How_the_Web_works +/ca/docs/Learn/Getting_started_with_the_web/Instal·lació_bàsica_programari /ca/docs/Learn/Getting_started_with_the_web/Installing_basic_software +/ca/docs/Learn/Getting_started_with_the_web/JavaScript_bàsic /ca/docs/Learn/Getting_started_with_the_web/JavaScript_basics +/ca/docs/Learn/Getting_started_with_the_web/Publicar_nostre_lloc_web /ca/docs/Learn/Getting_started_with_the_web/Publishing_your_website +/ca/docs/Learn/Getting_started_with_the_web/Quin_aspecte_tindrà_vostre_lloc_web /ca/docs/Learn/Getting_started_with_the_web/What_will_your_website_look_like +/ca/docs/Learn/Getting_started_with_the_web/Tractar_amb_arxius /ca/docs/Learn/Getting_started_with_the_web/Dealing_with_files +/ca/docs/Learn/HTML/Forms /ca/docs/Learn/Forms +/ca/docs/Learn/HTML/Forms/Com_estructurar_un_formulari_web /ca/docs/Learn/Forms/How_to_structure_a_web_form +/ca/docs/Learn/HTML/Forms/Controls_de_formulari_originals /ca/docs/Learn/Forms/Basic_native_form_controls +/ca/docs/Learn/HTML/Forms/El_teu_primer_formulari /ca/docs/Learn/Forms/Your_first_form +/ca/docs/Learn/HTML/Forms/Validacio_formularis /ca/docs/Learn/Forms/Form_validation +/ca/docs/Learn/HTML/Introducció_al_HTML /ca/docs/Learn/HTML/Introduction_to_HTML +/ca/docs/Learn/HTML/Introducció_al_HTML/Crear_hipervincles /ca/docs/Learn/HTML/Introduction_to_HTML/Creating_hyperlinks +/ca/docs/Learn/HTML/Introducció_al_HTML/Depurar_HTML /ca/docs/Learn/HTML/Introduction_to_HTML/Debugging_HTML +/ca/docs/Learn/HTML/Introducció_al_HTML/Document_i_estructura_del_lloc_web /ca/docs/Learn/HTML/Introduction_to_HTML/Document_and_website_structure +/ca/docs/Learn/HTML/Introducció_al_HTML/Estructurar_una_pàgina_de_contingut /ca/docs/Learn/HTML/Introduction_to_HTML/Structuring_a_page_of_content +/ca/docs/Learn/HTML/Introducció_al_HTML/Fonaments_de_text_HTML /ca/docs/Learn/HTML/Introduction_to_HTML/HTML_text_fundamentals +/ca/docs/Learn/HTML/Introducció_al_HTML/Format_de_text_avançat /ca/docs/Learn/HTML/Introduction_to_HTML/Advanced_text_formatting +/ca/docs/Learn/HTML/Introducció_al_HTML/Getting_started /ca/docs/Learn/HTML/Introduction_to_HTML/Getting_started +/ca/docs/Learn/HTML/Introducció_al_HTML/Marcatge_una_carta /ca/docs/Learn/HTML/Introduction_to_HTML/Marking_up_a_letter +/ca/docs/Learn/HTML/Introducció_al_HTML/Què_hi_ha_en_el_head_Metadades_en_HTML /ca/docs/Learn/HTML/Introduction_to_HTML/The_head_metadata_in_HTML +/ca/docs/Learn/HTML/Multimèdia_i_incrustar /ca/docs/Learn/HTML/Multimedia_and_embedding +/ca/docs/Learn/HTML/Multimèdia_i_incrustar/Afegir_gràfics_vectorials_a_la_Web /ca/docs/Learn/HTML/Multimedia_and_embedding/Adding_vector_graphics_to_the_Web +/ca/docs/Learn/HTML/Multimèdia_i_incrustar/Contingut_de_vídeo_i_àudio /ca/docs/Learn/HTML/Multimedia_and_embedding/Video_and_audio_content +/ca/docs/Learn/HTML/Multimèdia_i_incrustar/De_objecte_a_iframe_altres_tecnologies_incrustació /ca/docs/Learn/HTML/Multimedia_and_embedding/Other_embedding_technologies +/ca/docs/Learn/HTML/Multimèdia_i_incrustar/Images_in_HTML /ca/docs/Learn/HTML/Multimedia_and_embedding/Images_in_HTML +/ca/docs/Learn/HTML/Multimèdia_i_incrustar/Imatges_sensibles /ca/docs/Learn/HTML/Multimedia_and_embedding/Responsive_images +/ca/docs/Learn/HTML/Multimèdia_i_incrustar/Mozilla_pàgina_de_benvinguda /ca/docs/Learn/HTML/Multimedia_and_embedding/Mozilla_splash_page +/ca/docs/Learn/HTML/Taules_HTML /ca/docs/Learn/HTML/Tables +/ca/docs/Learn/HTML/Taules_HTML/Avaluació_Estructurar_les_dades_dels_planeta /ca/docs/Learn/HTML/Tables/Structuring_planet_data +/ca/docs/Learn/HTML/Taules_HTML/Fonaments_de_la_taula_HTML /ca/docs/Learn/HTML/Tables/Basics +/ca/docs/Learn/HTML/Taules_HTML/Taula_HTML_característiques_avançades_i_laccessibilitat /ca/docs/Learn/HTML/Tables/Advanced +/ca/docs/MDN/Comunitat /ca/docs/orphaned/MDN/Community /ca/docs/MDN/Contribute/Estructures /ca/docs/MDN/Structures +/ca/docs/MDN/Contribute/Howto/Crear_un_compte_MDN /ca/docs/orphaned/MDN/Contribute/Howto/Create_an_MDN_account +/ca/docs/MDN/Contribute/Processos /ca/docs/MDN/Contribute/Processes +/ca/docs/MDN/Kuma /ca/docs/MDN/Yari /ca/docs/MDN/comentaris /ca/docs/MDN/Contribute/Feedback +/ca/docs/MDN_at_ten /ca/docs/MDN/At_ten /ca/docs/Portada /ca/docs/Web /ca/docs/Pàgina_principal /ca/docs/Web +/ca/docs/Web/API/Canvas_API/Tutorial/Animacions_avançades /ca/docs/Web/API/Canvas_API/Tutorial/Advanced_animations +/ca/docs/Web/API/Canvas_API/Tutorial/Animacions_bàsiques /ca/docs/Web/API/Canvas_API/Tutorial/Basic_animations +/ca/docs/Web/API/Canvas_API/Tutorial/Aplicar_estils_i_colors /ca/docs/Web/API/Canvas_API/Tutorial/Applying_styles_and_colors +/ca/docs/Web/API/Canvas_API/Tutorial/Composició /ca/docs/Web/API/Canvas_API/Tutorial/Compositing +/ca/docs/Web/API/Canvas_API/Tutorial/Dibuixar_text /ca/docs/Web/API/Canvas_API/Tutorial/Drawing_text +/ca/docs/Web/API/Canvas_API/Tutorial/Manipular_píxels_amb_canvas /ca/docs/Web/API/Canvas_API/Tutorial/Pixel_manipulation_with_canvas +/ca/docs/Web/API/Canvas_API/Tutorial/Transformacions /ca/docs/Web/API/Canvas_API/Tutorial/Transformations +/ca/docs/Web/API/Canvas_API/Tutorial/Ús_bàsic /ca/docs/Web/API/Canvas_API/Tutorial/Basic_usage +/ca/docs/Web/CSS/:any /ca/docs/Web/CSS/:is +/ca/docs/Web/CSS/CSS_Box_Model/Dominar_el_col.lapse_del_marge /ca/docs/Web/CSS/CSS_Box_Model/Mastering_margin_collapsing +/ca/docs/Web/CSS/CSS_Box_Model/Introducció_al_model_de_caixa_CSS /ca/docs/Web/CSS/CSS_Box_Model/Introduction_to_the_CSS_box_model +/ca/docs/Web/CSS/Referéncia_CSS /ca/docs/Web/CSS/Reference +/ca/docs/Web/CSS/Selectors_CSS /ca/docs/Web/CSS/CSS_Selectors +/ca/docs/Web/CSS/Selectors_CSS/Using_the_:target_pseudo-class_in_selectors /ca/docs/Web/CSS/CSS_Selectors/Using_the_:target_pseudo-class_in_selectors +/ca/docs/Web/CSS/Selectors_ID /ca/docs/Web/CSS/ID_selectors +/ca/docs/Web/CSS/Selectors_Universal /ca/docs/Web/CSS/Universal_selectors +/ca/docs/Web/CSS/Selectors_d'Atribut /ca/docs/Web/CSS/Attribute_selectors +/ca/docs/Web/CSS/Selectors_de_Classe /ca/docs/Web/CSS/Class_selectors +/ca/docs/Web/CSS/Selectors_de_Tipus /ca/docs/Web/CSS/Type_selectors +/ca/docs/Web/CSS/Selectors_de_descendents /ca/docs/Web/CSS/Descendant_combinator +/ca/docs/Web/CSS/Selectors_de_fills /ca/docs/Web/CSS/Child_combinator +/ca/docs/Web/CSS/Selectors_de_germans_adjacents /ca/docs/Web/CSS/Adjacent_sibling_combinator +/ca/docs/Web/CSS/Selectors_general_de_germans /ca/docs/Web/CSS/General_sibling_combinator +/ca/docs/Web/CSS/Sintaxi /ca/docs/Web/CSS/Syntax +/ca/docs/Web/Guide/AJAX/Primers_passos /ca/docs/Web/Guide/AJAX/Getting_Started /ca/docs/Web/Guide/CSS /ca/docs/Learn/CSS +/ca/docs/Web/Guide/CSS/Inici_en_CSS /ca/docs/conflicting/Learn/CSS/First_steps +/ca/docs/Web/Guide/CSS/Inici_en_CSS/CSS_llegible /ca/docs/conflicting/Learn/CSS/First_steps/How_CSS_is_structured +/ca/docs/Web/Guide/CSS/Inici_en_CSS/Caixes /ca/docs/conflicting/Learn/CSS/Building_blocks +/ca/docs/Web/Guide/CSS/Inici_en_CSS/Cascada_i_herència /ca/docs/conflicting/Learn/CSS/Building_blocks/Cascade_and_inheritance +/ca/docs/Web/Guide/CSS/Inici_en_CSS/Color /ca/docs/conflicting/Learn/CSS/Building_blocks/Values_and_units +/ca/docs/Web/Guide/CSS/Inici_en_CSS/Com_funciona_el_CSS /ca/docs/conflicting/Learn/CSS/First_steps/How_CSS_works /ca/docs/Web/Guide/CSS/Inici_en_CSS/Contingut /ca/docs/Learn/CSS/Howto/Generated_content +/ca/docs/Web/Guide/CSS/Inici_en_CSS/Disseny /ca/docs/conflicting/Learn/CSS/CSS_layout +/ca/docs/Web/Guide/CSS/Inici_en_CSS/Estils_de_text /ca/docs/conflicting/Learn/CSS/Styling_text/Fundamentals +/ca/docs/Web/Guide/CSS/Inici_en_CSS/JavaScript /ca/docs/Learn/JavaScript/Client-side_web_APIs/Manipulating_documents +/ca/docs/Web/Guide/CSS/Inici_en_CSS/Llistes /ca/docs/conflicting/Learn/CSS/Styling_text/Styling_lists +/ca/docs/Web/Guide/CSS/Inici_en_CSS/Mitjà /ca/docs/Web/Progressive_web_apps/Responsive/Media_types +/ca/docs/Web/Guide/CSS/Inici_en_CSS/Per_què_utilitzar_CSS /ca/docs/conflicting/Learn/CSS/First_steps/How_CSS_works_54b8e7ce45c74338181144ded4fbdccf +/ca/docs/Web/Guide/CSS/Inici_en_CSS/Que_és_CSS /ca/docs/conflicting/Learn/CSS/First_steps/How_CSS_works_9566880e82eb23b2f47f8821f75e0ab1 +/ca/docs/Web/Guide/CSS/Inici_en_CSS/SVG_i_CSS /ca/docs/Web/SVG/Tutorial/SVG_and_CSS +/ca/docs/Web/Guide/CSS/Inici_en_CSS/Selectors /ca/docs/conflicting/Learn/CSS/Building_blocks/Selectors +/ca/docs/Web/Guide/CSS/Inici_en_CSS/Taules /ca/docs/conflicting/Learn/CSS/Building_blocks/Styling_tables +/ca/docs/Web/Guide/Gràfics /ca/docs/Web/Guide/Graphics /ca/docs/Web/Guide/HTML /ca/docs/Learn/HTML -/ca/docs/Web/Guide/HTML/Forms /ca/docs/Learn/HTML/Forms -/ca/docs/Web/Guide/HTML/Introduction /ca/docs/Learn/HTML/Introducció_al_HTML -/ca/docs/Web/JavaScript/Reference/Classes /ca/docs/Web/JavaScript/Referencia/Classes -/ca/docs/Web/JavaScript/Reference/Classes/constructor /ca/docs/Web/JavaScript/Referencia/Classes/constructor -/ca/docs/Web/JavaScript/Reference/Classes/static /ca/docs/Web/JavaScript/Referencia/Classes/static -/ca/docs/Web/JavaScript/Reference/Operators /ca/docs/Web/JavaScript/Referencia/Operadors -/ca/docs/Web/JavaScript/Reference/Operators/Arithmetic_Operators /ca/docs/Web/JavaScript/Referencia/Operadors/Arithmetic_Operators -/ca/docs/Web/JavaScript/Reference/Operators/Bitwise_Operators /ca/docs/Web/JavaScript/Referencia/Operadors/Bitwise_Operators -/ca/docs/Web/JavaScript/Reference/Operators/Conditional_Operator /ca/docs/Web/JavaScript/Referencia/Operadors/Conditional_Operator -/ca/docs/Web/JavaScript/Reference/Operators/Grouping /ca/docs/Web/JavaScript/Referencia/Operadors/Grouping -/ca/docs/Web/JavaScript/Reference/Operators/Logical_Operators /ca/docs/Web/JavaScript/Referencia/Operadors/Logical_Operators -/ca/docs/Web/JavaScript/Reference/Operators/Operador_Coma /ca/docs/Web/JavaScript/Referencia/Operadors/Operador_Coma -/ca/docs/Web/JavaScript/Reference/Operators/typeof /ca/docs/Web/JavaScript/Referencia/Operadors/typeof -/ca/docs/Web/JavaScript/Reference/Operators/void /ca/docs/Web/JavaScript/Referencia/Operadors/void -/ca/docs/Web/JavaScript/Reference/Operators/yield /ca/docs/Web/JavaScript/Referencia/Operadors/yield -/ca/docs/Web/JavaScript/Reference/Statements /ca/docs/Web/JavaScript/Referencia/Sentencies -/ca/docs/Web/JavaScript/Reference/Statements/Buida /ca/docs/Web/JavaScript/Referencia/Sentencies/Buida -/ca/docs/Web/JavaScript/Reference/Statements/block /ca/docs/Web/JavaScript/Referencia/Sentencies/block -/ca/docs/Web/JavaScript/Reference/Statements/for /ca/docs/Web/JavaScript/Referencia/Sentencies/for -/ca/docs/Web/JavaScript/Reference/Statements/for...of /ca/docs/Web/JavaScript/Referencia/Sentencies/for...of -/ca/docs/Web/JavaScript/Reference/Statements/function /ca/docs/Web/JavaScript/Referencia/Sentencies/function -/ca/docs/Web/JavaScript/Reference/Statements/if...else /ca/docs/Web/JavaScript/Referencia/Sentencies/if...else -/ca/docs/Web/JavaScript/Reference/Statements/return /ca/docs/Web/JavaScript/Referencia/Sentencies/return -/ca/docs/Web/JavaScript/Reference/Statements/while /ca/docs/Web/JavaScript/Referencia/Sentencies/while -/ca/docs/Web/JavaScript/Referencia/Global_Objects /ca/docs/Web/JavaScript/Referencia/Objectes_globals -/ca/docs/Web/JavaScript/Referencia/Global_Objects/Infinity /ca/docs/Web/JavaScript/Referencia/Objectes_globals/Infinity -/ca/docs/Web/JavaScript/Referencia/Global_Objects/Math /ca/docs/Web/JavaScript/Referencia/Objectes_globals/Math -/ca/docs/Web/JavaScript/Referencia/Global_Objects/NaN /ca/docs/Web/JavaScript/Referencia/Objectes_globals/NaN -/ca/docs/Web/JavaScript/Referencia/Global_Objects/Number /ca/docs/Web/JavaScript/Referencia/Objectes_globals/Number -/ca/docs/Web/JavaScript/Referencia/Global_Objects/null /ca/docs/Web/JavaScript/Referencia/Objectes_globals/null -/ca/docs/Web/JavaScript/Referencia/Global_Objects/undefined /ca/docs/Web/JavaScript/Referencia/Objectes_globals/undefined -/ca/docs/Web/JavaScript/Referencia/Objectes_standard /ca/docs/Web/JavaScript/Referencia/Objectes_globals -/ca/docs/Web/JavaScript/Referencia/Objectes_standard/Boolean /ca/docs/Web/JavaScript/Referencia/Objectes_globals/Boolean -/ca/docs/Web/JavaScript/Referencia/Objectes_standard/Boolean/prototype /ca/docs/Web/JavaScript/Referencia/Objectes_globals/Boolean/prototype -/ca/docs/Web/JavaScript/Referencia/Objectes_standard/Boolean/toSource /ca/docs/Web/JavaScript/Referencia/Objectes_globals/Boolean/toSource -/ca/docs/Web/JavaScript/Referencia/Objectes_standard/Boolean/toString /ca/docs/Web/JavaScript/Referencia/Objectes_globals/Boolean/toString -/ca/docs/Web/JavaScript/Referencia/Objectes_standard/Boolean/valueOf /ca/docs/Web/JavaScript/Referencia/Objectes_globals/Boolean/valueOf -/ca/docs/Web/JavaScript/Referencia/Objectes_standard/Date /ca/docs/Web/JavaScript/Referencia/Objectes_globals/Date -/ca/docs/Web/JavaScript/Referencia/Objectes_standard/Date/getDay /ca/docs/Web/JavaScript/Referencia/Objectes_globals/Date/getDay -/ca/docs/Web/JavaScript/Referencia/Objectes_standard/Date/getFullYear /ca/docs/Web/JavaScript/Referencia/Objectes_globals/Date/getFullYear -/ca/docs/Web/JavaScript/Referencia/Objectes_standard/Date/getHours /ca/docs/Web/JavaScript/Referencia/Objectes_globals/Date/getHours -/ca/docs/Web/JavaScript/Referencia/Objectes_standard/Date/getMilliseconds /ca/docs/Web/JavaScript/Referencia/Objectes_globals/Date/getMilliseconds -/ca/docs/Web/JavaScript/Referencia/Objectes_standard/Date/getMinutes /ca/docs/Web/JavaScript/Referencia/Objectes_globals/Date/getMinutes -/ca/docs/Web/JavaScript/Referencia/Objectes_standard/Date/getMonth /ca/docs/Web/JavaScript/Referencia/Objectes_globals/Date/getMonth -/ca/docs/Web/JavaScript/Referencia/Objectes_standard/Date/getSeconds /ca/docs/Web/JavaScript/Referencia/Objectes_globals/Date/getSeconds -/ca/docs/Web/JavaScript/Referencia/Objectes_standard/Date/now /ca/docs/Web/JavaScript/Referencia/Objectes_globals/Date/now -/ca/docs/Web/JavaScript/Referencia/Objectes_standard/Date/prototype /ca/docs/Web/JavaScript/Referencia/Objectes_globals/Date/prototype -/ca/docs/Web/JavaScript/Referencia/Objectes_standard/Error /ca/docs/Web/JavaScript/Referencia/Objectes_globals/Error -/ca/docs/Web/JavaScript/Referencia/Objectes_standard/Error/columnNumber /ca/docs/Web/JavaScript/Referencia/Objectes_globals/Error/columnNumber -/ca/docs/Web/JavaScript/Referencia/Objectes_standard/Error/fileName /ca/docs/Web/JavaScript/Referencia/Objectes_globals/Error/fileName -/ca/docs/Web/JavaScript/Referencia/Objectes_standard/Error/lineNumber /ca/docs/Web/JavaScript/Referencia/Objectes_globals/Error/lineNumber -/ca/docs/Web/JavaScript/Referencia/Objectes_standard/Error/message /ca/docs/Web/JavaScript/Referencia/Objectes_globals/Error/message -/ca/docs/Web/JavaScript/Referencia/Objectes_standard/Error/name /ca/docs/Web/JavaScript/Referencia/Objectes_globals/Error/name -/ca/docs/Web/JavaScript/Referencia/Objectes_standard/Error/prototype /ca/docs/Web/JavaScript/Referencia/Objectes_globals/Error/prototype -/ca/docs/Web/JavaScript/Referencia/Objectes_standard/Error/toString /ca/docs/Web/JavaScript/Referencia/Objectes_globals/Error/toString -/ca/docs/Web/JavaScript/Referencia/Objectes_standard/Infinity /ca/docs/Web/JavaScript/Referencia/Objectes_globals/Infinity -/ca/docs/Web/JavaScript/Referencia/Objectes_standard/JSON /ca/docs/Web/JavaScript/Referencia/Objectes_globals/JSON -/ca/docs/Web/JavaScript/Referencia/Objectes_standard/Map /ca/docs/Web/JavaScript/Referencia/Objectes_globals/Map -/ca/docs/Web/JavaScript/Referencia/Objectes_standard/Math /ca/docs/Web/JavaScript/Referencia/Objectes_globals/Math -/ca/docs/Web/JavaScript/Referencia/Objectes_standard/Math/E /ca/docs/Web/JavaScript/Referencia/Objectes_globals/Math/E -/ca/docs/Web/JavaScript/Referencia/Objectes_standard/Math/LN10 /ca/docs/Web/JavaScript/Referencia/Objectes_globals/Math/LN10 -/ca/docs/Web/JavaScript/Referencia/Objectes_standard/Math/LN2 /ca/docs/Web/JavaScript/Referencia/Objectes_globals/Math/LN2 -/ca/docs/Web/JavaScript/Referencia/Objectes_standard/Math/LOG10E /ca/docs/Web/JavaScript/Referencia/Objectes_globals/Math/LOG10E -/ca/docs/Web/JavaScript/Referencia/Objectes_standard/Math/LOG2E /ca/docs/Web/JavaScript/Referencia/Objectes_globals/Math/LOG2E -/ca/docs/Web/JavaScript/Referencia/Objectes_standard/Math/PI /ca/docs/Web/JavaScript/Referencia/Objectes_globals/Math/PI -/ca/docs/Web/JavaScript/Referencia/Objectes_standard/Math/SQRT1_2 /ca/docs/Web/JavaScript/Referencia/Objectes_globals/Math/SQRT1_2 -/ca/docs/Web/JavaScript/Referencia/Objectes_standard/Math/SQRT2 /ca/docs/Web/JavaScript/Referencia/Objectes_globals/Math/SQRT2 -/ca/docs/Web/JavaScript/Referencia/Objectes_standard/Math/abs /ca/docs/Web/JavaScript/Referencia/Objectes_globals/Math/abs -/ca/docs/Web/JavaScript/Referencia/Objectes_standard/Math/acos /ca/docs/Web/JavaScript/Referencia/Objectes_globals/Math/acos -/ca/docs/Web/JavaScript/Referencia/Objectes_standard/Math/asin /ca/docs/Web/JavaScript/Referencia/Objectes_globals/Math/asin -/ca/docs/Web/JavaScript/Referencia/Objectes_standard/Math/atan /ca/docs/Web/JavaScript/Referencia/Objectes_globals/Math/atan -/ca/docs/Web/JavaScript/Referencia/Objectes_standard/Math/ceil /ca/docs/Web/JavaScript/Referencia/Objectes_globals/Math/ceil -/ca/docs/Web/JavaScript/Referencia/Objectes_standard/Math/cos /ca/docs/Web/JavaScript/Referencia/Objectes_globals/Math/cos -/ca/docs/Web/JavaScript/Referencia/Objectes_standard/Math/floor /ca/docs/Web/JavaScript/Referencia/Objectes_globals/Math/floor -/ca/docs/Web/JavaScript/Referencia/Objectes_standard/Math/sin /ca/docs/Web/JavaScript/Referencia/Objectes_globals/Math/sin -/ca/docs/Web/JavaScript/Referencia/Objectes_standard/Math/tan /ca/docs/Web/JavaScript/Referencia/Objectes_globals/Math/tan -/ca/docs/Web/JavaScript/Referencia/Objectes_standard/NaN /ca/docs/Web/JavaScript/Referencia/Objectes_globals/NaN -/ca/docs/Web/JavaScript/Referencia/Objectes_standard/Number /ca/docs/Web/JavaScript/Referencia/Objectes_globals/Number -/ca/docs/Web/JavaScript/Referencia/Objectes_standard/Number/EPSILON /ca/docs/Web/JavaScript/Referencia/Objectes_globals/Number/EPSILON -/ca/docs/Web/JavaScript/Referencia/Objectes_standard/Number/MAX_SAFE_INTEGER /ca/docs/Web/JavaScript/Referencia/Objectes_globals/Number/MAX_SAFE_INTEGER -/ca/docs/Web/JavaScript/Referencia/Objectes_standard/Number/MAX_VALUE /ca/docs/Web/JavaScript/Referencia/Objectes_globals/Number/MAX_VALUE -/ca/docs/Web/JavaScript/Referencia/Objectes_standard/Number/MIN_SAFE_INTEGER /ca/docs/Web/JavaScript/Referencia/Objectes_globals/Number/MIN_SAFE_INTEGER -/ca/docs/Web/JavaScript/Referencia/Objectes_standard/Number/MIN_VALUE /ca/docs/Web/JavaScript/Referencia/Objectes_globals/Number/MIN_VALUE -/ca/docs/Web/JavaScript/Referencia/Objectes_standard/Number/NEGATIVE_INFINITY /ca/docs/Web/JavaScript/Referencia/Objectes_globals/Number/NEGATIVE_INFINITY -/ca/docs/Web/JavaScript/Referencia/Objectes_standard/Number/NaN /ca/docs/Web/JavaScript/Referencia/Objectes_globals/Number/NaN -/ca/docs/Web/JavaScript/Referencia/Objectes_standard/String /ca/docs/Web/JavaScript/Referencia/Objectes_globals/String -/ca/docs/Web/JavaScript/Referencia/Objectes_standard/String/length /ca/docs/Web/JavaScript/Referencia/Objectes_globals/String/length -/ca/docs/Web/JavaScript/Referencia/Objectes_standard/null /ca/docs/Web/JavaScript/Referencia/Objectes_globals/null -/ca/docs/Web/JavaScript/Referencia/Objectes_standard/undefined /ca/docs/Web/JavaScript/Referencia/Objectes_globals/undefined +/ca/docs/Web/Guide/HTML/Forms /ca/docs/Learn/Forms +/ca/docs/Web/Guide/HTML/Introduction /ca/docs/Learn/HTML/Introduction_to_HTML +/ca/docs/Web/Guide/HTML/Us_de_seccions_i_esquemes_en_HTML /ca/docs/Web/Guide/HTML/Using_HTML_sections_and_outlines +/ca/docs/Web/Guide/HTML/_Consells_per_crear_pàgines_HTML_de_càrrega_ràpida /ca/docs/Learn/HTML/Howto/Author_fast-loading_HTML_pages +/ca/docs/Web/HTML/Element/command /ca/docs/orphaned/Web/HTML/Element/command +/ca/docs/Web/HTML/Element/element /ca/docs/orphaned/Web/HTML/Element/element +/ca/docs/Web/HTML/Elements_en_línia /ca/docs/Web/HTML/Inline_elements +/ca/docs/Web/HTML/Global_attributes/dropzone /ca/docs/orphaned/Web/HTML/Global_attributes/dropzone +/ca/docs/Web/HTML/Optimizing_your_pages_for_speculative_parsing /ca/docs/Glossary/speculative_parsing +/ca/docs/Web/JavaScript/Guide/Expressions_i_Operadors /ca/docs/Web/JavaScript/Guide/Expressions_and_Operators +/ca/docs/Web/JavaScript/Guide/Introducció /ca/docs/Web/JavaScript/Guide/Introduction +/ca/docs/Web/JavaScript/Introducció_al_Javascript_orientat_a_Objectes /ca/docs/Learn/JavaScript/Objects +/ca/docs/Web/JavaScript/Reference/Errors/Nomes-Lectura /ca/docs/Web/JavaScript/Reference/Errors/Read-only +/ca/docs/Web/JavaScript/Reference/Functions/parameters_rest /ca/docs/Web/JavaScript/Reference/Functions/rest_parameters +/ca/docs/Web/JavaScript/Reference/Global_Objects/DataView/prototype /ca/docs/conflicting/Web/JavaScript/Reference/Global_Objects/DataView +/ca/docs/Web/JavaScript/Reference/Global_Objects/EvalError/prototype /ca/docs/conflicting/Web/JavaScript/Reference/Global_Objects/EvalError +/ca/docs/Web/JavaScript/Reference/Global_Objects/Object/prototype /ca/docs/conflicting/Web/JavaScript/Reference/Global_Objects/Object +/ca/docs/Web/JavaScript/Reference/Global_Objects/WeakMap/prototype /ca/docs/conflicting/Web/JavaScript/Reference/Global_Objects/WeakMap +/ca/docs/Web/JavaScript/Reference/Global_Objects/WeakSet/prototype /ca/docs/conflicting/Web/JavaScript/Reference/Global_Objects/WeakSet +/ca/docs/Web/JavaScript/Reference/Operators/Arithmetic_Operators /ca/docs/conflicting/Web/JavaScript/Reference/Operators +/ca/docs/Web/JavaScript/Reference/Operators/Bitwise_Operators /ca/docs/conflicting/Web/JavaScript/Reference/Operators_94c03c413a71df1ccff4c3ede275360c +/ca/docs/Web/JavaScript/Reference/Operators/Logical_Operators /ca/docs/conflicting/Web/JavaScript/Reference/Operators_af596841c6a3650ee514088f0e310901 +/ca/docs/Web/JavaScript/Reference/Operators/Operador_Coma /ca/docs/Web/JavaScript/Reference/Operators/Comma_Operator +/ca/docs/Web/JavaScript/Reference/Statements/Buida /ca/docs/Web/JavaScript/Reference/Statements/Empty +/ca/docs/Web/JavaScript/Referencia /ca/docs/Web/JavaScript/Reference +/ca/docs/Web/JavaScript/Referencia/Classes /ca/docs/Web/JavaScript/Reference/Classes +/ca/docs/Web/JavaScript/Referencia/Classes/constructor /ca/docs/Web/JavaScript/Reference/Classes/constructor +/ca/docs/Web/JavaScript/Referencia/Classes/static /ca/docs/Web/JavaScript/Reference/Classes/static +/ca/docs/Web/JavaScript/Referencia/Global_Objects /ca/docs/Web/JavaScript/Reference/Global_Objects +/ca/docs/Web/JavaScript/Referencia/Global_Objects/Infinity /ca/docs/Web/JavaScript/Reference/Global_Objects/Infinity +/ca/docs/Web/JavaScript/Referencia/Global_Objects/Math /ca/docs/Web/JavaScript/Reference/Global_Objects/Math +/ca/docs/Web/JavaScript/Referencia/Global_Objects/NaN /ca/docs/Web/JavaScript/Reference/Global_Objects/NaN +/ca/docs/Web/JavaScript/Referencia/Global_Objects/Number /ca/docs/Web/JavaScript/Reference/Global_Objects/Number +/ca/docs/Web/JavaScript/Referencia/Global_Objects/null /ca/docs/Web/JavaScript/Reference/Global_Objects/null +/ca/docs/Web/JavaScript/Referencia/Global_Objects/undefined /ca/docs/Web/JavaScript/Reference/Global_Objects/undefined +/ca/docs/Web/JavaScript/Referencia/Objectes_globals /ca/docs/Web/JavaScript/Reference/Global_Objects +/ca/docs/Web/JavaScript/Referencia/Objectes_globals/Array /ca/docs/Web/JavaScript/Reference/Global_Objects/Array +/ca/docs/Web/JavaScript/Referencia/Objectes_globals/Array/Reduce /ca/docs/Web/JavaScript/Reference/Global_Objects/Array/Reduce +/ca/docs/Web/JavaScript/Referencia/Objectes_globals/Array/entries /ca/docs/Web/JavaScript/Reference/Global_Objects/Array/entries +/ca/docs/Web/JavaScript/Referencia/Objectes_globals/Array/every /ca/docs/Web/JavaScript/Reference/Global_Objects/Array/every +/ca/docs/Web/JavaScript/Referencia/Objectes_globals/Array/fill /ca/docs/Web/JavaScript/Reference/Global_Objects/Array/fill +/ca/docs/Web/JavaScript/Referencia/Objectes_globals/Array/filter /ca/docs/Web/JavaScript/Reference/Global_Objects/Array/filter +/ca/docs/Web/JavaScript/Referencia/Objectes_globals/Array/find /ca/docs/Web/JavaScript/Reference/Global_Objects/Array/find +/ca/docs/Web/JavaScript/Referencia/Objectes_globals/Array/findIndex /ca/docs/Web/JavaScript/Reference/Global_Objects/Array/findIndex +/ca/docs/Web/JavaScript/Referencia/Objectes_globals/Array/forEach /ca/docs/Web/JavaScript/Reference/Global_Objects/Array/forEach +/ca/docs/Web/JavaScript/Referencia/Objectes_globals/Array/includes /ca/docs/Web/JavaScript/Reference/Global_Objects/Array/includes +/ca/docs/Web/JavaScript/Referencia/Objectes_globals/Array/indexOf /ca/docs/Web/JavaScript/Reference/Global_Objects/Array/indexOf +/ca/docs/Web/JavaScript/Referencia/Objectes_globals/Array/isArray /ca/docs/Web/JavaScript/Reference/Global_Objects/Array/isArray +/ca/docs/Web/JavaScript/Referencia/Objectes_globals/Array/join /ca/docs/Web/JavaScript/Reference/Global_Objects/Array/join +/ca/docs/Web/JavaScript/Referencia/Objectes_globals/Array/keys /ca/docs/Web/JavaScript/Reference/Global_Objects/Array/keys +/ca/docs/Web/JavaScript/Referencia/Objectes_globals/Array/lastIndexOf /ca/docs/Web/JavaScript/Reference/Global_Objects/Array/lastIndexOf +/ca/docs/Web/JavaScript/Referencia/Objectes_globals/Array/length /ca/docs/Web/JavaScript/Reference/Global_Objects/Array/length +/ca/docs/Web/JavaScript/Referencia/Objectes_globals/Array/map /ca/docs/Web/JavaScript/Reference/Global_Objects/Array/map +/ca/docs/Web/JavaScript/Referencia/Objectes_globals/Array/of /ca/docs/Web/JavaScript/Reference/Global_Objects/Array/of +/ca/docs/Web/JavaScript/Referencia/Objectes_globals/Array/pop /ca/docs/Web/JavaScript/Reference/Global_Objects/Array/pop +/ca/docs/Web/JavaScript/Referencia/Objectes_globals/Array/prototype /ca/docs/orphaned/Web/JavaScript/Reference/Global_Objects/Array/prototype +/ca/docs/Web/JavaScript/Referencia/Objectes_globals/Array/push /ca/docs/Web/JavaScript/Reference/Global_Objects/Array/push +/ca/docs/Web/JavaScript/Referencia/Objectes_globals/Array/reverse /ca/docs/Web/JavaScript/Reference/Global_Objects/Array/reverse +/ca/docs/Web/JavaScript/Referencia/Objectes_globals/Array/shift /ca/docs/Web/JavaScript/Reference/Global_Objects/Array/shift +/ca/docs/Web/JavaScript/Referencia/Objectes_globals/Array/slice /ca/docs/Web/JavaScript/Reference/Global_Objects/Array/slice +/ca/docs/Web/JavaScript/Referencia/Objectes_globals/Array/some /ca/docs/Web/JavaScript/Reference/Global_Objects/Array/some +/ca/docs/Web/JavaScript/Referencia/Objectes_globals/Array/splice /ca/docs/Web/JavaScript/Reference/Global_Objects/Array/splice +/ca/docs/Web/JavaScript/Referencia/Objectes_globals/Boolean /ca/docs/Web/JavaScript/Reference/Global_Objects/Boolean +/ca/docs/Web/JavaScript/Referencia/Objectes_globals/Boolean/prototype /ca/docs/conflicting/Web/JavaScript/Reference/Global_Objects/Boolean +/ca/docs/Web/JavaScript/Referencia/Objectes_globals/Boolean/toSource /ca/docs/Web/JavaScript/Reference/Global_Objects/Boolean/toSource +/ca/docs/Web/JavaScript/Referencia/Objectes_globals/Boolean/toString /ca/docs/Web/JavaScript/Reference/Global_Objects/Boolean/toString +/ca/docs/Web/JavaScript/Referencia/Objectes_globals/Boolean/valueOf /ca/docs/Web/JavaScript/Reference/Global_Objects/Boolean/valueOf +/ca/docs/Web/JavaScript/Referencia/Objectes_globals/Date /ca/docs/Web/JavaScript/Reference/Global_Objects/Date +/ca/docs/Web/JavaScript/Referencia/Objectes_globals/Date/UTC /ca/docs/Web/JavaScript/Reference/Global_Objects/Date/UTC +/ca/docs/Web/JavaScript/Referencia/Objectes_globals/Date/getDate /ca/docs/Web/JavaScript/Reference/Global_Objects/Date/getDate +/ca/docs/Web/JavaScript/Referencia/Objectes_globals/Date/getDay /ca/docs/Web/JavaScript/Reference/Global_Objects/Date/getDay +/ca/docs/Web/JavaScript/Referencia/Objectes_globals/Date/getFullYear /ca/docs/Web/JavaScript/Reference/Global_Objects/Date/getFullYear +/ca/docs/Web/JavaScript/Referencia/Objectes_globals/Date/getHours /ca/docs/Web/JavaScript/Reference/Global_Objects/Date/getHours +/ca/docs/Web/JavaScript/Referencia/Objectes_globals/Date/getMilliseconds /ca/docs/Web/JavaScript/Reference/Global_Objects/Date/getMilliseconds +/ca/docs/Web/JavaScript/Referencia/Objectes_globals/Date/getMinutes /ca/docs/Web/JavaScript/Reference/Global_Objects/Date/getMinutes +/ca/docs/Web/JavaScript/Referencia/Objectes_globals/Date/getMonth /ca/docs/Web/JavaScript/Reference/Global_Objects/Date/getMonth +/ca/docs/Web/JavaScript/Referencia/Objectes_globals/Date/getSeconds /ca/docs/Web/JavaScript/Reference/Global_Objects/Date/getSeconds +/ca/docs/Web/JavaScript/Referencia/Objectes_globals/Date/getTime /ca/docs/Web/JavaScript/Reference/Global_Objects/Date/getTime +/ca/docs/Web/JavaScript/Referencia/Objectes_globals/Date/getTimezoneOffset /ca/docs/Web/JavaScript/Reference/Global_Objects/Date/getTimezoneOffset +/ca/docs/Web/JavaScript/Referencia/Objectes_globals/Date/getUTCDate /ca/docs/Web/JavaScript/Reference/Global_Objects/Date/getUTCDate +/ca/docs/Web/JavaScript/Referencia/Objectes_globals/Date/getUTCDay /ca/docs/Web/JavaScript/Reference/Global_Objects/Date/getUTCDay +/ca/docs/Web/JavaScript/Referencia/Objectes_globals/Date/getUTCFullYear /ca/docs/Web/JavaScript/Reference/Global_Objects/Date/getUTCFullYear +/ca/docs/Web/JavaScript/Referencia/Objectes_globals/Date/getUTCHours /ca/docs/Web/JavaScript/Reference/Global_Objects/Date/getUTCHours +/ca/docs/Web/JavaScript/Referencia/Objectes_globals/Date/getUTCMilliseconds /ca/docs/Web/JavaScript/Reference/Global_Objects/Date/getUTCMilliseconds +/ca/docs/Web/JavaScript/Referencia/Objectes_globals/Date/getUTCMinutes /ca/docs/Web/JavaScript/Reference/Global_Objects/Date/getUTCMinutes +/ca/docs/Web/JavaScript/Referencia/Objectes_globals/Date/getUTCMonth /ca/docs/Web/JavaScript/Reference/Global_Objects/Date/getUTCMonth +/ca/docs/Web/JavaScript/Referencia/Objectes_globals/Date/getUTCSeconds /ca/docs/Web/JavaScript/Reference/Global_Objects/Date/getUTCSeconds +/ca/docs/Web/JavaScript/Referencia/Objectes_globals/Date/getYear /ca/docs/Web/JavaScript/Reference/Global_Objects/Date/getYear +/ca/docs/Web/JavaScript/Referencia/Objectes_globals/Date/now /ca/docs/Web/JavaScript/Reference/Global_Objects/Date/now +/ca/docs/Web/JavaScript/Referencia/Objectes_globals/Date/prototype /ca/docs/conflicting/Web/JavaScript/Reference/Global_Objects/Date +/ca/docs/Web/JavaScript/Referencia/Objectes_globals/Date/setDate /ca/docs/Web/JavaScript/Reference/Global_Objects/Date/setDate +/ca/docs/Web/JavaScript/Referencia/Objectes_globals/Date/setFullYear /ca/docs/Web/JavaScript/Reference/Global_Objects/Date/setFullYear +/ca/docs/Web/JavaScript/Referencia/Objectes_globals/Date/setHours /ca/docs/Web/JavaScript/Reference/Global_Objects/Date/setHours +/ca/docs/Web/JavaScript/Referencia/Objectes_globals/Date/setMilliseconds /ca/docs/Web/JavaScript/Reference/Global_Objects/Date/setMilliseconds +/ca/docs/Web/JavaScript/Referencia/Objectes_globals/Date/setMinutes /ca/docs/Web/JavaScript/Reference/Global_Objects/Date/setMinutes +/ca/docs/Web/JavaScript/Referencia/Objectes_globals/Date/setMonth /ca/docs/Web/JavaScript/Reference/Global_Objects/Date/setMonth +/ca/docs/Web/JavaScript/Referencia/Objectes_globals/Date/setSeconds /ca/docs/Web/JavaScript/Reference/Global_Objects/Date/setSeconds +/ca/docs/Web/JavaScript/Referencia/Objectes_globals/Date/setTime /ca/docs/Web/JavaScript/Reference/Global_Objects/Date/setTime +/ca/docs/Web/JavaScript/Referencia/Objectes_globals/Date/setUTCDate /ca/docs/Web/JavaScript/Reference/Global_Objects/Date/setUTCDate +/ca/docs/Web/JavaScript/Referencia/Objectes_globals/Date/setUTCFullYear /ca/docs/Web/JavaScript/Reference/Global_Objects/Date/setUTCFullYear +/ca/docs/Web/JavaScript/Referencia/Objectes_globals/Date/setUTCHours /ca/docs/Web/JavaScript/Reference/Global_Objects/Date/setUTCHours +/ca/docs/Web/JavaScript/Referencia/Objectes_globals/Date/setUTCMilliseconds /ca/docs/Web/JavaScript/Reference/Global_Objects/Date/setUTCMilliseconds +/ca/docs/Web/JavaScript/Referencia/Objectes_globals/Date/setUTCMinutes /ca/docs/Web/JavaScript/Reference/Global_Objects/Date/setUTCMinutes +/ca/docs/Web/JavaScript/Referencia/Objectes_globals/Date/setUTCMonth /ca/docs/Web/JavaScript/Reference/Global_Objects/Date/setUTCMonth +/ca/docs/Web/JavaScript/Referencia/Objectes_globals/Date/setUTCSeconds /ca/docs/Web/JavaScript/Reference/Global_Objects/Date/setUTCSeconds +/ca/docs/Web/JavaScript/Referencia/Objectes_globals/Date/setYear /ca/docs/Web/JavaScript/Reference/Global_Objects/Date/setYear +/ca/docs/Web/JavaScript/Referencia/Objectes_globals/Date/toDateString /ca/docs/Web/JavaScript/Reference/Global_Objects/Date/toDateString +/ca/docs/Web/JavaScript/Referencia/Objectes_globals/Date/toGMTString /ca/docs/Web/JavaScript/Reference/Global_Objects/Date/toGMTString +/ca/docs/Web/JavaScript/Referencia/Objectes_globals/Date/toISOString /ca/docs/Web/JavaScript/Reference/Global_Objects/Date/toISOString +/ca/docs/Web/JavaScript/Referencia/Objectes_globals/Date/toJSON /ca/docs/Web/JavaScript/Reference/Global_Objects/Date/toJSON +/ca/docs/Web/JavaScript/Referencia/Objectes_globals/Date/toString /ca/docs/Web/JavaScript/Reference/Global_Objects/Date/toString +/ca/docs/Web/JavaScript/Referencia/Objectes_globals/Date/toTimeString /ca/docs/Web/JavaScript/Reference/Global_Objects/Date/toTimeString +/ca/docs/Web/JavaScript/Referencia/Objectes_globals/Date/valueOf /ca/docs/Web/JavaScript/Reference/Global_Objects/Date/valueOf +/ca/docs/Web/JavaScript/Referencia/Objectes_globals/Error /ca/docs/Web/JavaScript/Reference/Global_Objects/Error +/ca/docs/Web/JavaScript/Referencia/Objectes_globals/Error/Stack /ca/docs/Web/JavaScript/Reference/Global_Objects/Error/Stack +/ca/docs/Web/JavaScript/Referencia/Objectes_globals/Error/columnNumber /ca/docs/Web/JavaScript/Reference/Global_Objects/Error/columnNumber +/ca/docs/Web/JavaScript/Referencia/Objectes_globals/Error/fileName /ca/docs/Web/JavaScript/Reference/Global_Objects/Error/fileName +/ca/docs/Web/JavaScript/Referencia/Objectes_globals/Error/lineNumber /ca/docs/Web/JavaScript/Reference/Global_Objects/Error/lineNumber +/ca/docs/Web/JavaScript/Referencia/Objectes_globals/Error/message /ca/docs/Web/JavaScript/Reference/Global_Objects/Error/message +/ca/docs/Web/JavaScript/Referencia/Objectes_globals/Error/name /ca/docs/Web/JavaScript/Reference/Global_Objects/Error/name +/ca/docs/Web/JavaScript/Referencia/Objectes_globals/Error/prototype /ca/docs/conflicting/Web/JavaScript/Reference/Global_Objects/Error +/ca/docs/Web/JavaScript/Referencia/Objectes_globals/Error/toSource /ca/docs/Web/JavaScript/Reference/Global_Objects/Error/toSource +/ca/docs/Web/JavaScript/Referencia/Objectes_globals/Error/toString /ca/docs/Web/JavaScript/Reference/Global_Objects/Error/toString +/ca/docs/Web/JavaScript/Referencia/Objectes_globals/Infinity /ca/docs/Web/JavaScript/Reference/Global_Objects/Infinity +/ca/docs/Web/JavaScript/Referencia/Objectes_globals/JSON /ca/docs/Web/JavaScript/Reference/Global_Objects/JSON +/ca/docs/Web/JavaScript/Referencia/Objectes_globals/Map /ca/docs/Web/JavaScript/Reference/Global_Objects/Map +/ca/docs/Web/JavaScript/Referencia/Objectes_globals/Map/clear /ca/docs/Web/JavaScript/Reference/Global_Objects/Map/clear +/ca/docs/Web/JavaScript/Referencia/Objectes_globals/Map/delete /ca/docs/Web/JavaScript/Reference/Global_Objects/Map/delete +/ca/docs/Web/JavaScript/Referencia/Objectes_globals/Map/entries /ca/docs/Web/JavaScript/Reference/Global_Objects/Map/entries +/ca/docs/Web/JavaScript/Referencia/Objectes_globals/Map/forEach /ca/docs/Web/JavaScript/Reference/Global_Objects/Map/forEach +/ca/docs/Web/JavaScript/Referencia/Objectes_globals/Map/get /ca/docs/Web/JavaScript/Reference/Global_Objects/Map/get +/ca/docs/Web/JavaScript/Referencia/Objectes_globals/Map/has /ca/docs/Web/JavaScript/Reference/Global_Objects/Map/has +/ca/docs/Web/JavaScript/Referencia/Objectes_globals/Map/keys /ca/docs/Web/JavaScript/Reference/Global_Objects/Map/keys +/ca/docs/Web/JavaScript/Referencia/Objectes_globals/Map/prototype /ca/docs/conflicting/Web/JavaScript/Reference/Global_Objects/Map +/ca/docs/Web/JavaScript/Referencia/Objectes_globals/Map/set /ca/docs/Web/JavaScript/Reference/Global_Objects/Map/set +/ca/docs/Web/JavaScript/Referencia/Objectes_globals/Map/size /ca/docs/Web/JavaScript/Reference/Global_Objects/Map/size +/ca/docs/Web/JavaScript/Referencia/Objectes_globals/Map/values /ca/docs/Web/JavaScript/Reference/Global_Objects/Map/values +/ca/docs/Web/JavaScript/Referencia/Objectes_globals/Math /ca/docs/Web/JavaScript/Reference/Global_Objects/Math +/ca/docs/Web/JavaScript/Referencia/Objectes_globals/Math/E /ca/docs/Web/JavaScript/Reference/Global_Objects/Math/E +/ca/docs/Web/JavaScript/Referencia/Objectes_globals/Math/LN10 /ca/docs/Web/JavaScript/Reference/Global_Objects/Math/LN10 +/ca/docs/Web/JavaScript/Referencia/Objectes_globals/Math/LN2 /ca/docs/Web/JavaScript/Reference/Global_Objects/Math/LN2 +/ca/docs/Web/JavaScript/Referencia/Objectes_globals/Math/LOG10E /ca/docs/Web/JavaScript/Reference/Global_Objects/Math/LOG10E +/ca/docs/Web/JavaScript/Referencia/Objectes_globals/Math/LOG2E /ca/docs/Web/JavaScript/Reference/Global_Objects/Math/LOG2E +/ca/docs/Web/JavaScript/Referencia/Objectes_globals/Math/PI /ca/docs/Web/JavaScript/Reference/Global_Objects/Math/PI +/ca/docs/Web/JavaScript/Referencia/Objectes_globals/Math/SQRT1_2 /ca/docs/Web/JavaScript/Reference/Global_Objects/Math/SQRT1_2 +/ca/docs/Web/JavaScript/Referencia/Objectes_globals/Math/SQRT2 /ca/docs/Web/JavaScript/Reference/Global_Objects/Math/SQRT2 +/ca/docs/Web/JavaScript/Referencia/Objectes_globals/Math/abs /ca/docs/Web/JavaScript/Reference/Global_Objects/Math/abs +/ca/docs/Web/JavaScript/Referencia/Objectes_globals/Math/acos /ca/docs/Web/JavaScript/Reference/Global_Objects/Math/acos +/ca/docs/Web/JavaScript/Referencia/Objectes_globals/Math/acosh /ca/docs/Web/JavaScript/Reference/Global_Objects/Math/acosh +/ca/docs/Web/JavaScript/Referencia/Objectes_globals/Math/asin /ca/docs/Web/JavaScript/Reference/Global_Objects/Math/asin +/ca/docs/Web/JavaScript/Referencia/Objectes_globals/Math/asinh /ca/docs/Web/JavaScript/Reference/Global_Objects/Math/asinh +/ca/docs/Web/JavaScript/Referencia/Objectes_globals/Math/atan /ca/docs/Web/JavaScript/Reference/Global_Objects/Math/atan +/ca/docs/Web/JavaScript/Referencia/Objectes_globals/Math/atan2 /ca/docs/Web/JavaScript/Reference/Global_Objects/Math/atan2 +/ca/docs/Web/JavaScript/Referencia/Objectes_globals/Math/atanh /ca/docs/Web/JavaScript/Reference/Global_Objects/Math/atanh +/ca/docs/Web/JavaScript/Referencia/Objectes_globals/Math/cbrt /ca/docs/Web/JavaScript/Reference/Global_Objects/Math/cbrt +/ca/docs/Web/JavaScript/Referencia/Objectes_globals/Math/ceil /ca/docs/Web/JavaScript/Reference/Global_Objects/Math/ceil +/ca/docs/Web/JavaScript/Referencia/Objectes_globals/Math/clz32 /ca/docs/Web/JavaScript/Reference/Global_Objects/Math/clz32 +/ca/docs/Web/JavaScript/Referencia/Objectes_globals/Math/cos /ca/docs/Web/JavaScript/Reference/Global_Objects/Math/cos +/ca/docs/Web/JavaScript/Referencia/Objectes_globals/Math/cosh /ca/docs/Web/JavaScript/Reference/Global_Objects/Math/cosh +/ca/docs/Web/JavaScript/Referencia/Objectes_globals/Math/exp /ca/docs/Web/JavaScript/Reference/Global_Objects/Math/exp +/ca/docs/Web/JavaScript/Referencia/Objectes_globals/Math/expm1 /ca/docs/Web/JavaScript/Reference/Global_Objects/Math/expm1 +/ca/docs/Web/JavaScript/Referencia/Objectes_globals/Math/floor /ca/docs/Web/JavaScript/Reference/Global_Objects/Math/floor +/ca/docs/Web/JavaScript/Referencia/Objectes_globals/Math/fround /ca/docs/Web/JavaScript/Reference/Global_Objects/Math/fround +/ca/docs/Web/JavaScript/Referencia/Objectes_globals/Math/hypot /ca/docs/Web/JavaScript/Reference/Global_Objects/Math/hypot +/ca/docs/Web/JavaScript/Referencia/Objectes_globals/Math/imul /ca/docs/Web/JavaScript/Reference/Global_Objects/Math/imul +/ca/docs/Web/JavaScript/Referencia/Objectes_globals/Math/log /ca/docs/Web/JavaScript/Reference/Global_Objects/Math/log +/ca/docs/Web/JavaScript/Referencia/Objectes_globals/Math/log10 /ca/docs/Web/JavaScript/Reference/Global_Objects/Math/log10 +/ca/docs/Web/JavaScript/Referencia/Objectes_globals/Math/log1p /ca/docs/Web/JavaScript/Reference/Global_Objects/Math/log1p +/ca/docs/Web/JavaScript/Referencia/Objectes_globals/Math/log2 /ca/docs/Web/JavaScript/Reference/Global_Objects/Math/log2 +/ca/docs/Web/JavaScript/Referencia/Objectes_globals/Math/max /ca/docs/Web/JavaScript/Reference/Global_Objects/Math/max +/ca/docs/Web/JavaScript/Referencia/Objectes_globals/Math/min /ca/docs/Web/JavaScript/Reference/Global_Objects/Math/min +/ca/docs/Web/JavaScript/Referencia/Objectes_globals/Math/pow /ca/docs/Web/JavaScript/Reference/Global_Objects/Math/pow +/ca/docs/Web/JavaScript/Referencia/Objectes_globals/Math/random /ca/docs/Web/JavaScript/Reference/Global_Objects/Math/random +/ca/docs/Web/JavaScript/Referencia/Objectes_globals/Math/round /ca/docs/Web/JavaScript/Reference/Global_Objects/Math/round +/ca/docs/Web/JavaScript/Referencia/Objectes_globals/Math/sign /ca/docs/Web/JavaScript/Reference/Global_Objects/Math/sign +/ca/docs/Web/JavaScript/Referencia/Objectes_globals/Math/sin /ca/docs/Web/JavaScript/Reference/Global_Objects/Math/sin +/ca/docs/Web/JavaScript/Referencia/Objectes_globals/Math/sinh /ca/docs/Web/JavaScript/Reference/Global_Objects/Math/sinh +/ca/docs/Web/JavaScript/Referencia/Objectes_globals/Math/sqrt /ca/docs/Web/JavaScript/Reference/Global_Objects/Math/sqrt +/ca/docs/Web/JavaScript/Referencia/Objectes_globals/Math/tan /ca/docs/Web/JavaScript/Reference/Global_Objects/Math/tan +/ca/docs/Web/JavaScript/Referencia/Objectes_globals/Math/tanh /ca/docs/Web/JavaScript/Reference/Global_Objects/Math/tanh +/ca/docs/Web/JavaScript/Referencia/Objectes_globals/Math/trunc /ca/docs/Web/JavaScript/Reference/Global_Objects/Math/trunc +/ca/docs/Web/JavaScript/Referencia/Objectes_globals/NaN /ca/docs/Web/JavaScript/Reference/Global_Objects/NaN +/ca/docs/Web/JavaScript/Referencia/Objectes_globals/Number /ca/docs/Web/JavaScript/Reference/Global_Objects/Number +/ca/docs/Web/JavaScript/Referencia/Objectes_globals/Number/EPSILON /ca/docs/Web/JavaScript/Reference/Global_Objects/Number/EPSILON +/ca/docs/Web/JavaScript/Referencia/Objectes_globals/Number/MAX_SAFE_INTEGER /ca/docs/Web/JavaScript/Reference/Global_Objects/Number/MAX_SAFE_INTEGER +/ca/docs/Web/JavaScript/Referencia/Objectes_globals/Number/MAX_VALUE /ca/docs/Web/JavaScript/Reference/Global_Objects/Number/MAX_VALUE +/ca/docs/Web/JavaScript/Referencia/Objectes_globals/Number/MIN_SAFE_INTEGER /ca/docs/Web/JavaScript/Reference/Global_Objects/Number/MIN_SAFE_INTEGER +/ca/docs/Web/JavaScript/Referencia/Objectes_globals/Number/MIN_VALUE /ca/docs/Web/JavaScript/Reference/Global_Objects/Number/MIN_VALUE +/ca/docs/Web/JavaScript/Referencia/Objectes_globals/Number/NEGATIVE_INFINITY /ca/docs/Web/JavaScript/Reference/Global_Objects/Number/NEGATIVE_INFINITY +/ca/docs/Web/JavaScript/Referencia/Objectes_globals/Number/NaN /ca/docs/Web/JavaScript/Reference/Global_Objects/Number/NaN +/ca/docs/Web/JavaScript/Referencia/Objectes_globals/Number/POSITIVE_INFINITY /ca/docs/Web/JavaScript/Reference/Global_Objects/Number/POSITIVE_INFINITY +/ca/docs/Web/JavaScript/Referencia/Objectes_globals/Number/isFinite /ca/docs/Web/JavaScript/Reference/Global_Objects/Number/isFinite +/ca/docs/Web/JavaScript/Referencia/Objectes_globals/Number/isInteger /ca/docs/Web/JavaScript/Reference/Global_Objects/Number/isInteger +/ca/docs/Web/JavaScript/Referencia/Objectes_globals/Number/isNaN /ca/docs/Web/JavaScript/Reference/Global_Objects/Number/isNaN +/ca/docs/Web/JavaScript/Referencia/Objectes_globals/Number/isSafeInteger /ca/docs/Web/JavaScript/Reference/Global_Objects/Number/isSafeInteger +/ca/docs/Web/JavaScript/Referencia/Objectes_globals/Number/parseFloat /ca/docs/Web/JavaScript/Reference/Global_Objects/Number/parseFloat +/ca/docs/Web/JavaScript/Referencia/Objectes_globals/Number/parseInt /ca/docs/Web/JavaScript/Reference/Global_Objects/Number/parseInt +/ca/docs/Web/JavaScript/Referencia/Objectes_globals/Number/prototype /ca/docs/conflicting/Web/JavaScript/Reference/Global_Objects/Number +/ca/docs/Web/JavaScript/Referencia/Objectes_globals/Number/toExponential /ca/docs/Web/JavaScript/Reference/Global_Objects/Number/toExponential +/ca/docs/Web/JavaScript/Referencia/Objectes_globals/Number/toFixed /ca/docs/Web/JavaScript/Reference/Global_Objects/Number/toFixed +/ca/docs/Web/JavaScript/Referencia/Objectes_globals/Number/toPrecision /ca/docs/Web/JavaScript/Reference/Global_Objects/Number/toPrecision +/ca/docs/Web/JavaScript/Referencia/Objectes_globals/Number/toString /ca/docs/Web/JavaScript/Reference/Global_Objects/Number/toString +/ca/docs/Web/JavaScript/Referencia/Objectes_globals/Set /ca/docs/Web/JavaScript/Reference/Global_Objects/Set +/ca/docs/Web/JavaScript/Referencia/Objectes_globals/Set/add /ca/docs/Web/JavaScript/Reference/Global_Objects/Set/add +/ca/docs/Web/JavaScript/Referencia/Objectes_globals/Set/clear /ca/docs/Web/JavaScript/Reference/Global_Objects/Set/clear +/ca/docs/Web/JavaScript/Referencia/Objectes_globals/Set/delete /ca/docs/Web/JavaScript/Reference/Global_Objects/Set/delete +/ca/docs/Web/JavaScript/Referencia/Objectes_globals/Set/entries /ca/docs/Web/JavaScript/Reference/Global_Objects/Set/entries +/ca/docs/Web/JavaScript/Referencia/Objectes_globals/Set/has /ca/docs/Web/JavaScript/Reference/Global_Objects/Set/has +/ca/docs/Web/JavaScript/Referencia/Objectes_globals/Set/prototype /ca/docs/conflicting/Web/JavaScript/Reference/Global_Objects/Set +/ca/docs/Web/JavaScript/Referencia/Objectes_globals/Set/values /ca/docs/Web/JavaScript/Reference/Global_Objects/Set/values +/ca/docs/Web/JavaScript/Referencia/Objectes_globals/String /ca/docs/Web/JavaScript/Reference/Global_Objects/String +/ca/docs/Web/JavaScript/Referencia/Objectes_globals/String/Trim /ca/docs/Web/JavaScript/Reference/Global_Objects/String/Trim +/ca/docs/Web/JavaScript/Referencia/Objectes_globals/String/TrimLeft /ca/docs/Web/JavaScript/Reference/Global_Objects/String/trimStart +/ca/docs/Web/JavaScript/Referencia/Objectes_globals/String/TrimRight /ca/docs/Web/JavaScript/Reference/Global_Objects/String/trimEnd +/ca/docs/Web/JavaScript/Referencia/Objectes_globals/String/anchor /ca/docs/Web/JavaScript/Reference/Global_Objects/String/anchor +/ca/docs/Web/JavaScript/Referencia/Objectes_globals/String/big /ca/docs/Web/JavaScript/Reference/Global_Objects/String/big +/ca/docs/Web/JavaScript/Referencia/Objectes_globals/String/blink /ca/docs/Web/JavaScript/Reference/Global_Objects/String/blink +/ca/docs/Web/JavaScript/Referencia/Objectes_globals/String/bold /ca/docs/Web/JavaScript/Reference/Global_Objects/String/bold +/ca/docs/Web/JavaScript/Referencia/Objectes_globals/String/charAt /ca/docs/Web/JavaScript/Reference/Global_Objects/String/charAt +/ca/docs/Web/JavaScript/Referencia/Objectes_globals/String/concat /ca/docs/Web/JavaScript/Reference/Global_Objects/String/concat +/ca/docs/Web/JavaScript/Referencia/Objectes_globals/String/endsWith /ca/docs/Web/JavaScript/Reference/Global_Objects/String/endsWith +/ca/docs/Web/JavaScript/Referencia/Objectes_globals/String/fixed /ca/docs/Web/JavaScript/Reference/Global_Objects/String/fixed +/ca/docs/Web/JavaScript/Referencia/Objectes_globals/String/fontcolor /ca/docs/Web/JavaScript/Reference/Global_Objects/String/fontcolor +/ca/docs/Web/JavaScript/Referencia/Objectes_globals/String/fontsize /ca/docs/Web/JavaScript/Reference/Global_Objects/String/fontsize +/ca/docs/Web/JavaScript/Referencia/Objectes_globals/String/fromCharCode /ca/docs/Web/JavaScript/Reference/Global_Objects/String/fromCharCode +/ca/docs/Web/JavaScript/Referencia/Objectes_globals/String/indexOf /ca/docs/Web/JavaScript/Reference/Global_Objects/String/indexOf +/ca/docs/Web/JavaScript/Referencia/Objectes_globals/String/italics /ca/docs/Web/JavaScript/Reference/Global_Objects/String/italics +/ca/docs/Web/JavaScript/Referencia/Objectes_globals/String/length /ca/docs/Web/JavaScript/Reference/Global_Objects/String/length +/ca/docs/Web/JavaScript/Referencia/Objectes_globals/String/link /ca/docs/Web/JavaScript/Reference/Global_Objects/String/link +/ca/docs/Web/JavaScript/Referencia/Objectes_globals/String/normalize /ca/docs/Web/JavaScript/Reference/Global_Objects/String/normalize +/ca/docs/Web/JavaScript/Referencia/Objectes_globals/String/small /ca/docs/Web/JavaScript/Reference/Global_Objects/String/small +/ca/docs/Web/JavaScript/Referencia/Objectes_globals/String/startsWith /ca/docs/Web/JavaScript/Reference/Global_Objects/String/startsWith +/ca/docs/Web/JavaScript/Referencia/Objectes_globals/String/sub /ca/docs/Web/JavaScript/Reference/Global_Objects/String/sub +/ca/docs/Web/JavaScript/Referencia/Objectes_globals/String/substr /ca/docs/Web/JavaScript/Reference/Global_Objects/String/substr +/ca/docs/Web/JavaScript/Referencia/Objectes_globals/String/sup /ca/docs/Web/JavaScript/Reference/Global_Objects/String/sup +/ca/docs/Web/JavaScript/Referencia/Objectes_globals/String/toLocaleLowerCase /ca/docs/Web/JavaScript/Reference/Global_Objects/String/toLocaleLowerCase +/ca/docs/Web/JavaScript/Referencia/Objectes_globals/String/toLocaleUpperCase /ca/docs/Web/JavaScript/Reference/Global_Objects/String/toLocaleUpperCase +/ca/docs/Web/JavaScript/Referencia/Objectes_globals/String/toLowerCase /ca/docs/Web/JavaScript/Reference/Global_Objects/String/toLowerCase +/ca/docs/Web/JavaScript/Referencia/Objectes_globals/String/toString /ca/docs/Web/JavaScript/Reference/Global_Objects/String/toString +/ca/docs/Web/JavaScript/Referencia/Objectes_globals/String/toUpperCase /ca/docs/Web/JavaScript/Reference/Global_Objects/String/toUpperCase +/ca/docs/Web/JavaScript/Referencia/Objectes_globals/SyntaxError /ca/docs/Web/JavaScript/Reference/Global_Objects/SyntaxError +/ca/docs/Web/JavaScript/Referencia/Objectes_globals/SyntaxError/prototype /ca/docs/conflicting/Web/JavaScript/Reference/Global_Objects/SyntaxError +/ca/docs/Web/JavaScript/Referencia/Objectes_globals/null /ca/docs/Web/JavaScript/Reference/Global_Objects/null +/ca/docs/Web/JavaScript/Referencia/Objectes_globals/parseFloat /ca/docs/Web/JavaScript/Reference/Global_Objects/parseFloat +/ca/docs/Web/JavaScript/Referencia/Objectes_globals/undefined /ca/docs/Web/JavaScript/Reference/Global_Objects/undefined +/ca/docs/Web/JavaScript/Referencia/Objectes_standard /ca/docs/Web/JavaScript/Reference/Global_Objects +/ca/docs/Web/JavaScript/Referencia/Objectes_standard/Boolean /ca/docs/Web/JavaScript/Reference/Global_Objects/Boolean +/ca/docs/Web/JavaScript/Referencia/Objectes_standard/Boolean/prototype /ca/docs/conflicting/Web/JavaScript/Reference/Global_Objects/Boolean +/ca/docs/Web/JavaScript/Referencia/Objectes_standard/Boolean/toSource /ca/docs/Web/JavaScript/Reference/Global_Objects/Boolean/toSource +/ca/docs/Web/JavaScript/Referencia/Objectes_standard/Boolean/toString /ca/docs/Web/JavaScript/Reference/Global_Objects/Boolean/toString +/ca/docs/Web/JavaScript/Referencia/Objectes_standard/Boolean/valueOf /ca/docs/Web/JavaScript/Reference/Global_Objects/Boolean/valueOf +/ca/docs/Web/JavaScript/Referencia/Objectes_standard/Date /ca/docs/Web/JavaScript/Reference/Global_Objects/Date +/ca/docs/Web/JavaScript/Referencia/Objectes_standard/Date/getDay /ca/docs/Web/JavaScript/Reference/Global_Objects/Date/getDay +/ca/docs/Web/JavaScript/Referencia/Objectes_standard/Date/getFullYear /ca/docs/Web/JavaScript/Reference/Global_Objects/Date/getFullYear +/ca/docs/Web/JavaScript/Referencia/Objectes_standard/Date/getHours /ca/docs/Web/JavaScript/Reference/Global_Objects/Date/getHours +/ca/docs/Web/JavaScript/Referencia/Objectes_standard/Date/getMilliseconds /ca/docs/Web/JavaScript/Reference/Global_Objects/Date/getMilliseconds +/ca/docs/Web/JavaScript/Referencia/Objectes_standard/Date/getMinutes /ca/docs/Web/JavaScript/Reference/Global_Objects/Date/getMinutes +/ca/docs/Web/JavaScript/Referencia/Objectes_standard/Date/getMonth /ca/docs/Web/JavaScript/Reference/Global_Objects/Date/getMonth +/ca/docs/Web/JavaScript/Referencia/Objectes_standard/Date/getSeconds /ca/docs/Web/JavaScript/Reference/Global_Objects/Date/getSeconds +/ca/docs/Web/JavaScript/Referencia/Objectes_standard/Date/now /ca/docs/Web/JavaScript/Reference/Global_Objects/Date/now +/ca/docs/Web/JavaScript/Referencia/Objectes_standard/Date/prototype /ca/docs/conflicting/Web/JavaScript/Reference/Global_Objects/Date +/ca/docs/Web/JavaScript/Referencia/Objectes_standard/Error /ca/docs/Web/JavaScript/Reference/Global_Objects/Error +/ca/docs/Web/JavaScript/Referencia/Objectes_standard/Error/columnNumber /ca/docs/Web/JavaScript/Reference/Global_Objects/Error/columnNumber +/ca/docs/Web/JavaScript/Referencia/Objectes_standard/Error/fileName /ca/docs/Web/JavaScript/Reference/Global_Objects/Error/fileName +/ca/docs/Web/JavaScript/Referencia/Objectes_standard/Error/lineNumber /ca/docs/Web/JavaScript/Reference/Global_Objects/Error/lineNumber +/ca/docs/Web/JavaScript/Referencia/Objectes_standard/Error/message /ca/docs/Web/JavaScript/Reference/Global_Objects/Error/message +/ca/docs/Web/JavaScript/Referencia/Objectes_standard/Error/name /ca/docs/Web/JavaScript/Reference/Global_Objects/Error/name +/ca/docs/Web/JavaScript/Referencia/Objectes_standard/Error/prototype /ca/docs/conflicting/Web/JavaScript/Reference/Global_Objects/Error +/ca/docs/Web/JavaScript/Referencia/Objectes_standard/Error/toString /ca/docs/Web/JavaScript/Reference/Global_Objects/Error/toString +/ca/docs/Web/JavaScript/Referencia/Objectes_standard/Infinity /ca/docs/Web/JavaScript/Reference/Global_Objects/Infinity +/ca/docs/Web/JavaScript/Referencia/Objectes_standard/JSON /ca/docs/Web/JavaScript/Reference/Global_Objects/JSON +/ca/docs/Web/JavaScript/Referencia/Objectes_standard/Map /ca/docs/Web/JavaScript/Reference/Global_Objects/Map +/ca/docs/Web/JavaScript/Referencia/Objectes_standard/Math /ca/docs/Web/JavaScript/Reference/Global_Objects/Math +/ca/docs/Web/JavaScript/Referencia/Objectes_standard/Math/E /ca/docs/Web/JavaScript/Reference/Global_Objects/Math/E +/ca/docs/Web/JavaScript/Referencia/Objectes_standard/Math/LN10 /ca/docs/Web/JavaScript/Reference/Global_Objects/Math/LN10 +/ca/docs/Web/JavaScript/Referencia/Objectes_standard/Math/LN2 /ca/docs/Web/JavaScript/Reference/Global_Objects/Math/LN2 +/ca/docs/Web/JavaScript/Referencia/Objectes_standard/Math/LOG10E /ca/docs/Web/JavaScript/Reference/Global_Objects/Math/LOG10E +/ca/docs/Web/JavaScript/Referencia/Objectes_standard/Math/LOG2E /ca/docs/Web/JavaScript/Reference/Global_Objects/Math/LOG2E +/ca/docs/Web/JavaScript/Referencia/Objectes_standard/Math/PI /ca/docs/Web/JavaScript/Reference/Global_Objects/Math/PI +/ca/docs/Web/JavaScript/Referencia/Objectes_standard/Math/SQRT1_2 /ca/docs/Web/JavaScript/Reference/Global_Objects/Math/SQRT1_2 +/ca/docs/Web/JavaScript/Referencia/Objectes_standard/Math/SQRT2 /ca/docs/Web/JavaScript/Reference/Global_Objects/Math/SQRT2 +/ca/docs/Web/JavaScript/Referencia/Objectes_standard/Math/abs /ca/docs/Web/JavaScript/Reference/Global_Objects/Math/abs +/ca/docs/Web/JavaScript/Referencia/Objectes_standard/Math/acos /ca/docs/Web/JavaScript/Reference/Global_Objects/Math/acos +/ca/docs/Web/JavaScript/Referencia/Objectes_standard/Math/asin /ca/docs/Web/JavaScript/Reference/Global_Objects/Math/asin +/ca/docs/Web/JavaScript/Referencia/Objectes_standard/Math/atan /ca/docs/Web/JavaScript/Reference/Global_Objects/Math/atan +/ca/docs/Web/JavaScript/Referencia/Objectes_standard/Math/ceil /ca/docs/Web/JavaScript/Reference/Global_Objects/Math/ceil +/ca/docs/Web/JavaScript/Referencia/Objectes_standard/Math/cos /ca/docs/Web/JavaScript/Reference/Global_Objects/Math/cos +/ca/docs/Web/JavaScript/Referencia/Objectes_standard/Math/floor /ca/docs/Web/JavaScript/Reference/Global_Objects/Math/floor +/ca/docs/Web/JavaScript/Referencia/Objectes_standard/Math/sin /ca/docs/Web/JavaScript/Reference/Global_Objects/Math/sin +/ca/docs/Web/JavaScript/Referencia/Objectes_standard/Math/tan /ca/docs/Web/JavaScript/Reference/Global_Objects/Math/tan +/ca/docs/Web/JavaScript/Referencia/Objectes_standard/NaN /ca/docs/Web/JavaScript/Reference/Global_Objects/NaN +/ca/docs/Web/JavaScript/Referencia/Objectes_standard/Number /ca/docs/Web/JavaScript/Reference/Global_Objects/Number +/ca/docs/Web/JavaScript/Referencia/Objectes_standard/Number/EPSILON /ca/docs/Web/JavaScript/Reference/Global_Objects/Number/EPSILON +/ca/docs/Web/JavaScript/Referencia/Objectes_standard/Number/MAX_SAFE_INTEGER /ca/docs/Web/JavaScript/Reference/Global_Objects/Number/MAX_SAFE_INTEGER +/ca/docs/Web/JavaScript/Referencia/Objectes_standard/Number/MAX_VALUE /ca/docs/Web/JavaScript/Reference/Global_Objects/Number/MAX_VALUE +/ca/docs/Web/JavaScript/Referencia/Objectes_standard/Number/MIN_SAFE_INTEGER /ca/docs/Web/JavaScript/Reference/Global_Objects/Number/MIN_SAFE_INTEGER +/ca/docs/Web/JavaScript/Referencia/Objectes_standard/Number/MIN_VALUE /ca/docs/Web/JavaScript/Reference/Global_Objects/Number/MIN_VALUE +/ca/docs/Web/JavaScript/Referencia/Objectes_standard/Number/NEGATIVE_INFINITY /ca/docs/Web/JavaScript/Reference/Global_Objects/Number/NEGATIVE_INFINITY +/ca/docs/Web/JavaScript/Referencia/Objectes_standard/Number/NaN /ca/docs/Web/JavaScript/Reference/Global_Objects/Number/NaN +/ca/docs/Web/JavaScript/Referencia/Objectes_standard/String /ca/docs/Web/JavaScript/Reference/Global_Objects/String +/ca/docs/Web/JavaScript/Referencia/Objectes_standard/String/length /ca/docs/Web/JavaScript/Reference/Global_Objects/String/length +/ca/docs/Web/JavaScript/Referencia/Objectes_standard/null /ca/docs/Web/JavaScript/Reference/Global_Objects/null +/ca/docs/Web/JavaScript/Referencia/Objectes_standard/undefined /ca/docs/Web/JavaScript/Reference/Global_Objects/undefined +/ca/docs/Web/JavaScript/Referencia/Operadors /ca/docs/Web/JavaScript/Reference/Operators +/ca/docs/Web/JavaScript/Referencia/Operadors/Arithmetic_Operators /ca/docs/conflicting/Web/JavaScript/Reference/Operators +/ca/docs/Web/JavaScript/Referencia/Operadors/Bitwise_Operators /ca/docs/conflicting/Web/JavaScript/Reference/Operators_94c03c413a71df1ccff4c3ede275360c +/ca/docs/Web/JavaScript/Referencia/Operadors/Conditional_Operator /ca/docs/Web/JavaScript/Reference/Operators/Conditional_Operator +/ca/docs/Web/JavaScript/Referencia/Operadors/Grouping /ca/docs/Web/JavaScript/Reference/Operators/Grouping +/ca/docs/Web/JavaScript/Referencia/Operadors/Logical_Operators /ca/docs/conflicting/Web/JavaScript/Reference/Operators_af596841c6a3650ee514088f0e310901 +/ca/docs/Web/JavaScript/Referencia/Operadors/Operador_Coma /ca/docs/Web/JavaScript/Reference/Operators/Comma_Operator +/ca/docs/Web/JavaScript/Referencia/Operadors/function /ca/docs/Web/JavaScript/Reference/Operators/function +/ca/docs/Web/JavaScript/Referencia/Operadors/super /ca/docs/Web/JavaScript/Reference/Operators/super +/ca/docs/Web/JavaScript/Referencia/Operadors/typeof /ca/docs/Web/JavaScript/Reference/Operators/typeof +/ca/docs/Web/JavaScript/Referencia/Operadors/void /ca/docs/Web/JavaScript/Reference/Operators/void +/ca/docs/Web/JavaScript/Referencia/Operadors/yield /ca/docs/Web/JavaScript/Reference/Operators/yield +/ca/docs/Web/JavaScript/Referencia/Sentencies /ca/docs/Web/JavaScript/Reference/Statements +/ca/docs/Web/JavaScript/Referencia/Sentencies/Buida /ca/docs/Web/JavaScript/Reference/Statements/Empty +/ca/docs/Web/JavaScript/Referencia/Sentencies/block /ca/docs/Web/JavaScript/Reference/Statements/block +/ca/docs/Web/JavaScript/Referencia/Sentencies/break /ca/docs/Web/JavaScript/Reference/Statements/break +/ca/docs/Web/JavaScript/Referencia/Sentencies/continue /ca/docs/Web/JavaScript/Reference/Statements/continue +/ca/docs/Web/JavaScript/Referencia/Sentencies/debugger /ca/docs/Web/JavaScript/Reference/Statements/debugger +/ca/docs/Web/JavaScript/Referencia/Sentencies/do...while /ca/docs/Web/JavaScript/Reference/Statements/do...while +/ca/docs/Web/JavaScript/Referencia/Sentencies/export /ca/docs/Web/JavaScript/Reference/Statements/export +/ca/docs/Web/JavaScript/Referencia/Sentencies/for /ca/docs/Web/JavaScript/Reference/Statements/for +/ca/docs/Web/JavaScript/Referencia/Sentencies/for...of /ca/docs/Web/JavaScript/Reference/Statements/for...of +/ca/docs/Web/JavaScript/Referencia/Sentencies/function /ca/docs/Web/JavaScript/Reference/Statements/function +/ca/docs/Web/JavaScript/Referencia/Sentencies/if...else /ca/docs/Web/JavaScript/Reference/Statements/if...else +/ca/docs/Web/JavaScript/Referencia/Sentencies/return /ca/docs/Web/JavaScript/Reference/Statements/return +/ca/docs/Web/JavaScript/Referencia/Sentencies/throw /ca/docs/Web/JavaScript/Reference/Statements/throw +/ca/docs/Web/JavaScript/Referencia/Sentencies/while /ca/docs/Web/JavaScript/Reference/Statements/while +/ca/docs/Web/JavaScript/Referencia/Sobre /ca/docs/Web/JavaScript/Reference/About +/ca/docs/Web/JavaScript/quant_a_JavaScript /ca/docs/Web/JavaScript/About_JavaScript +/ca/docs/Web_Development /ca/docs/conflicting/Web/Guide +/ca/docs/Web_Development/Mobile /ca/docs/Web/Guide/Mobile +/ca/docs/Web_Development/Mobile/A_hybrid_approach /ca/docs/Web/Guide/Mobile/A_hybrid_approach +/ca/docs/Web_Development/Mobile/Mobile-friendliness /ca/docs/Web/Guide/Mobile/Mobile-friendliness +/ca/docs/Web_Development/Mobile/Responsive_design /ca/docs/Web/Progressive_web_apps +/ca/docs/Web_Development/Mobile/Separate_sites /ca/docs/Web/Guide/Mobile/Separate_sites /ca/docs/XSLT /ca/docs/Web/XSLT /ca/docs/en /en-US/ diff --git a/files/ca/_wikihistory.json b/files/ca/_wikihistory.json index 9106928da6..ba7cbe68aa 100644 --- a/files/ca/_wikihistory.json +++ b/files/ca/_wikihistory.json @@ -1,17 +1,4 @@ { - "Addició_de_motors_de_cerca_a_les_pàgines_web": { - "modified": "2019-01-16T15:50:29.790Z", - "contributors": [ - "Toniher" - ] - }, - "Firefox_2_per_a_desenvolupadors": { - "modified": "2019-01-16T14:39:26.842Z", - "contributors": [ - "fscholz", - "Toniher" - ] - }, "Glossary": { "modified": "2020-10-07T11:07:12.440Z", "contributors": [ @@ -45,12 +32,6 @@ "Legioinvicta" ] }, - "Glossary/Atribut": { - "modified": "2019-03-23T22:19:53.370Z", - "contributors": [ - "Legioinvicta" - ] - }, "Glossary/Boolean": { "modified": "2019-03-23T22:19:54.285Z", "contributors": [ @@ -64,18 +45,6 @@ "Legioinvicta" ] }, - "Glossary/Caràcter": { - "modified": "2019-03-23T22:19:53.728Z", - "contributors": [ - "Legioinvicta" - ] - }, - "Glossary/Codificació_de_caràcters": { - "modified": "2019-03-23T22:19:50.642Z", - "contributors": [ - "Legioinvicta" - ] - }, "Glossary/DOM": { "modified": "2019-03-23T22:19:56.910Z", "contributors": [ @@ -88,24 +57,12 @@ "Legioinvicta" ] }, - "Glossary/Etiqueta": { - "modified": "2019-03-23T22:19:57.140Z", - "contributors": [ - "Legioinvicta" - ] - }, "Glossary/FTP": { "modified": "2019-03-23T22:19:59.099Z", "contributors": [ "Legioinvicta" ] }, - "Glossary/Funció": { - "modified": "2019-03-23T22:19:50.324Z", - "contributors": [ - "Legioinvicta" - ] - }, "Glossary/HTML": { "modified": "2020-02-14T08:10:01.788Z", "contributors": [ @@ -149,18 +106,6 @@ "Legioinvicta" ] }, - "Glossary/Mètode": { - "modified": "2019-03-23T22:20:05.381Z", - "contributors": [ - "Legioinvicta" - ] - }, - "Glossary/Navegador": { - "modified": "2019-03-23T22:19:58.039Z", - "contributors": [ - "Legioinvicta" - ] - }, "Glossary/Null": { "modified": "2019-03-23T22:19:50.738Z", "contributors": [ @@ -179,24 +124,6 @@ "Legioinvicta" ] }, - "Glossary/Objecte": { - "modified": "2019-03-23T22:19:50.943Z", - "contributors": [ - "Legioinvicta" - ] - }, - "Glossary/Primitiu": { - "modified": "2019-03-23T22:20:08.496Z", - "contributors": [ - "Legioinvicta" - ] - }, - "Glossary/Propietat": { - "modified": "2019-03-23T22:20:10.616Z", - "contributors": [ - "Legioinvicta" - ] - }, "Glossary/Protocol": { "modified": "2019-03-23T22:19:58.471Z", "contributors": [ @@ -222,12 +149,6 @@ "Legioinvicta" ] }, - "Glossary/Servidor": { - "modified": "2019-03-23T22:19:48.520Z", - "contributors": [ - "Legioinvicta" - ] - }, "Glossary/String": { "modified": "2019-03-23T22:19:52.941Z", "contributors": [ @@ -258,12 +179,6 @@ "Legioinvicta" ] }, - "Glossary/Valor": { - "modified": "2019-03-23T22:20:04.109Z", - "contributors": [ - "Legioinvicta" - ] - }, "Glossary/World_Wide_Web": { "modified": "2019-03-23T22:19:59.394Z", "contributors": [ @@ -282,30 +197,12 @@ "Legioinvicta" ] }, - "Glossary/adreça_IP": { - "modified": "2019-03-23T22:19:57.768Z", - "contributors": [ - "Legioinvicta" - ] - }, - "Glossary/referències_a_objectes": { - "modified": "2019-03-23T22:20:02.599Z", - "contributors": [ - "Legioinvicta" - ] - }, "Glossary/undefined": { "modified": "2019-03-23T22:19:52.843Z", "contributors": [ "Legioinvicta" ] }, - "Glossary/Àmbit": { - "modified": "2019-03-23T22:20:06.122Z", - "contributors": [ - "Legioinvicta" - ] - }, "Learn": { "modified": "2020-07-16T22:43:38.266Z", "contributors": [ @@ -341,13 +238,6 @@ "UOCccorcoles" ] }, - "Learn/Accessibility/Que_es_accessibilitat": { - "modified": "2020-09-28T14:42:22.680Z", - "contributors": [ - "PalomaBanyuls", - "editorUOC" - ] - }, "Learn/CSS": { "modified": "2020-07-16T22:25:32.427Z", "contributors": [ @@ -368,81 +258,12 @@ "Legioinvicta" ] }, - "Learn/CSS/Building_blocks/Cascada_i_herència": { - "modified": "2020-09-06T11:07:02.729Z", - "contributors": [ - "UOCccorcoles", - "editorUOC" - ] - }, - "Learn/CSS/Building_blocks/Depurar_el_CSS": { - "modified": "2020-10-15T22:27:14.006Z", - "contributors": [ - "UOCccorcoles", - "editorUOC" - ] - }, - "Learn/CSS/Building_blocks/Desbordament_de_contingut": { - "modified": "2020-09-07T07:28:16.584Z", - "contributors": [ - "UOCccorcoles", - "editorUOC" - ] - }, - "Learn/CSS/Building_blocks/Dimensionar_elements_en_CSS": { - "modified": "2020-07-16T22:29:20.212Z", - "contributors": [ - "editorUOC" - ] - }, - "Learn/CSS/Building_blocks/Fons_i_vores": { - "modified": "2020-09-06T17:11:06.366Z", - "contributors": [ - "UOCccorcoles", - "editorUOC" - ] - }, "Learn/CSS/Building_blocks/Images_media_form_elements": { "modified": "2020-07-16T22:29:24.255Z", "contributors": [ "editorUOC" ] }, - "Learn/CSS/Building_blocks/Selectors_CSS": { - "modified": "2020-09-06T12:38:01.863Z", - "contributors": [ - "UOCccorcoles", - "editorUOC" - ] - }, - "Learn/CSS/Building_blocks/Selectors_CSS/Combinadors": { - "modified": "2020-09-06T14:03:41.366Z", - "contributors": [ - "UOCccorcoles", - "editorUOC" - ] - }, - "Learn/CSS/Building_blocks/Selectors_CSS/Pseudo-classes_and_pseudo-elements": { - "modified": "2020-09-06T13:50:00.436Z", - "contributors": [ - "UOCccorcoles", - "editorUOC" - ] - }, - "Learn/CSS/Building_blocks/Selectors_CSS/Selectors_atribut": { - "modified": "2020-09-06T13:31:42.768Z", - "contributors": [ - "UOCccorcoles", - "editorUOC" - ] - }, - "Learn/CSS/Building_blocks/Selectors_CSS/Selectors_de_tipus_classe_i_ID": { - "modified": "2020-09-06T13:14:37.617Z", - "contributors": [ - "UOCccorcoles", - "editorUOC" - ] - }, "Learn/CSS/Building_blocks/Styling_tables": { "modified": "2020-09-14T06:59:58.596Z", "contributors": [ @@ -460,2855 +281,2936 @@ "editorUOC" ] }, - "Learn/CSS/Building_blocks/Valors_i_unitats_CSS": { - "modified": "2020-09-07T09:12:07.786Z", + "Learn/CSS/First_steps": { + "modified": "2020-07-16T22:27:38.616Z", "contributors": [ - "UOCccorcoles", - "editorUOC" + "chrisdavidmills" ] }, - "Learn/CSS/Caixes_estil/Caixa_aspecte_interessant": { - "modified": "2020-07-16T22:28:26.308Z", + "Learn/CSS/Howto": { + "modified": "2020-07-16T22:25:41.769Z", "contributors": [ - "Legioinvicta" + "chrisdavidmills" ] }, - "Learn/CSS/Caixes_estil/Creació_carta": { - "modified": "2020-07-16T22:28:24.307Z", + "Learn/CSS/Howto/Generated_content": { + "modified": "2020-07-16T22:25:47.177Z", "contributors": [ + "chrisdavidmills", "Legioinvicta" ] }, - "Learn/CSS/Disseny_CSS": { - "modified": "2020-07-16T22:26:29.321Z", + "Learn/Getting_started_with_the_web": { + "modified": "2020-07-16T22:33:49.938Z", "contributors": [ + "nuriarai", "Legioinvicta" ] }, - "Learn/CSS/Disseny_CSS/Disseny_responsiu": { - "modified": "2020-09-17T06:03:03.884Z", + "Learn/Getting_started_with_the_web/HTML_basics": { + "modified": "2020-07-16T22:34:42.935Z", "contributors": [ - "UOCccorcoles", - "editorUOC" + "Legioinvicta" ] }, - "Learn/CSS/Disseny_CSS/Exemples_pràctics_posicionament": { - "modified": "2020-07-16T22:26:47.642Z", + "Learn/HTML": { + "modified": "2020-07-16T22:22:15.125Z", "contributors": [ "Legioinvicta" ] }, - "Learn/CSS/Disseny_CSS/Flexbox": { - "modified": "2020-09-15T14:11:31.873Z", + "Learn/JavaScript": { + "modified": "2020-07-16T22:29:37.255Z", "contributors": [ - "UOCccorcoles", - "editorUOC", - "Legioinvicta" + "chrisdavidmills" ] }, - "Learn/CSS/Disseny_CSS/Flotadors": { - "modified": "2020-10-16T13:31:05.489Z", + "Learn/JavaScript/Building_blocks": { + "modified": "2020-07-16T22:31:06.456Z", "contributors": [ - "zuruckzugehen", - "Legioinvicta" + "juanjocardona" ] }, - "Learn/CSS/Disseny_CSS/Flux_normal": { - "modified": "2020-07-16T22:27:20.382Z", + "MDN": { + "modified": "2020-02-19T19:24:46.607Z", "contributors": [ - "editorUOC" + "jswisher", + "SphinxKnight", + "jordibrus", + "wbamberg", + "Legioinvicta", + "Jeremie", + "Sheppy" ] }, - "Learn/CSS/Disseny_CSS/Graelles": { - "modified": "2020-09-15T17:42:28.654Z", + "MDN/Contribute": { + "modified": "2019-03-23T23:01:53.170Z", "contributors": [ - "UOCccorcoles", - "editorUOC", - "Legioinvicta" + "wbamberg", + "Legioinvicta", + "alispivak" ] }, - "Learn/CSS/Disseny_CSS/Introduccio_disseny_CSS": { - "modified": "2020-09-15T13:10:38.905Z", + "MDN/Contribute/Feedback": { + "modified": "2020-09-30T17:50:23.893Z", "contributors": [ - "UOCccorcoles", - "editorUOC", + "chrisdavidmills", + "jswisher", + "SphinxKnight", + "wbamberg", "Legioinvicta" ] }, - "Learn/CSS/Disseny_CSS/Posicionament": { - "modified": "2020-07-16T22:26:41.807Z", + "MDN/Contribute/Getting_started": { + "modified": "2020-09-30T17:09:26.416Z", "contributors": [ - "Legioinvicta" + "chrisdavidmills", + "carlesferreiro", + "jordibrus", + "teoli", + "Thalula", + "Toniher" ] }, - "Learn/CSS/Disseny_CSS/Suport_en_navegadors_antics": { - "modified": "2020-07-16T22:27:17.065Z", + "MDN/Contribute/Howto": { + "modified": "2020-12-14T11:30:11.093Z", "contributors": [ - "editorUOC" + "ExE-Boss" ] }, - "Learn/CSS/Estilitzar_text": { - "modified": "2020-07-16T22:25:57.417Z", + "MDN/Structures": { + "modified": "2020-09-30T09:04:30.231Z", "contributors": [ + "chrisdavidmills", + "wbamberg", "Legioinvicta" ] }, - "Learn/CSS/Estilitzar_text/Composició_pàgina_inici": { - "modified": "2020-07-16T22:26:25.942Z", + "Mozilla": { + "modified": "2019-03-23T23:35:10.538Z", "contributors": [ - "Legioinvicta" + "djpaliobcn", + "ethertank" ] }, - "Learn/CSS/Estilitzar_text/Estilitzar_enllaços": { - "modified": "2020-09-18T08:18:22.715Z", + "Mozilla/Firefox": { + "modified": "2019-09-10T14:45:53.524Z", "contributors": [ - "UOCccorcoles", - "editorUOC", - "Legioinvicta" + "SphinxKnight", + "Prashanth" ] }, - "Learn/CSS/Estilitzar_text/Fonts_Web": { - "modified": "2020-09-01T07:12:36.767Z", + "Mozilla/Firefox/Releases": { + "modified": "2019-03-23T23:26:02.407Z", "contributors": [ - "UOCccorcoles", - "editorUOC", - "Legioinvicta" + "ziyunfei" ] }, - "Learn/CSS/Estilitzar_text/Llistes_estil": { - "modified": "2020-09-18T08:12:42.705Z", + "Tools": { + "modified": "2020-07-16T22:44:13.837Z", "contributors": [ - "UOCccorcoles", - "editorUOC", - "Legioinvicta" + "SphinxKnight", + "wbamberg", + "Legioinvicta", + "jryans" ] }, - "Learn/CSS/Estilitzar_text/Text_fonamental": { - "modified": "2020-09-18T07:56:58.583Z", + "Tools/Remote_Debugging": { + "modified": "2020-07-16T22:35:36.985Z", "contributors": [ - "UOCccorcoles", - "editorUOC", - "Legioinvicta" + "wbamberg", + "Legioinvicta", + "jryans" ] }, - "Learn/CSS/First_steps": { - "modified": "2020-07-16T22:27:38.616Z", + "Web": { + "modified": "2019-08-08T04:25:52.925Z", "contributors": [ - "chrisdavidmills" + "Legioinvicta", + "ethertank" ] }, - "Learn/CSS/First_steps/Com_començar_amb_CSS": { - "modified": "2020-08-31T14:05:15.542Z", + "Web/API": { + "modified": "2019-09-22T13:24:34.476Z", "contributors": [ - "UOCccorcoles", - "editorUOC" + "duduindo", + "escufi" ] }, - "Learn/CSS/First_steps/Com_estructurar_el_CSS": { - "modified": "2020-09-18T07:37:19.056Z", + "Web/API/Canvas_API": { + "modified": "2019-03-23T22:04:17.711Z", "contributors": [ - "UOCccorcoles", - "editorUOC" + "Legioinvicta" ] }, - "Learn/CSS/First_steps/Com_funciona_el_CSS": { - "modified": "2020-09-18T07:45:35.450Z", + "Web/API/Canvas_API/Tutorial": { + "modified": "2019-03-23T22:04:21.400Z", "contributors": [ - "UOCccorcoles", - "editorUOC" + "stephaniehobson" ] }, - "Learn/CSS/First_steps/Que_es_el_CSS": { - "modified": "2020-10-15T22:26:48.511Z", + "Web/API/Canvas_API/Tutorial/Drawing_shapes": { + "modified": "2019-03-23T22:04:18.638Z", "contributors": [ - "UOCccorcoles", - "editorUOC" + "Legioinvicta" ] }, - "Learn/CSS/Howto": { - "modified": "2020-07-16T22:25:41.769Z", + "Web/API/Canvas_API/Tutorial/Using_images": { + "modified": "2019-03-23T22:04:03.392Z", + "contributors": [ + "Legioinvicta" + ] + }, + "Web/API/WebGL_API": { + "modified": "2019-03-23T22:04:45.878Z", + "contributors": [ + "ibesora" + ] + }, + "Web/API/Window": { + "modified": "2019-03-23T22:02:56.882Z", "contributors": [ "chrisdavidmills" ] }, - "Learn/CSS/Howto/Generated_content": { - "modified": "2020-07-16T22:25:47.177Z", + "Web/API/Window/sidebar": { + "modified": "2019-03-23T22:03:04.245Z", "contributors": [ - "chrisdavidmills", - "Legioinvicta" + "IsaacSchemm" ] }, - "Learn/CSS/Introducció_a_CSS/Comprensió_CSS_fonamental": { - "modified": "2020-07-16T22:28:11.319Z", + "Web/CSS": { + "modified": "2019-09-11T03:34:02.747Z", "contributors": [ - "Legioinvicta" + "SphinxKnight", + "Legioinvicta", + "teoli", + "Arnau-siches" ] }, - "Learn/Getting_started_with_the_web": { - "modified": "2020-07-16T22:33:49.938Z", + "Web/CSS/::-moz-progress-bar": { + "modified": "2019-03-23T22:21:20.781Z", "contributors": [ - "nuriarai", "Legioinvicta" ] }, - "Learn/Getting_started_with_the_web/CSS_bàsic": { - "modified": "2020-07-16T22:34:56.090Z", + "Web/CSS/::-moz-range-progress": { + "modified": "2019-03-18T21:17:32.107Z", "contributors": [ + "teoli", "Legioinvicta" ] }, - "Learn/Getting_started_with_the_web/Com_funciona_Web": { - "modified": "2020-07-16T22:33:59.006Z", + "Web/CSS/::-moz-range-thumb": { + "modified": "2019-03-23T22:21:12.717Z", "contributors": [ + "teoli", "Legioinvicta" ] }, - "Learn/Getting_started_with_the_web/HTML_basics": { - "modified": "2020-07-16T22:34:42.935Z", + "Web/CSS/::-moz-range-track": { + "modified": "2019-03-23T22:21:19.893Z", "contributors": [ + "teoli", "Legioinvicta" ] }, - "Learn/Getting_started_with_the_web/Instal·lació_bàsica_programari": { - "modified": "2020-07-16T22:34:06.205Z", + "Web/CSS/::-webkit-progress-bar": { + "modified": "2019-03-23T22:21:15.673Z", "contributors": [ - "editorUOC", - "nuriarai", + "teoli", "Legioinvicta" ] }, - "Learn/Getting_started_with_the_web/JavaScript_bàsic": { - "modified": "2020-07-16T22:35:08.325Z", + "Web/CSS/::-webkit-progress-value": { + "modified": "2019-03-23T22:21:12.226Z", "contributors": [ + "teoli", "Legioinvicta" ] }, - "Learn/Getting_started_with_the_web/Publicar_nostre_lloc_web": { - "modified": "2020-07-16T22:34:23.226Z", + "Web/CSS/::-webkit-slider-runnable-track": { + "modified": "2019-03-23T22:21:12.535Z", "contributors": [ + "teoli", "Legioinvicta" ] }, - "Learn/Getting_started_with_the_web/Quin_aspecte_tindrà_vostre_lloc_web": { - "modified": "2020-07-16T22:34:14.054Z", + "Web/CSS/::-webkit-slider-thumb": { + "modified": "2019-03-23T22:21:19.418Z", "contributors": [ + "teoli", "Legioinvicta" ] }, - "Learn/Getting_started_with_the_web/Tractar_amb_arxius": { - "modified": "2020-07-16T22:34:31.776Z", + "Web/CSS/::after": { + "modified": "2019-03-23T22:21:16.467Z", "contributors": [ "Legioinvicta" ] }, - "Learn/HTML": { - "modified": "2020-07-16T22:22:15.125Z", + "Web/CSS/::backdrop": { + "modified": "2019-03-23T22:21:14.990Z", "contributors": [ "Legioinvicta" ] }, - "Learn/HTML/Forms": { - "modified": "2020-07-16T22:20:53.997Z", + "Web/CSS/::before": { + "modified": "2019-03-23T22:21:17.379Z", "contributors": [ - "chrisdavidmills", "Legioinvicta" ] }, - "Learn/HTML/Forms/Com_estructurar_un_formulari_web": { - "modified": "2020-09-18T11:10:39.794Z", + "Web/CSS/::cue": { + "modified": "2020-10-15T21:58:05.485Z", "contributors": [ - "UOCccorcoles", - "editorUOC" + "Legioinvicta" ] }, - "Learn/HTML/Forms/Controls_de_formulari_originals": { - "modified": "2020-09-15T07:44:08.730Z", + "Web/CSS/::first-letter": { + "modified": "2019-03-23T22:21:13.268Z", "contributors": [ - "UOCccorcoles", - "editorUOC" + "Legioinvicta" ] }, - "Learn/HTML/Forms/El_teu_primer_formulari": { - "modified": "2020-09-18T11:08:30.671Z", + "Web/CSS/::first-line": { + "modified": "2020-10-15T21:51:25.818Z", "contributors": [ - "UOCccorcoles", - "editorUOC" + "SphinxKnight", + "Legioinvicta" ] }, - "Learn/HTML/Forms/Validacio_formularis": { - "modified": "2020-09-18T11:25:33.611Z", + "Web/CSS/::placeholder": { + "modified": "2019-03-23T22:04:44.753Z", "contributors": [ - "UOCccorcoles", - "editorUOC" + "Legioinvicta" ] }, - "Learn/HTML/Introducció_al_HTML": { - "modified": "2020-07-16T22:22:45.604Z", + "Web/CSS/::selection": { + "modified": "2019-03-23T22:21:15.861Z", "contributors": [ "Legioinvicta", - "ccorcoles" + "Winni-" ] }, - "Learn/HTML/Introducció_al_HTML/Crear_hipervincles": { - "modified": "2020-08-31T10:00:44.793Z", + "Web/CSS/:active": { + "modified": "2019-03-23T22:21:47.358Z", "contributors": [ - "UOCccorcoles", - "editorUOC", - "casabona1983", + "fscholz", "Legioinvicta" ] }, - "Learn/HTML/Introducció_al_HTML/Depurar_HTML": { - "modified": "2020-08-31T12:21:35.167Z", + "Web/CSS/:any-link": { + "modified": "2020-10-15T21:51:11.202Z", "contributors": [ - "UOCccorcoles", - "editorUOC", "Legioinvicta" ] }, - "Learn/HTML/Introducció_al_HTML/Document_i_estructura_del_lloc_web": { - "modified": "2020-08-31T11:17:14.859Z", + "Web/CSS/:checked": { + "modified": "2019-03-23T22:21:43.524Z", "contributors": [ - "UOCccorcoles", - "editorUOC", "Legioinvicta" ] }, - "Learn/HTML/Introducció_al_HTML/Estructurar_una_pàgina_de_contingut": { - "modified": "2020-07-16T22:24:17.607Z", + "Web/CSS/:default": { + "modified": "2019-03-23T22:21:38.352Z", "contributors": [ "Legioinvicta" ] }, - "Learn/HTML/Introducció_al_HTML/Fonaments_de_text_HTML": { - "modified": "2020-09-18T05:51:57.560Z", + "Web/CSS/:dir": { + "modified": "2020-10-15T21:51:13.134Z", "contributors": [ - "UOCccorcoles", - "editorUOC", + "SphinxKnight", "Legioinvicta" ] }, - "Learn/HTML/Introducció_al_HTML/Format_de_text_avançat": { - "modified": "2020-09-18T07:30:27.211Z", + "Web/CSS/:disabled": { + "modified": "2019-03-23T22:21:32.327Z", "contributors": [ - "UOCccorcoles", - "editorUOC", "Legioinvicta" ] }, - "Learn/HTML/Introducció_al_HTML/Getting_started": { - "modified": "2020-09-18T05:39:40.192Z", + "Web/CSS/:empty": { + "modified": "2019-03-23T22:21:35.505Z", "contributors": [ - "UOCccorcoles", - "editorUOC", - "casabona1983", - "nuriarai", - "Legioinvicta", - "lawer" + "Legioinvicta" ] }, - "Learn/HTML/Introducció_al_HTML/Marcatge_una_carta": { - "modified": "2020-07-16T22:23:11.111Z", + "Web/CSS/:enabled": { + "modified": "2019-03-23T22:21:33.868Z", "contributors": [ - "laiagabe", "Legioinvicta" ] }, - "Learn/HTML/Introducció_al_HTML/Què_hi_ha_en_el_head_Metadades_en_HTML": { - "modified": "2020-08-31T06:21:25.281Z", + "Web/CSS/:first": { + "modified": "2019-03-23T22:21:35.151Z", "contributors": [ - "UOCccorcoles", - "editorUOC", "Legioinvicta" ] }, - "Learn/HTML/Multimèdia_i_incrustar": { - "modified": "2020-07-16T22:24:24.359Z", + "Web/CSS/:first-child": { + "modified": "2019-03-23T22:21:24.465Z", "contributors": [ "Legioinvicta" ] }, - "Learn/HTML/Multimèdia_i_incrustar/Afegir_gràfics_vectorials_a_la_Web": { - "modified": "2020-07-16T22:24:39.628Z", + "Web/CSS/:first-of-type": { + "modified": "2019-03-23T22:21:27.205Z", "contributors": [ "Legioinvicta" ] }, - "Learn/HTML/Multimèdia_i_incrustar/Contingut_de_vídeo_i_àudio": { - "modified": "2020-07-16T22:24:50.962Z", + "Web/CSS/:focus": { + "modified": "2019-03-23T22:21:23.494Z", "contributors": [ "Legioinvicta" ] }, - "Learn/HTML/Multimèdia_i_incrustar/De_objecte_a_iframe_altres_tecnologies_incrustació": { - "modified": "2020-07-16T22:25:00.150Z", + "Web/CSS/:focus-within": { + "modified": "2019-03-23T22:21:26.997Z", "contributors": [ "Legioinvicta" ] }, - "Learn/HTML/Multimèdia_i_incrustar/Images_in_HTML": { - "modified": "2020-09-01T07:45:13.148Z", + "Web/CSS/:fullscreen": { + "modified": "2019-03-23T22:21:26.360Z", "contributors": [ - "UOCccorcoles", - "editorUOC", "Legioinvicta" ] }, - "Learn/HTML/Multimèdia_i_incrustar/Imatges_sensibles": { - "modified": "2020-07-16T22:24:32.326Z", + "Web/CSS/:hover": { + "modified": "2019-03-23T22:21:27.607Z", "contributors": [ - "rcomellas", "Legioinvicta" ] }, - "Learn/HTML/Multimèdia_i_incrustar/Mozilla_pàgina_de_benvinguda": { - "modified": "2020-07-16T22:25:05.830Z", + "Web/CSS/:in-range": { + "modified": "2020-10-15T21:51:14.757Z", "contributors": [ + "SphinxKnight", "Legioinvicta" ] }, - "Learn/HTML/Taules_HTML": { - "modified": "2020-07-16T22:25:10.298Z", + "Web/CSS/:indeterminate": { + "modified": "2020-10-15T21:51:13.811Z", "contributors": [ + "fscholz", "Legioinvicta" ] }, - "Learn/HTML/Taules_HTML/Avaluació_Estructurar_les_dades_dels_planeta": { - "modified": "2020-07-16T22:25:28.884Z", + "Web/CSS/:invalid": { + "modified": "2020-10-15T21:51:13.214Z", "contributors": [ + "fscholz", "Legioinvicta" ] }, - "Learn/HTML/Taules_HTML/Fonaments_de_la_taula_HTML": { - "modified": "2020-09-09T11:52:32.829Z", + "Web/CSS/:lang": { + "modified": "2019-03-23T22:21:33.229Z", "contributors": [ - "UOCccorcoles", - "editorUOC", "Legioinvicta" ] }, - "Learn/HTML/Taules_HTML/Taula_HTML_característiques_avançades_i_laccessibilitat": { - "modified": "2020-09-09T12:02:19.448Z", + "Web/CSS/:last-child": { + "modified": "2019-03-23T22:21:25.832Z", "contributors": [ - "UOCccorcoles", - "editorUOC", "Legioinvicta" ] }, - "Learn/JavaScript": { - "modified": "2020-07-16T22:29:37.255Z", + "Web/CSS/:last-of-type": { + "modified": "2019-03-23T22:21:30.611Z", "contributors": [ - "chrisdavidmills" + "Legioinvicta" ] }, - "Learn/JavaScript/Building_blocks": { - "modified": "2020-07-16T22:31:06.456Z", + "Web/CSS/:left": { + "modified": "2019-03-23T22:21:34.439Z", "contributors": [ - "juanjocardona" + "Legioinvicta" ] }, - "MDN": { - "modified": "2020-02-19T19:24:46.607Z", + "Web/CSS/:link": { + "modified": "2019-03-23T22:21:32.532Z", "contributors": [ - "jswisher", - "SphinxKnight", - "jordibrus", - "wbamberg", - "Legioinvicta", - "Jeremie", - "Sheppy" + "Legioinvicta" ] }, - "MDN/Comunitat": { - "modified": "2019-09-11T08:03:49.400Z", + "Web/CSS/:not": { + "modified": "2019-03-23T22:21:28.771Z", "contributors": [ - "SphinxKnight", - "wbamberg", "Legioinvicta" ] }, - "MDN/Contribute": { - "modified": "2019-03-23T23:01:53.170Z", + "Web/CSS/:nth-child": { + "modified": "2019-03-23T22:21:24.163Z", "contributors": [ - "wbamberg", - "Legioinvicta", - "alispivak" + "Legioinvicta" ] }, - "MDN/Contribute/Feedback": { - "modified": "2020-09-30T17:50:23.893Z", + "Web/CSS/:nth-last-child": { + "modified": "2019-03-23T22:21:28.310Z", "contributors": [ - "chrisdavidmills", - "jswisher", - "SphinxKnight", - "wbamberg", "Legioinvicta" ] }, - "MDN/Contribute/Getting_started": { - "modified": "2020-09-30T17:09:26.416Z", + "Web/CSS/:nth-last-of-type": { + "modified": "2019-03-23T22:21:29.535Z", "contributors": [ - "chrisdavidmills", - "carlesferreiro", - "jordibrus", - "teoli", - "Thalula", - "Toniher" + "Legioinvicta" ] }, - "MDN/Contribute/Howto": { - "modified": "2020-12-14T11:30:11.093Z", + "Web/CSS/:nth-of-type": { + "modified": "2019-03-23T22:21:34.038Z", "contributors": [ - "ExE-Boss" + "Legioinvicta" ] }, - "MDN/Contribute/Howto/Crear_un_compte_MDN": { - "modified": "2019-03-18T21:20:46.294Z", + "Web/CSS/:only-child": { + "modified": "2019-03-18T21:15:27.539Z", "contributors": [ - "jordibrus" + "Legioinvicta" ] }, - "MDN/Contribute/Processos": { - "modified": "2019-01-17T01:56:28.494Z", + "Web/CSS/:only-of-type": { + "modified": "2019-03-23T22:21:32.125Z", "contributors": [ - "wbamberg", "Legioinvicta" ] }, - "MDN/Kuma": { - "modified": "2019-09-09T15:51:48.851Z", + "Web/CSS/:optional": { + "modified": "2019-03-23T22:21:26.032Z", "contributors": [ - "SphinxKnight", - "wbamberg", "Legioinvicta" ] }, - "MDN/Structures": { - "modified": "2020-09-30T09:04:30.231Z", + "Web/CSS/:out-of-range": { + "modified": "2019-03-23T22:21:27.814Z", "contributors": [ - "chrisdavidmills", - "wbamberg", "Legioinvicta" ] }, - "MDN_at_ten": { - "modified": "2019-03-23T22:45:53.203Z", + "Web/CSS/:placeholder-shown": { + "modified": "2019-03-23T22:21:28.063Z", "contributors": [ - "llue" + "Legioinvicta" ] }, - "Mozilla": { - "modified": "2019-03-23T23:35:10.538Z", + "Web/CSS/:read-only": { + "modified": "2020-10-15T21:51:14.863Z", "contributors": [ - "djpaliobcn", - "ethertank" + "fscholz", + "Legioinvicta" ] }, - "Mozilla/Firefox": { - "modified": "2019-09-10T14:45:53.524Z", + "Web/CSS/:read-write": { + "modified": "2020-10-15T21:51:12.394Z", "contributors": [ - "SphinxKnight", - "Prashanth" + "fscholz", + "Legioinvicta" ] }, - "Mozilla/Firefox/Releases": { - "modified": "2019-03-23T23:26:02.407Z", + "Web/CSS/:required": { + "modified": "2019-03-23T22:21:20.361Z", "contributors": [ - "ziyunfei" + "Legioinvicta" ] }, - "Tools": { - "modified": "2020-07-16T22:44:13.837Z", + "Web/CSS/:right": { + "modified": "2019-03-18T21:16:34.262Z", "contributors": [ - "SphinxKnight", - "wbamberg", - "Legioinvicta", - "jryans" + "Legioinvicta" ] }, - "Tools/Remote_Debugging": { - "modified": "2020-07-16T22:35:36.985Z", + "Web/CSS/:root": { + "modified": "2019-03-23T22:21:13.641Z", "contributors": [ - "wbamberg", - "Legioinvicta", - "jryans" + "Legioinvicta" ] }, - "Web": { - "modified": "2019-08-08T04:25:52.925Z", + "Web/CSS/:scope": { + "modified": "2020-04-20T18:27:58.028Z", "contributors": [ - "Legioinvicta", - "ethertank" + "albertms10", + "Legioinvicta" ] }, - "Web/API": { - "modified": "2019-09-22T13:24:34.476Z", + "Web/CSS/:target": { + "modified": "2019-03-23T22:21:16.673Z", "contributors": [ - "duduindo", - "escufi" + "Legioinvicta" ] }, - "Web/API/Canvas_API": { - "modified": "2019-03-23T22:04:17.711Z", + "Web/CSS/:valid": { + "modified": "2020-10-15T21:51:22.420Z", "contributors": [ + "fscholz", "Legioinvicta" ] }, - "Web/API/Canvas_API/Tutorial": { - "modified": "2019-03-23T22:04:21.400Z", + "Web/CSS/:visited": { + "modified": "2019-03-23T22:21:19.720Z", "contributors": [ - "stephaniehobson" + "Legioinvicta" ] }, - "Web/API/Canvas_API/Tutorial/Animacions_avançades": { - "modified": "2019-03-23T22:03:52.604Z", + "Web/CSS/At-rule": { + "modified": "2019-03-23T22:04:58.324Z", "contributors": [ "Legioinvicta" ] }, - "Web/API/Canvas_API/Tutorial/Animacions_bàsiques": { - "modified": "2019-03-23T22:03:56.826Z", + "Web/CSS/CSS_Box_Model": { + "modified": "2019-03-23T22:05:29.525Z", "contributors": [ "Legioinvicta" ] }, - "Web/API/Canvas_API/Tutorial/Aplicar_estils_i_colors": { - "modified": "2019-03-23T22:04:05.578Z", + "Web/CSS/CSS_Flexible_Box_Layout": { + "modified": "2019-03-23T22:43:45.358Z", "contributors": [ - "Legioinvicta" + "fscholz" ] }, - "Web/API/Canvas_API/Tutorial/Composició": { - "modified": "2019-03-23T22:04:02.955Z", + "Web/CSS/box-sizing": { + "modified": "2019-03-18T20:37:36.899Z", "contributors": [ + "Soyaine", "Legioinvicta" ] }, - "Web/API/Canvas_API/Tutorial/Dibuixar_text": { - "modified": "2019-03-23T22:04:09.548Z", + "Web/CSS/height": { + "modified": "2019-03-23T22:05:15.436Z", "contributors": [ "Legioinvicta" ] }, - "Web/API/Canvas_API/Tutorial/Drawing_shapes": { - "modified": "2019-03-23T22:04:18.638Z", + "Web/CSS/margin": { + "modified": "2019-03-23T22:05:19.140Z", "contributors": [ "Legioinvicta" ] }, - "Web/API/Canvas_API/Tutorial/Manipular_píxels_amb_canvas": { - "modified": "2020-10-22T19:57:12.300Z", + "Web/CSS/margin-bottom": { + "modified": "2019-03-23T22:05:16.692Z", "contributors": [ - "escattone", "Legioinvicta" ] }, - "Web/API/Canvas_API/Tutorial/Transformacions": { - "modified": "2019-03-23T22:03:59.945Z", + "Web/CSS/margin-left": { + "modified": "2019-03-23T22:05:15.717Z", "contributors": [ "Legioinvicta" ] }, - "Web/API/Canvas_API/Tutorial/Using_images": { - "modified": "2019-03-23T22:04:03.392Z", + "Web/CSS/margin-right": { + "modified": "2019-03-18T21:15:06.649Z", "contributors": [ "Legioinvicta" ] }, - "Web/API/Canvas_API/Tutorial/Ús_bàsic": { - "modified": "2019-03-23T22:04:22.078Z", + "Web/CSS/margin-top": { + "modified": "2019-03-23T22:05:18.254Z", "contributors": [ "Legioinvicta" ] }, - "Web/API/WebGL_API": { - "modified": "2019-03-23T22:04:45.878Z", + "Web/CSS/margin-trim": { + "modified": "2020-10-15T22:33:48.620Z", "contributors": [ - "ibesora" + "Legioinvicta" ] }, - "Web/API/Window": { - "modified": "2019-03-23T22:02:56.882Z", + "Web/CSS/max-height": { + "modified": "2019-03-18T21:16:33.676Z", "contributors": [ - "chrisdavidmills" + "Legioinvicta" ] }, - "Web/API/Window/sidebar": { - "modified": "2019-03-23T22:03:04.245Z", + "Web/CSS/max-width": { + "modified": "2019-03-23T22:05:19.856Z", "contributors": [ - "IsaacSchemm" + "Legioinvicta" ] }, - "Web/CSS": { - "modified": "2019-09-11T03:34:02.747Z", + "Web/CSS/min-height": { + "modified": "2019-03-23T22:05:14.466Z", "contributors": [ - "SphinxKnight", - "Legioinvicta", - "teoli", - "Arnau-siches" + "Legioinvicta" ] }, - "Web/CSS/::-moz-progress-bar": { - "modified": "2019-03-23T22:21:20.781Z", + "Web/CSS/min-width": { + "modified": "2019-03-23T22:05:14.719Z", "contributors": [ "Legioinvicta" ] }, - "Web/CSS/::-moz-range-progress": { - "modified": "2019-03-18T21:17:32.107Z", + "Web/CSS/overflow": { + "modified": "2019-03-23T22:05:08.424Z", "contributors": [ - "teoli", "Legioinvicta" ] }, - "Web/CSS/::-moz-range-thumb": { - "modified": "2019-03-23T22:21:12.717Z", + "Web/CSS/overflow-x": { + "modified": "2019-03-23T22:05:13.081Z", "contributors": [ - "teoli", "Legioinvicta" ] }, - "Web/CSS/::-moz-range-track": { - "modified": "2019-03-23T22:21:19.893Z", + "Web/CSS/overflow-y": { + "modified": "2019-03-23T22:05:11.405Z", "contributors": [ - "teoli", "Legioinvicta" ] }, - "Web/CSS/::-webkit-progress-bar": { - "modified": "2019-03-23T22:21:15.673Z", + "Web/CSS/overscroll-behavior": { + "modified": "2020-10-15T22:33:48.574Z", "contributors": [ - "teoli", "Legioinvicta" ] }, - "Web/CSS/::-webkit-progress-value": { - "modified": "2019-03-23T22:21:12.226Z", + "Web/CSS/overscroll-behavior-block": { + "modified": "2020-10-15T22:33:50.202Z", "contributors": [ - "teoli", "Legioinvicta" ] }, - "Web/CSS/::-webkit-slider-runnable-track": { - "modified": "2019-03-23T22:21:12.535Z", + "Web/CSS/overscroll-behavior-inline": { + "modified": "2020-10-15T22:33:51.702Z", "contributors": [ - "teoli", "Legioinvicta" ] }, - "Web/CSS/::-webkit-slider-thumb": { - "modified": "2019-03-23T22:21:19.418Z", + "Web/CSS/padding": { + "modified": "2019-03-23T22:05:08.048Z", "contributors": [ - "teoli", "Legioinvicta" ] }, - "Web/CSS/::after": { - "modified": "2019-03-23T22:21:16.467Z", + "Web/CSS/padding-bottom": { + "modified": "2019-03-23T22:05:02.662Z", "contributors": [ "Legioinvicta" ] }, - "Web/CSS/::backdrop": { - "modified": "2019-03-23T22:21:14.990Z", + "Web/CSS/padding-left": { + "modified": "2019-03-23T22:05:12.888Z", "contributors": [ "Legioinvicta" ] }, - "Web/CSS/::before": { - "modified": "2019-03-23T22:21:17.379Z", + "Web/CSS/padding-right": { + "modified": "2019-03-23T22:05:09.745Z", "contributors": [ "Legioinvicta" ] }, - "Web/CSS/::cue": { - "modified": "2020-10-15T21:58:05.485Z", + "Web/CSS/padding-top": { + "modified": "2019-03-23T22:05:10.966Z", "contributors": [ "Legioinvicta" ] }, - "Web/CSS/::first-letter": { - "modified": "2019-03-23T22:21:13.268Z", + "Web/CSS/visibility": { + "modified": "2019-03-23T22:05:05.259Z", "contributors": [ "Legioinvicta" ] }, - "Web/CSS/::first-line": { - "modified": "2020-10-15T21:51:25.818Z", + "Web/CSS/width": { + "modified": "2020-10-15T21:57:46.481Z", "contributors": [ - "SphinxKnight", "Legioinvicta" ] }, - "Web/CSS/::placeholder": { - "modified": "2019-03-23T22:04:44.753Z", + "Web/Guide": { + "modified": "2019-03-23T22:24:15.468Z", "contributors": [ - "Legioinvicta" + "Legioinvicta", + "Sheppy" ] }, - "Web/CSS/::selection": { - "modified": "2019-03-23T22:21:15.861Z", + "Web/Guide/AJAX": { + "modified": "2019-01-16T14:16:48.471Z", "contributors": [ - "Legioinvicta", - "Winni-" + "chrisdavidmills", + "moluxs", + "Oriolm", + "Toniher" ] }, - "Web/CSS/:active": { - "modified": "2019-03-23T22:21:47.358Z", + "Web/Guide/HTML/HTML5": { + "modified": "2019-03-23T22:19:42.811Z", "contributors": [ - "fscholz", "Legioinvicta" ] }, - "Web/CSS/:any": { - "modified": "2019-03-23T22:21:40.467Z", + "Web/HTML": { + "modified": "2020-02-22T22:24:38.027Z", "contributors": [ - "Legioinvicta" + "Ernest", + "SphinxKnight", + "Legioinvicta", + "joanprimpratrec2", + "fscholz", + "teoli" ] }, - "Web/CSS/:any-link": { - "modified": "2020-10-15T21:51:11.202Z", + "Web/HTML/Block-level_elements": { + "modified": "2019-03-23T22:24:26.228Z", "contributors": [ "Legioinvicta" ] }, - "Web/CSS/:checked": { - "modified": "2019-03-23T22:21:43.524Z", + "Web/HTML/Element": { + "modified": "2019-03-23T23:02:54.251Z", "contributors": [ - "Legioinvicta" + "Legioinvicta", + "aeinbu", + "teoli" ] }, - "Web/CSS/:default": { - "modified": "2019-03-23T22:21:38.352Z", + "Web/HTML/Element/Heading_Elements": { + "modified": "2019-03-23T22:22:40.062Z", "contributors": [ "Legioinvicta" ] }, - "Web/CSS/:dir": { - "modified": "2020-10-15T21:51:13.134Z", + "Web/HTML/Element/Shadow": { + "modified": "2019-03-23T22:22:58.573Z", "contributors": [ - "SphinxKnight", "Legioinvicta" ] }, - "Web/CSS/:disabled": { - "modified": "2019-03-23T22:21:32.327Z", + "Web/HTML/Element/a": { + "modified": "2019-03-23T23:02:50.885Z", "contributors": [ - "Legioinvicta" + "Legioinvicta", + "llue" ] }, - "Web/CSS/:empty": { - "modified": "2019-03-23T22:21:35.505Z", + "Web/HTML/Element/abbr": { + "modified": "2020-08-14T22:29:34.312Z", "contributors": [ - "Legioinvicta" + "llue", + "fscholz" ] }, - "Web/CSS/:enabled": { - "modified": "2019-03-23T22:21:33.868Z", + "Web/HTML/Element/acronym": { + "modified": "2019-03-23T22:24:06.082Z", "contributors": [ "Legioinvicta" ] }, - "Web/CSS/:first": { - "modified": "2019-03-23T22:21:35.151Z", + "Web/HTML/Element/address": { + "modified": "2019-03-23T22:24:30.575Z", "contributors": [ "Legioinvicta" ] }, - "Web/CSS/:first-child": { - "modified": "2019-03-23T22:21:24.465Z", + "Web/HTML/Element/applet": { + "modified": "2019-03-23T22:24:01.530Z", "contributors": [ "Legioinvicta" ] }, - "Web/CSS/:first-of-type": { - "modified": "2019-03-23T22:21:27.205Z", + "Web/HTML/Element/area": { + "modified": "2019-03-23T22:24:34.904Z", "contributors": [ "Legioinvicta" ] }, - "Web/CSS/:focus": { - "modified": "2019-03-23T22:21:23.494Z", + "Web/HTML/Element/article": { + "modified": "2019-03-23T22:24:37.217Z", "contributors": [ "Legioinvicta" ] }, - "Web/CSS/:focus-within": { - "modified": "2019-03-23T22:21:26.997Z", + "Web/HTML/Element/aside": { + "modified": "2019-03-23T23:02:54.425Z", "contributors": [ - "Legioinvicta" + "llue" ] }, - "Web/CSS/:fullscreen": { - "modified": "2019-03-23T22:21:26.360Z", + "Web/HTML/Element/audio": { + "modified": "2019-03-23T22:24:31.743Z", "contributors": [ "Legioinvicta" ] }, - "Web/CSS/:hover": { - "modified": "2019-03-23T22:21:27.607Z", + "Web/HTML/Element/b": { + "modified": "2019-03-23T22:24:36.355Z", "contributors": [ "Legioinvicta" ] }, - "Web/CSS/:in-range": { - "modified": "2020-10-15T21:51:14.757Z", + "Web/HTML/Element/base": { + "modified": "2019-03-23T22:24:29.858Z", "contributors": [ - "SphinxKnight", "Legioinvicta" ] }, - "Web/CSS/:indeterminate": { - "modified": "2020-10-15T21:51:13.811Z", + "Web/HTML/Element/basefont": { + "modified": "2019-03-23T22:24:06.575Z", "contributors": [ - "fscholz", "Legioinvicta" ] }, - "Web/CSS/:invalid": { - "modified": "2020-10-15T21:51:13.214Z", + "Web/HTML/Element/bdi": { + "modified": "2019-03-23T22:24:35.937Z", "contributors": [ - "fscholz", "Legioinvicta" ] }, - "Web/CSS/:lang": { - "modified": "2019-03-23T22:21:33.229Z", + "Web/HTML/Element/bdo": { + "modified": "2019-03-23T22:24:30.076Z", "contributors": [ "Legioinvicta" ] }, - "Web/CSS/:last-child": { - "modified": "2019-03-23T22:21:25.832Z", + "Web/HTML/Element/bgsound": { + "modified": "2019-03-23T22:24:00.548Z", "contributors": [ "Legioinvicta" ] }, - "Web/CSS/:last-of-type": { - "modified": "2019-03-23T22:21:30.611Z", + "Web/HTML/Element/big": { + "modified": "2019-03-23T22:23:59.751Z", "contributors": [ "Legioinvicta" ] }, - "Web/CSS/:left": { - "modified": "2019-03-23T22:21:34.439Z", + "Web/HTML/Element/blink": { + "modified": "2019-03-23T22:24:06.248Z", "contributors": [ + "teoli", "Legioinvicta" ] }, - "Web/CSS/:link": { - "modified": "2019-03-23T22:21:32.532Z", + "Web/HTML/Element/blockquote": { + "modified": "2019-03-23T22:24:32.254Z", "contributors": [ "Legioinvicta" ] }, - "Web/CSS/:not": { - "modified": "2019-03-23T22:21:28.771Z", + "Web/HTML/Element/body": { + "modified": "2019-03-23T22:24:37.533Z", "contributors": [ "Legioinvicta" ] }, - "Web/CSS/:nth-child": { - "modified": "2019-03-23T22:21:24.163Z", + "Web/HTML/Element/br": { + "modified": "2019-03-23T23:02:56.324Z", "contributors": [ - "Legioinvicta" + "llue" ] }, - "Web/CSS/:nth-last-child": { - "modified": "2019-03-23T22:21:28.310Z", + "Web/HTML/Element/button": { + "modified": "2019-03-23T22:24:31.103Z", "contributors": [ "Legioinvicta" ] }, - "Web/CSS/:nth-last-of-type": { - "modified": "2019-03-23T22:21:29.535Z", + "Web/HTML/Element/canvas": { + "modified": "2019-03-23T22:24:30.337Z", "contributors": [ "Legioinvicta" ] }, - "Web/CSS/:nth-of-type": { - "modified": "2019-03-23T22:21:34.038Z", + "Web/HTML/Element/caption": { + "modified": "2019-03-23T22:24:33.007Z", "contributors": [ "Legioinvicta" ] }, - "Web/CSS/:only-child": { - "modified": "2019-03-18T21:15:27.539Z", + "Web/HTML/Element/center": { + "modified": "2019-03-23T22:24:00.968Z", "contributors": [ "Legioinvicta" ] }, - "Web/CSS/:only-of-type": { - "modified": "2019-03-23T22:21:32.125Z", + "Web/HTML/Element/cite": { + "modified": "2019-03-23T22:24:35.142Z", "contributors": [ "Legioinvicta" ] }, - "Web/CSS/:optional": { - "modified": "2019-03-23T22:21:26.032Z", + "Web/HTML/Element/code": { + "modified": "2019-03-23T22:24:36.137Z", "contributors": [ "Legioinvicta" ] }, - "Web/CSS/:out-of-range": { - "modified": "2019-03-23T22:21:27.814Z", + "Web/HTML/Element/col": { + "modified": "2019-03-23T22:24:15.868Z", "contributors": [ "Legioinvicta" ] }, - "Web/CSS/:placeholder-shown": { - "modified": "2019-03-23T22:21:28.063Z", + "Web/HTML/Element/colgroup": { + "modified": "2019-03-23T22:24:15.101Z", "contributors": [ "Legioinvicta" ] }, - "Web/CSS/:read-only": { - "modified": "2020-10-15T21:51:14.863Z", + "Web/HTML/Element/content": { + "modified": "2019-03-23T22:24:11.640Z", "contributors": [ - "fscholz", "Legioinvicta" ] }, - "Web/CSS/:read-write": { - "modified": "2020-10-15T21:51:12.394Z", + "Web/HTML/Element/data": { + "modified": "2019-03-23T22:24:12.906Z", "contributors": [ - "fscholz", "Legioinvicta" ] }, - "Web/CSS/:required": { - "modified": "2019-03-23T22:21:20.361Z", + "Web/HTML/Element/datalist": { + "modified": "2019-03-23T22:24:16.075Z", "contributors": [ + "mfranzke", "Legioinvicta" ] }, - "Web/CSS/:right": { - "modified": "2019-03-18T21:16:34.262Z", + "Web/HTML/Element/dd": { + "modified": "2019-03-23T22:24:21.875Z", "contributors": [ "Legioinvicta" ] }, - "Web/CSS/:root": { - "modified": "2019-03-23T22:21:13.641Z", + "Web/HTML/Element/del": { + "modified": "2019-03-23T22:24:05.886Z", "contributors": [ "Legioinvicta" ] }, - "Web/CSS/:scope": { - "modified": "2020-04-20T18:27:58.028Z", + "Web/HTML/Element/details": { + "modified": "2019-03-23T22:24:07.263Z", "contributors": [ - "albertms10", "Legioinvicta" ] }, - "Web/CSS/:target": { - "modified": "2019-03-23T22:21:16.673Z", + "Web/HTML/Element/dfn": { + "modified": "2019-03-23T22:24:03.887Z", "contributors": [ "Legioinvicta" ] }, - "Web/CSS/:valid": { - "modified": "2020-10-15T21:51:22.420Z", + "Web/HTML/Element/dialog": { + "modified": "2019-03-23T22:24:06.889Z", "contributors": [ - "fscholz", "Legioinvicta" ] }, - "Web/CSS/:visited": { - "modified": "2019-03-23T22:21:19.720Z", + "Web/HTML/Element/dir": { + "modified": "2019-03-23T22:23:59.059Z", "contributors": [ "Legioinvicta" ] }, - "Web/CSS/At-rule": { - "modified": "2019-03-23T22:04:58.324Z", + "Web/HTML/Element/div": { + "modified": "2019-03-23T22:44:10.000Z", "contributors": [ - "Legioinvicta" + "llue" ] }, - "Web/CSS/CSS_Box_Model": { - "modified": "2019-03-23T22:05:29.525Z", + "Web/HTML/Element/dl": { + "modified": "2019-03-23T22:23:57.383Z", "contributors": [ "Legioinvicta" ] }, - "Web/CSS/CSS_Box_Model/Dominar_el_col.lapse_del_marge": { - "modified": "2019-03-18T21:17:29.185Z", + "Web/HTML/Element/dt": { + "modified": "2019-03-23T22:24:04.732Z", "contributors": [ "Legioinvicta" ] }, - "Web/CSS/CSS_Box_Model/Introducció_al_model_de_caixa_CSS": { - "modified": "2019-03-18T21:15:28.600Z", + "Web/HTML/Element/em": { + "modified": "2019-03-23T22:23:56.965Z", "contributors": [ "Legioinvicta" ] }, - "Web/CSS/CSS_Flexible_Box_Layout": { - "modified": "2019-03-23T22:43:45.358Z", + "Web/HTML/Element/embed": { + "modified": "2019-03-23T22:24:05.230Z", "contributors": [ - "fscholz" + "Legioinvicta" ] }, - "Web/CSS/Referéncia_CSS": { - "modified": "2019-03-23T22:21:55.917Z", + "Web/HTML/Element/fieldset": { + "modified": "2019-03-23T22:23:57.920Z", "contributors": [ "Legioinvicta" ] }, - "Web/CSS/Selectors_CSS": { - "modified": "2019-07-10T09:40:26.803Z", + "Web/HTML/Element/figcaption": { + "modified": "2019-03-23T22:24:05.668Z", "contributors": [ - "gavinsykes", "Legioinvicta" ] }, - "Web/CSS/Selectors_CSS/Using_the_:target_pseudo-class_in_selectors": { - "modified": "2019-03-23T22:21:45.619Z", + "Web/HTML/Element/figure": { + "modified": "2019-03-23T22:24:01.197Z", "contributors": [ "Legioinvicta" ] }, - "Web/CSS/Selectors_ID": { - "modified": "2019-03-18T21:15:31.059Z", + "Web/HTML/Element/font": { + "modified": "2019-03-23T22:24:06.405Z", "contributors": [ "Legioinvicta" ] }, - "Web/CSS/Selectors_Universal": { - "modified": "2019-03-23T22:21:38.063Z", + "Web/HTML/Element/footer": { + "modified": "2019-03-23T22:23:57.162Z", "contributors": [ "Legioinvicta" ] }, - "Web/CSS/Selectors_d'Atribut": { - "modified": "2019-03-23T22:21:47.586Z", + "Web/HTML/Element/form": { + "modified": "2019-03-23T22:24:03.654Z", "contributors": [ "Legioinvicta" ] }, - "Web/CSS/Selectors_de_Classe": { - "modified": "2019-03-23T22:21:40.826Z", + "Web/HTML/Element/frame": { + "modified": "2019-03-23T22:23:58.069Z", "contributors": [ "Legioinvicta" ] }, - "Web/CSS/Selectors_de_Tipus": { - "modified": "2019-03-23T22:21:49.346Z", + "Web/HTML/Element/frameset": { + "modified": "2019-03-23T22:24:00.833Z", "contributors": [ "Legioinvicta" ] }, - "Web/CSS/Selectors_de_descendents": { - "modified": "2019-03-23T22:21:41.801Z", + "Web/HTML/Element/head": { + "modified": "2019-03-23T22:23:58.845Z", "contributors": [ "Legioinvicta" ] }, - "Web/CSS/Selectors_de_fills": { - "modified": "2019-03-23T22:21:37.309Z", + "Web/HTML/Element/header": { + "modified": "2019-03-23T22:23:59.258Z", "contributors": [ "Legioinvicta" ] }, - "Web/CSS/Selectors_de_germans_adjacents": { - "modified": "2019-03-23T22:21:40.662Z", + "Web/HTML/Element/hgroup": { + "modified": "2019-03-23T22:23:59.587Z", "contributors": [ "Legioinvicta" ] }, - "Web/CSS/Selectors_general_de_germans": { - "modified": "2019-03-23T22:21:39.817Z", + "Web/HTML/Element/hr": { + "modified": "2019-03-23T22:24:04.544Z", "contributors": [ "Legioinvicta" ] }, - "Web/CSS/Sintaxi": { - "modified": "2019-03-23T22:05:30.508Z", + "Web/HTML/Element/html": { + "modified": "2019-03-23T22:23:44.381Z", "contributors": [ "Legioinvicta" ] }, - "Web/CSS/box-sizing": { - "modified": "2019-03-18T20:37:36.899Z", + "Web/HTML/Element/i": { + "modified": "2019-03-23T22:23:44.141Z", "contributors": [ - "Soyaine", "Legioinvicta" ] }, - "Web/CSS/height": { - "modified": "2019-03-23T22:05:15.436Z", + "Web/HTML/Element/iframe": { + "modified": "2019-03-23T22:23:45.300Z", "contributors": [ + "wbamberg", "Legioinvicta" ] }, - "Web/CSS/margin": { - "modified": "2019-03-23T22:05:19.140Z", + "Web/HTML/Element/image": { + "modified": "2019-03-23T22:23:55.696Z", "contributors": [ "Legioinvicta" ] }, - "Web/CSS/margin-bottom": { - "modified": "2019-03-23T22:05:16.692Z", + "Web/HTML/Element/img": { + "modified": "2019-03-23T22:23:44.825Z", "contributors": [ + "rcomellas", "Legioinvicta" ] }, - "Web/CSS/margin-left": { - "modified": "2019-03-23T22:05:15.717Z", + "Web/HTML/Element/input": { + "modified": "2020-12-11T04:26:56.268Z", "contributors": [ + "jaumeol", "Legioinvicta" ] }, - "Web/CSS/margin-right": { - "modified": "2019-03-18T21:15:06.649Z", + "Web/HTML/Element/ins": { + "modified": "2019-03-23T22:23:31.337Z", "contributors": [ "Legioinvicta" ] }, - "Web/CSS/margin-top": { - "modified": "2019-03-23T22:05:18.254Z", + "Web/HTML/Element/isindex": { + "modified": "2019-03-23T22:23:32.350Z", "contributors": [ "Legioinvicta" ] }, - "Web/CSS/margin-trim": { - "modified": "2020-10-15T22:33:48.620Z", + "Web/HTML/Element/kbd": { + "modified": "2019-03-23T22:23:30.123Z", "contributors": [ "Legioinvicta" ] }, - "Web/CSS/max-height": { - "modified": "2019-03-18T21:16:33.676Z", + "Web/HTML/Element/keygen": { + "modified": "2019-03-23T22:23:29.875Z", "contributors": [ "Legioinvicta" ] }, - "Web/CSS/max-width": { - "modified": "2019-03-23T22:05:19.856Z", + "Web/HTML/Element/label": { + "modified": "2019-03-23T22:23:25.920Z", "contributors": [ "Legioinvicta" ] }, - "Web/CSS/min-height": { - "modified": "2019-03-23T22:05:14.466Z", + "Web/HTML/Element/legend": { + "modified": "2019-03-23T22:23:27.067Z", "contributors": [ "Legioinvicta" ] }, - "Web/CSS/min-width": { - "modified": "2019-03-23T22:05:14.719Z", + "Web/HTML/Element/li": { + "modified": "2019-03-23T22:23:30.535Z", "contributors": [ "Legioinvicta" ] }, - "Web/CSS/overflow": { - "modified": "2019-03-23T22:05:08.424Z", + "Web/HTML/Element/link": { + "modified": "2019-03-23T22:23:31.095Z", "contributors": [ "Legioinvicta" ] }, - "Web/CSS/overflow-x": { - "modified": "2019-03-23T22:05:13.081Z", + "Web/HTML/Element/listing": { + "modified": "2019-03-23T22:23:31.930Z", "contributors": [ "Legioinvicta" ] }, - "Web/CSS/overflow-y": { - "modified": "2019-03-23T22:05:11.405Z", + "Web/HTML/Element/main": { + "modified": "2019-03-23T22:23:29.013Z", "contributors": [ "Legioinvicta" ] }, - "Web/CSS/overscroll-behavior": { - "modified": "2020-10-15T22:33:48.574Z", + "Web/HTML/Element/map": { + "modified": "2019-03-23T22:23:28.443Z", "contributors": [ "Legioinvicta" ] }, - "Web/CSS/overscroll-behavior-block": { - "modified": "2020-10-15T22:33:50.202Z", + "Web/HTML/Element/mark": { + "modified": "2019-03-23T22:23:29.469Z", "contributors": [ "Legioinvicta" ] }, - "Web/CSS/overscroll-behavior-inline": { - "modified": "2020-10-15T22:33:51.702Z", + "Web/HTML/Element/marquee": { + "modified": "2019-03-23T22:23:25.351Z", "contributors": [ "Legioinvicta" ] }, - "Web/CSS/padding": { - "modified": "2019-03-23T22:05:08.048Z", + "Web/HTML/Element/menu": { + "modified": "2019-03-23T22:43:53.972Z", "contributors": [ - "Legioinvicta" + "llue" ] }, - "Web/CSS/padding-bottom": { - "modified": "2019-03-23T22:05:02.662Z", + "Web/HTML/Element/menuitem": { + "modified": "2019-03-23T22:23:24.576Z", "contributors": [ "Legioinvicta" ] }, - "Web/CSS/padding-left": { - "modified": "2019-03-23T22:05:12.888Z", + "Web/HTML/Element/meta": { + "modified": "2019-03-23T22:23:14.832Z", "contributors": [ "Legioinvicta" ] }, - "Web/CSS/padding-right": { - "modified": "2019-03-23T22:05:09.745Z", + "Web/HTML/Element/meter": { + "modified": "2019-03-23T22:23:09.097Z", "contributors": [ "Legioinvicta" ] }, - "Web/CSS/padding-top": { - "modified": "2019-03-23T22:05:10.966Z", + "Web/HTML/Element/multicol": { + "modified": "2019-03-23T22:23:18.874Z", "contributors": [ "Legioinvicta" ] }, - "Web/CSS/visibility": { - "modified": "2019-03-23T22:05:05.259Z", + "Web/HTML/Element/nav": { + "modified": "2019-03-23T22:48:17.923Z", "contributors": [ - "Legioinvicta" + "wbamberg", + "llue" ] }, - "Web/CSS/width": { - "modified": "2020-10-15T21:57:46.481Z", + "Web/HTML/Element/nextid": { + "modified": "2019-03-23T22:22:37.005Z", "contributors": [ "Legioinvicta" ] }, - "Web/Guide": { - "modified": "2019-03-23T22:24:15.468Z", + "Web/HTML/Element/nobr": { + "modified": "2019-03-23T22:23:17.356Z", "contributors": [ - "Legioinvicta", - "Sheppy" + "Legioinvicta" ] }, - "Web/Guide/AJAX": { - "modified": "2019-01-16T14:16:48.471Z", + "Web/HTML/Element/noembed": { + "modified": "2019-03-23T22:23:16.262Z", "contributors": [ - "chrisdavidmills", - "moluxs", - "Oriolm", - "Toniher" + "Legioinvicta" ] }, - "Web/Guide/AJAX/Primers_passos": { - "modified": "2019-01-16T16:22:29.202Z", + "Web/HTML/Element/noframes": { + "modified": "2019-03-23T22:23:17.870Z", "contributors": [ - "chrisdavidmills", - "Toniher" + "Legioinvicta" ] }, - "Web/Guide/CSS/Inici_en_CSS": { - "modified": "2019-03-23T22:22:04.507Z", + "Web/HTML/Element/noscript": { + "modified": "2019-03-23T22:23:12.362Z", "contributors": [ "Legioinvicta" ] }, - "Web/Guide/CSS/Inici_en_CSS/CSS_llegible": { - "modified": "2019-03-23T22:20:58.263Z", + "Web/HTML/Element/object": { + "modified": "2019-03-23T22:23:08.187Z", "contributors": [ "Legioinvicta" ] }, - "Web/Guide/CSS/Inici_en_CSS/Caixes": { - "modified": "2019-03-23T22:21:00.737Z", + "Web/HTML/Element/ol": { + "modified": "2019-03-23T22:23:11.431Z", "contributors": [ "Legioinvicta" ] }, - "Web/Guide/CSS/Inici_en_CSS/Cascada_i_herència": { - "modified": "2019-03-23T22:21:11.477Z", + "Web/HTML/Element/optgroup": { + "modified": "2019-03-23T22:23:08.674Z", "contributors": [ "Legioinvicta" ] }, - "Web/Guide/CSS/Inici_en_CSS/Color": { - "modified": "2019-03-23T22:20:58.899Z", + "Web/HTML/Element/option": { + "modified": "2019-03-23T22:23:17.744Z", "contributors": [ "Legioinvicta" ] }, - "Web/Guide/CSS/Inici_en_CSS/Com_funciona_el_CSS": { - "modified": "2019-03-23T22:21:14.792Z", + "Web/HTML/Element/output": { + "modified": "2019-03-23T22:23:07.934Z", "contributors": [ + "wbamberg", "Legioinvicta" ] }, - "Web/Guide/CSS/Inici_en_CSS/Disseny": { - "modified": "2019-03-23T22:20:52.030Z", + "Web/HTML/Element/p": { + "modified": "2019-03-23T22:22:56.526Z", "contributors": [ "Legioinvicta" ] }, - "Web/Guide/CSS/Inici_en_CSS/Estils_de_text": { - "modified": "2019-03-23T22:21:09.957Z", + "Web/HTML/Element/param": { + "modified": "2019-03-23T22:23:02.418Z", "contributors": [ "Legioinvicta" ] }, - "Web/Guide/CSS/Inici_en_CSS/JavaScript": { - "modified": "2019-03-23T22:20:34.923Z", + "Web/HTML/Element/picture": { + "modified": "2019-03-23T22:23:01.844Z", "contributors": [ "Legioinvicta" ] }, - "Web/Guide/CSS/Inici_en_CSS/Llistes": { - "modified": "2019-03-23T22:21:00.463Z", + "Web/HTML/Element/plaintext": { + "modified": "2019-03-23T22:22:59.391Z", "contributors": [ "Legioinvicta" ] }, - "Web/Guide/CSS/Inici_en_CSS/Mitjà": { - "modified": "2019-03-23T22:20:43.883Z", + "Web/HTML/Element/pre": { + "modified": "2019-03-23T22:23:02.683Z", "contributors": [ "Legioinvicta" ] }, - "Web/Guide/CSS/Inici_en_CSS/Per_què_utilitzar_CSS": { - "modified": "2019-03-23T22:21:21.787Z", + "Web/HTML/Element/progress": { + "modified": "2019-03-23T22:22:54.749Z", "contributors": [ + "wbamberg", "Legioinvicta" ] }, - "Web/Guide/CSS/Inici_en_CSS/Que_és_CSS": { - "modified": "2019-03-23T22:21:22.840Z", + "Web/HTML/Element/q": { + "modified": "2020-10-15T21:50:56.392Z", "contributors": [ + "fscholz", "Legioinvicta" ] }, - "Web/Guide/CSS/Inici_en_CSS/SVG_i_CSS": { - "modified": "2019-03-23T22:20:34.731Z", + "Web/HTML/Element/rp": { + "modified": "2019-03-23T22:22:55.170Z", "contributors": [ "Legioinvicta" ] }, - "Web/Guide/CSS/Inici_en_CSS/Selectors": { - "modified": "2019-03-23T22:21:02.763Z", + "Web/HTML/Element/rt": { + "modified": "2019-03-23T22:22:59.953Z", "contributors": [ "Legioinvicta" ] }, - "Web/Guide/CSS/Inici_en_CSS/Taules": { - "modified": "2019-03-23T22:20:47.336Z", + "Web/HTML/Element/rtc": { + "modified": "2019-03-23T22:22:57.513Z", "contributors": [ "Legioinvicta" ] }, - "Web/Guide/Gràfics": { - "modified": "2019-03-23T22:04:22.823Z", + "Web/HTML/Element/ruby": { + "modified": "2019-03-23T22:48:18.101Z", + "contributors": [ + "llue" + ] + }, + "Web/HTML/Element/s": { + "modified": "2019-03-23T22:23:02.208Z", "contributors": [ "Legioinvicta" ] }, - "Web/Guide/HTML/HTML5": { - "modified": "2019-03-23T22:19:42.811Z", + "Web/HTML/Element/samp": { + "modified": "2019-03-23T22:22:59.763Z", "contributors": [ "Legioinvicta" ] }, - "Web/Guide/HTML/Us_de_seccions_i_esquemes_en_HTML": { - "modified": "2019-03-23T22:19:14.112Z", + "Web/HTML/Element/script": { + "modified": "2019-03-23T22:22:58.125Z", "contributors": [ "Legioinvicta" ] }, - "Web/Guide/HTML/_Consells_per_crear_pàgines_HTML_de_càrrega_ràpida": { - "modified": "2020-07-16T22:22:32.019Z", + "Web/HTML/Element/section": { + "modified": "2019-03-23T22:23:02.047Z", "contributors": [ "Legioinvicta" ] }, - "Web/HTML": { - "modified": "2020-02-22T22:24:38.027Z", + "Web/HTML/Element/select": { + "modified": "2019-03-23T22:22:53.707Z", "contributors": [ - "Ernest", - "SphinxKnight", - "Legioinvicta", - "joanprimpratrec2", - "fscholz", - "teoli" + "Legioinvicta" ] }, - "Web/HTML/Block-level_elements": { - "modified": "2019-03-23T22:24:26.228Z", + "Web/HTML/Element/small": { + "modified": "2019-03-23T22:22:57.046Z", "contributors": [ "Legioinvicta" ] }, - "Web/HTML/Element": { - "modified": "2019-03-23T23:02:54.251Z", + "Web/HTML/Element/source": { + "modified": "2019-03-23T22:23:01.454Z", "contributors": [ - "Legioinvicta", - "aeinbu", - "teoli" + "Legioinvicta" ] }, - "Web/HTML/Element/Heading_Elements": { - "modified": "2019-03-23T22:22:40.062Z", + "Web/HTML/Element/spacer": { + "modified": "2019-03-23T22:23:01.649Z", "contributors": [ "Legioinvicta" ] }, - "Web/HTML/Element/Shadow": { - "modified": "2019-03-23T22:22:58.573Z", + "Web/HTML/Element/span": { + "modified": "2019-03-23T22:22:57.324Z", "contributors": [ "Legioinvicta" ] }, - "Web/HTML/Element/a": { - "modified": "2019-03-23T23:02:50.885Z", + "Web/HTML/Element/strike": { + "modified": "2019-03-23T22:22:53.130Z", "contributors": [ - "Legioinvicta", - "llue" + "Legioinvicta" ] }, - "Web/HTML/Element/abbr": { - "modified": "2020-08-14T22:29:34.312Z", + "Web/HTML/Element/strong": { + "modified": "2019-03-23T22:23:00.673Z", "contributors": [ - "llue", - "fscholz" + "Legioinvicta" ] }, - "Web/HTML/Element/acronym": { - "modified": "2019-03-23T22:24:06.082Z", + "Web/HTML/Element/style": { + "modified": "2019-03-23T22:22:54.521Z", "contributors": [ "Legioinvicta" ] }, - "Web/HTML/Element/address": { - "modified": "2019-03-23T22:24:30.575Z", + "Web/HTML/Element/sub": { + "modified": "2019-03-23T22:23:00.459Z", "contributors": [ "Legioinvicta" ] }, - "Web/HTML/Element/applet": { - "modified": "2019-03-23T22:24:01.530Z", + "Web/HTML/Element/summary": { + "modified": "2019-03-23T22:22:43.871Z", "contributors": [ "Legioinvicta" ] }, - "Web/HTML/Element/area": { - "modified": "2019-03-23T22:24:34.904Z", + "Web/HTML/Element/sup": { + "modified": "2019-03-23T22:22:44.577Z", "contributors": [ "Legioinvicta" ] }, - "Web/HTML/Element/article": { - "modified": "2019-03-23T22:24:37.217Z", + "Web/HTML/Element/table": { + "modified": "2019-03-23T22:22:37.782Z", "contributors": [ "Legioinvicta" ] }, - "Web/HTML/Element/aside": { - "modified": "2019-03-23T23:02:54.425Z", + "Web/HTML/Element/tbody": { + "modified": "2019-03-23T22:22:38.557Z", "contributors": [ - "llue" + "Legioinvicta" ] }, - "Web/HTML/Element/audio": { - "modified": "2019-03-23T22:24:31.743Z", + "Web/HTML/Element/td": { + "modified": "2019-03-23T22:22:36.618Z", "contributors": [ "Legioinvicta" ] }, - "Web/HTML/Element/b": { - "modified": "2019-03-23T22:24:36.355Z", + "Web/HTML/Element/template": { + "modified": "2019-03-23T22:22:36.185Z", "contributors": [ "Legioinvicta" ] }, - "Web/HTML/Element/base": { - "modified": "2019-03-23T22:24:29.858Z", + "Web/HTML/Element/textarea": { + "modified": "2020-10-15T21:50:57.306Z", "contributors": [ + "fscholz", "Legioinvicta" ] }, - "Web/HTML/Element/basefont": { - "modified": "2019-03-23T22:24:06.575Z", + "Web/HTML/Element/tfoot": { + "modified": "2019-03-23T22:22:35.229Z", "contributors": [ "Legioinvicta" ] }, - "Web/HTML/Element/bdi": { - "modified": "2019-03-23T22:24:35.937Z", + "Web/HTML/Element/th": { + "modified": "2019-03-23T22:22:39.656Z", "contributors": [ "Legioinvicta" ] }, - "Web/HTML/Element/bdo": { - "modified": "2019-03-23T22:24:30.076Z", + "Web/HTML/Element/thead": { + "modified": "2020-10-15T21:50:57.690Z", "contributors": [ + "fscholz", "Legioinvicta" ] }, - "Web/HTML/Element/bgsound": { - "modified": "2019-03-23T22:24:00.548Z", + "Web/HTML/Element/time": { + "modified": "2019-03-23T22:22:41.833Z", "contributors": [ "Legioinvicta" ] }, - "Web/HTML/Element/big": { - "modified": "2019-03-23T22:23:59.751Z", + "Web/HTML/Element/tr": { + "modified": "2019-03-23T22:22:38.222Z", "contributors": [ "Legioinvicta" ] }, - "Web/HTML/Element/blink": { - "modified": "2019-03-23T22:24:06.248Z", + "Web/HTML/Element/track": { + "modified": "2019-03-23T22:22:43.012Z", "contributors": [ - "teoli", "Legioinvicta" ] }, - "Web/HTML/Element/blockquote": { - "modified": "2019-03-23T22:24:32.254Z", + "Web/HTML/Element/tt": { + "modified": "2019-03-23T22:22:39.819Z", "contributors": [ "Legioinvicta" ] }, - "Web/HTML/Element/body": { - "modified": "2019-03-23T22:24:37.533Z", + "Web/HTML/Element/u": { + "modified": "2019-03-23T22:22:42.717Z", "contributors": [ "Legioinvicta" ] }, - "Web/HTML/Element/br": { - "modified": "2019-03-23T23:02:56.324Z", + "Web/HTML/Element/ul": { + "modified": "2019-03-23T22:22:42.253Z", "contributors": [ - "llue" + "Legioinvicta" ] }, - "Web/HTML/Element/button": { - "modified": "2019-03-23T22:24:31.103Z", + "Web/HTML/Element/var": { + "modified": "2019-03-23T22:22:43.305Z", "contributors": [ "Legioinvicta" ] }, - "Web/HTML/Element/canvas": { - "modified": "2019-03-23T22:24:30.337Z", + "Web/HTML/Element/video": { + "modified": "2019-03-23T22:22:39.252Z", "contributors": [ "Legioinvicta" ] }, - "Web/HTML/Element/caption": { - "modified": "2019-03-23T22:24:33.007Z", + "Web/HTML/Element/wbr": { + "modified": "2019-03-23T22:22:41.607Z", "contributors": [ "Legioinvicta" ] }, - "Web/HTML/Element/center": { - "modified": "2019-03-23T22:24:00.968Z", + "Web/HTML/Element/xmp": { + "modified": "2019-03-23T22:22:35.712Z", "contributors": [ "Legioinvicta" ] }, - "Web/HTML/Element/cite": { - "modified": "2019-03-23T22:24:35.142Z", + "Web/HTML/Global_attributes": { + "modified": "2019-03-23T23:02:43.690Z", "contributors": [ - "Legioinvicta" + "teoli" ] }, - "Web/HTML/Element/code": { - "modified": "2019-03-23T22:24:36.137Z", + "Web/HTML/Global_attributes/accesskey": { + "modified": "2019-03-23T22:22:38.770Z", "contributors": [ "Legioinvicta" ] }, - "Web/HTML/Element/col": { - "modified": "2019-03-23T22:24:15.868Z", + "Web/HTML/Global_attributes/class": { + "modified": "2019-03-23T22:22:35.405Z", "contributors": [ "Legioinvicta" ] }, - "Web/HTML/Element/colgroup": { - "modified": "2019-03-23T22:24:15.101Z", + "Web/HTML/Global_attributes/contenteditable": { + "modified": "2019-03-23T22:22:43.650Z", "contributors": [ "Legioinvicta" ] }, - "Web/HTML/Element/command": { - "modified": "2019-03-23T22:24:15.300Z", + "Web/HTML/Global_attributes/contextmenu": { + "modified": "2020-10-15T21:50:47.437Z", "contributors": [ + "SphinxKnight", "Legioinvicta" ] }, - "Web/HTML/Element/content": { - "modified": "2019-03-23T22:24:11.640Z", + "Web/HTML/Global_attributes/data-*": { + "modified": "2019-03-23T22:22:26.612Z", "contributors": [ "Legioinvicta" ] }, - "Web/HTML/Element/data": { - "modified": "2019-03-23T22:24:12.906Z", + "Web/HTML/Global_attributes/dir": { + "modified": "2019-03-23T22:22:29.249Z", "contributors": [ "Legioinvicta" ] }, - "Web/HTML/Element/datalist": { - "modified": "2019-03-23T22:24:16.075Z", + "Web/HTML/Global_attributes/draggable": { + "modified": "2019-03-23T22:22:20.909Z", "contributors": [ - "mfranzke", "Legioinvicta" ] }, - "Web/HTML/Element/dd": { - "modified": "2019-03-23T22:24:21.875Z", + "Web/HTML/Global_attributes/hidden": { + "modified": "2019-03-23T22:22:17.448Z", "contributors": [ "Legioinvicta" ] }, - "Web/HTML/Element/del": { - "modified": "2019-03-23T22:24:05.886Z", + "Web/HTML/Global_attributes/id": { + "modified": "2019-03-23T22:22:26.785Z", "contributors": [ "Legioinvicta" ] }, - "Web/HTML/Element/details": { - "modified": "2019-03-23T22:24:07.263Z", + "Web/HTML/Global_attributes/itemid": { + "modified": "2019-03-23T22:22:24.180Z", "contributors": [ "Legioinvicta" ] }, - "Web/HTML/Element/dfn": { - "modified": "2019-03-23T22:24:03.887Z", + "Web/HTML/Global_attributes/itemprop": { + "modified": "2019-03-23T22:22:18.837Z", "contributors": [ "Legioinvicta" ] }, - "Web/HTML/Element/dialog": { - "modified": "2019-03-23T22:24:06.889Z", + "Web/HTML/Global_attributes/itemref": { + "modified": "2019-03-23T22:22:25.523Z", "contributors": [ "Legioinvicta" ] }, - "Web/HTML/Element/dir": { - "modified": "2019-03-23T22:23:59.059Z", + "Web/HTML/Global_attributes/itemscope": { + "modified": "2019-03-23T22:22:27.169Z", "contributors": [ "Legioinvicta" ] }, - "Web/HTML/Element/div": { - "modified": "2019-03-23T22:44:10.000Z", + "Web/HTML/Global_attributes/itemtype": { + "modified": "2019-03-23T22:22:24.967Z", "contributors": [ - "llue" + "Legioinvicta" ] }, - "Web/HTML/Element/dl": { - "modified": "2019-03-23T22:23:57.383Z", + "Web/HTML/Global_attributes/lang": { + "modified": "2019-03-23T23:02:45.670Z", "contributors": [ - "Legioinvicta" + "llue" ] }, - "Web/HTML/Element/dt": { - "modified": "2019-03-23T22:24:04.732Z", + "Web/HTML/Global_attributes/spellcheck": { + "modified": "2019-03-23T22:22:25.809Z", "contributors": [ "Legioinvicta" ] }, - "Web/HTML/Element/element": { - "modified": "2019-03-23T22:48:09.171Z", + "Web/HTML/Global_attributes/style": { + "modified": "2019-03-23T22:44:10.989Z", "contributors": [ "llue" ] }, - "Web/HTML/Element/em": { - "modified": "2019-03-23T22:23:56.965Z", + "Web/HTML/Global_attributes/tabindex": { + "modified": "2019-03-23T22:22:21.110Z", "contributors": [ "Legioinvicta" ] }, - "Web/HTML/Element/embed": { - "modified": "2019-03-23T22:24:05.230Z", + "Web/HTML/Global_attributes/title": { + "modified": "2019-03-23T22:22:28.134Z", "contributors": [ "Legioinvicta" ] }, - "Web/HTML/Element/fieldset": { - "modified": "2019-03-23T22:23:57.920Z", + "Web/HTML/Global_attributes/translate": { + "modified": "2019-03-23T22:22:25.290Z", "contributors": [ "Legioinvicta" ] }, - "Web/HTML/Element/figcaption": { - "modified": "2019-03-23T22:24:05.668Z", + "Web/JavaScript": { + "modified": "2020-03-12T19:38:14.951Z", "contributors": [ - "Legioinvicta" + "SphinxKnight", + "fv3rdugo", + "enTropy", + "teoli", + "allergic" ] }, - "Web/HTML/Element/figure": { - "modified": "2019-03-23T22:24:01.197Z", + "Web/JavaScript/A_re-introduction_to_JavaScript": { + "modified": "2020-03-12T19:41:33.097Z", "contributors": [ - "Legioinvicta" + "pere", + "teoli", + "joanprimpratrec2" ] }, - "Web/HTML/Element/font": { - "modified": "2019-03-23T22:24:06.405Z", + "Web/JavaScript/Data_structures": { + "modified": "2020-07-27T06:57:51.432Z", "contributors": [ - "Legioinvicta" + "joanpardo", + "enTropy" ] }, - "Web/HTML/Element/footer": { - "modified": "2019-03-23T22:23:57.162Z", + "Web/JavaScript/Enumerability_and_ownership_of_properties": { + "modified": "2020-03-12T19:40:53.838Z", "contributors": [ - "Legioinvicta" + "enTropy" ] }, - "Web/HTML/Element/form": { - "modified": "2019-03-23T22:24:03.654Z", + "Web/JavaScript/EventLoop": { + "modified": "2020-03-12T19:40:40.928Z", "contributors": [ - "Legioinvicta" + "enTropy" ] }, - "Web/HTML/Element/frame": { - "modified": "2019-03-23T22:23:58.069Z", + "Web/JavaScript/Guide": { + "modified": "2020-03-12T19:40:37.449Z", "contributors": [ - "Legioinvicta" + "enTropy", + "fscholz" ] }, - "Web/HTML/Element/frameset": { - "modified": "2019-03-23T22:24:00.833Z", + "Web/JavaScript/Guide/Details_of_the_Object_Model": { + "modified": "2020-03-12T19:40:52.288Z", "contributors": [ - "Legioinvicta" + "wbamberg", + "SphinxKnight", + "fscholz", + "enTropy" ] }, - "Web/HTML/Element/head": { - "modified": "2019-03-23T22:23:58.845Z", + "Web/JavaScript/Guide/Functions": { + "modified": "2020-03-12T19:40:36.377Z", "contributors": [ - "Legioinvicta" + "wbamberg", + "fscholz", + "enTropy", + "llue" ] }, - "Web/HTML/Element/header": { - "modified": "2019-03-23T22:23:59.258Z", + "Web/JavaScript/Inheritance_and_the_prototype_chain": { + "modified": "2020-03-12T19:42:16.312Z", "contributors": [ - "Legioinvicta" + "ibesora", + "enTropy" ] }, - "Web/HTML/Element/hgroup": { - "modified": "2019-03-23T22:23:59.587Z", + "Web/JavaScript/Language_Resources": { + "modified": "2020-03-12T19:40:36.891Z", "contributors": [ - "Legioinvicta" + "enTropy" ] }, - "Web/HTML/Element/hr": { - "modified": "2019-03-23T22:24:04.544Z", + "Web/JavaScript/Reference/Errors": { + "modified": "2020-03-12T19:48:06.943Z", "contributors": [ - "Legioinvicta" + "Sheppy" ] }, - "Web/HTML/Element/html": { - "modified": "2019-03-23T22:23:44.381Z", + "Web/JavaScript/Reference/Functions": { + "modified": "2020-03-12T19:42:52.475Z", "contributors": [ - "Legioinvicta" + "fscholz" ] }, - "Web/HTML/Element/i": { - "modified": "2019-03-23T22:23:44.141Z", + "Web/JavaScript/Reference/Functions/arguments": { + "modified": "2020-03-12T19:42:37.661Z", "contributors": [ - "Legioinvicta" + "mones-cse" ] }, - "Web/HTML/Element/iframe": { - "modified": "2019-03-23T22:23:45.300Z", + "Web/JavaScript/Reference/Functions/arguments/length": { + "modified": "2020-03-12T19:42:34.789Z", "contributors": [ - "wbamberg", - "Legioinvicta" + "llue" ] }, - "Web/HTML/Element/image": { - "modified": "2019-03-23T22:23:55.696Z", + "Web/JavaScript/Reference/Functions/get": { + "modified": "2020-03-12T19:43:33.264Z", "contributors": [ - "Legioinvicta" + "llue" ] }, - "Web/HTML/Element/img": { - "modified": "2019-03-23T22:23:44.825Z", + "Web/JavaScript/Reference/Global_Objects/DataView": { + "modified": "2019-03-23T22:46:12.658Z", "contributors": [ - "rcomellas", - "Legioinvicta" + "Sebastianz" ] }, - "Web/HTML/Element/input": { - "modified": "2020-12-11T04:26:56.268Z", + "Web/JavaScript/Reference/Global_Objects/DataView/buffer": { + "modified": "2019-03-23T22:44:07.496Z", "contributors": [ - "jaumeol", - "Legioinvicta" + "llue" ] }, - "Web/HTML/Element/ins": { - "modified": "2019-03-23T22:23:31.337Z", + "Web/JavaScript/Reference/Global_Objects/DataView/getFloat32": { + "modified": "2019-03-23T22:44:02.895Z", "contributors": [ - "Legioinvicta" + "enTropy", + "llue" ] }, - "Web/HTML/Element/isindex": { - "modified": "2019-03-23T22:23:32.350Z", + "Web/JavaScript/Reference/Global_Objects/EvalError": { + "modified": "2019-03-23T22:47:17.840Z", "contributors": [ - "Legioinvicta" + "fscholz" ] }, - "Web/HTML/Element/kbd": { - "modified": "2019-03-23T22:23:30.123Z", + "Web/JavaScript/Reference/Global_Objects/Function": { + "modified": "2019-03-23T22:47:58.251Z", "contributors": [ - "Legioinvicta" + "fscholz" ] }, - "Web/HTML/Element/keygen": { - "modified": "2019-03-23T22:23:29.875Z", + "Web/JavaScript/Reference/Global_Objects/Function/arguments": { + "modified": "2019-03-23T22:48:02.332Z", "contributors": [ - "Legioinvicta" + "llue" ] }, - "Web/HTML/Element/label": { - "modified": "2019-03-23T22:23:25.920Z", + "Web/JavaScript/Reference/Global_Objects/Function/caller": { + "modified": "2019-03-18T21:15:51.563Z", "contributors": [ - "Legioinvicta" + "teoli", + "llue" ] }, - "Web/HTML/Element/legend": { - "modified": "2019-03-23T22:23:27.067Z", + "Web/JavaScript/Reference/Global_Objects/Function/length": { + "modified": "2019-03-23T22:48:00.101Z", "contributors": [ - "Legioinvicta" + "llue" ] }, - "Web/HTML/Element/li": { - "modified": "2019-03-23T22:23:30.535Z", + "Web/JavaScript/Reference/Global_Objects/Function/name": { + "modified": "2019-03-23T22:47:57.251Z", "contributors": [ - "Legioinvicta" + "SphinxKnight", + "kdex", + "llue" ] }, - "Web/HTML/Element/link": { - "modified": "2019-03-23T22:23:31.095Z", + "Web/JavaScript/Reference/Global_Objects/Function/toSource": { + "modified": "2019-03-23T22:46:13.863Z", "contributors": [ - "Legioinvicta" + "teoli", + "llue" ] }, - "Web/HTML/Element/listing": { - "modified": "2019-03-23T22:23:31.930Z", + "Web/JavaScript/Reference/Global_Objects/Object": { + "modified": "2019-03-23T22:49:56.793Z", "contributors": [ - "Legioinvicta" + "enTropy", + "fscholz" ] }, - "Web/HTML/Element/main": { - "modified": "2019-03-23T22:23:29.013Z", + "Web/JavaScript/Reference/Global_Objects/Object/assign": { + "modified": "2019-05-19T17:20:08.284Z", "contributors": [ - "Legioinvicta" + "SphinxKnight", + "kdex", + "mariodev12", + "llue" ] }, - "Web/HTML/Element/map": { - "modified": "2019-03-23T22:23:28.443Z", + "Web/JavaScript/Reference/Global_Objects/Object/freeze": { + "modified": "2019-03-23T22:46:16.251Z", "contributors": [ - "Legioinvicta" + "enTropy" ] }, - "Web/HTML/Element/mark": { - "modified": "2019-03-23T22:23:29.469Z", + "Web/JavaScript/Reference/Global_Objects/Object/getPrototypeOf": { + "modified": "2019-03-23T22:46:10.277Z", "contributors": [ - "Legioinvicta" + "enTropy" ] }, - "Web/HTML/Element/marquee": { - "modified": "2019-03-23T22:23:25.351Z", + "Web/JavaScript/Reference/Global_Objects/Object/isExtensible": { + "modified": "2019-03-23T22:46:14.358Z", "contributors": [ - "Legioinvicta" + "enTropy" ] }, - "Web/HTML/Element/menu": { - "modified": "2019-03-23T22:43:53.972Z", + "Web/JavaScript/Reference/Global_Objects/Object/isFrozen": { + "modified": "2019-03-23T22:46:09.931Z", + "contributors": [ + "enTropy" + ] + }, + "Web/JavaScript/Reference/Global_Objects/Object/keys": { + "modified": "2019-03-23T22:46:06.321Z", + "contributors": [ + "enTropy" + ] + }, + "Web/JavaScript/Reference/Global_Objects/WeakMap": { + "modified": "2020-10-06T14:35:54.632Z", "contributors": [ + "oleksandrstarov", + "SphinxKnight", + "enTropy", + "llue", + "LPGhatguy" + ] + }, + "Web/JavaScript/Reference/Global_Objects/WeakMap/clear": { + "modified": "2019-03-23T22:44:13.701Z", + "contributors": [ + "teoli", "llue" ] }, - "Web/HTML/Element/menuitem": { - "modified": "2019-03-23T22:23:24.576Z", + "Web/JavaScript/Reference/Global_Objects/WeakMap/delete": { + "modified": "2019-03-23T22:44:05.122Z", + "contributors": [ + "SphinxKnight", + "llue" + ] + }, + "Web/JavaScript/Reference/Global_Objects/WeakMap/get": { + "modified": "2019-03-23T22:43:55.576Z", + "contributors": [ + "SphinxKnight", + "llue" + ] + }, + "Web/JavaScript/Reference/Global_Objects/WeakMap/has": { + "modified": "2019-03-18T21:16:35.783Z", + "contributors": [ + "SphinxKnight", + "llue" + ] + }, + "Web/JavaScript/Reference/Global_Objects/WeakMap/set": { + "modified": "2019-03-23T22:43:56.028Z", + "contributors": [ + "SphinxKnight", + "llue" + ] + }, + "Web/JavaScript/Reference/Global_Objects/WeakSet": { + "modified": "2019-03-23T22:44:01.226Z", + "contributors": [ + "SphinxKnight", + "llue", + "fscholz" + ] + }, + "Web/JavaScript/Reference/Global_Objects/WeakSet/add": { + "modified": "2019-03-23T22:44:07.820Z", + "contributors": [ + "SphinxKnight", + "llue" + ] + }, + "Web/JavaScript/Reference/Global_Objects/WeakSet/clear": { + "modified": "2019-03-23T22:44:09.553Z", + "contributors": [ + "teoli", + "llue" + ] + }, + "Web/JavaScript/Reference/Global_Objects/WeakSet/delete": { + "modified": "2019-03-23T22:44:09.377Z", "contributors": [ - "Legioinvicta" + "SphinxKnight", + "llue" ] }, - "Web/HTML/Element/meta": { - "modified": "2019-03-23T22:23:14.832Z", + "Web/JavaScript/Reference/Global_Objects/WeakSet/has": { + "modified": "2019-03-23T22:44:07.338Z", "contributors": [ - "Legioinvicta" + "SphinxKnight", + "llue" ] }, - "Web/HTML/Element/meter": { - "modified": "2019-03-23T22:23:09.097Z", + "Web/Reference": { + "modified": "2019-03-23T22:22:23.982Z", "contributors": [ - "Legioinvicta" + "Legioinvicta", + "andrealeone" ] }, - "Web/HTML/Element/multicol": { - "modified": "2019-03-23T22:23:18.874Z", + "Web/Reference/API": { + "modified": "2019-03-23T22:22:24.413Z", "contributors": [ "Legioinvicta" ] }, - "Web/HTML/Element/nav": { - "modified": "2019-03-23T22:48:17.923Z", + "Web/Tutorials": { + "modified": "2019-03-23T22:22:12.721Z", "contributors": [ - "wbamberg", - "llue" + "Legioinvicta" ] }, - "Web/HTML/Element/nextid": { - "modified": "2019-03-23T22:22:37.005Z", + "Web/XSLT": { + "modified": "2019-03-23T23:40:59.738Z", "contributors": [ - "Legioinvicta" + "ExE-Boss", + "teoli", + "Oriol" ] }, - "Web/HTML/Element/nobr": { - "modified": "2019-03-23T22:23:17.356Z", + "Mozilla/Firefox/Releases/2": { + "modified": "2019-01-16T14:39:26.842Z", "contributors": [ - "Legioinvicta" + "fscholz", + "Toniher" ] }, - "Web/HTML/Element/noembed": { - "modified": "2019-03-23T22:23:16.262Z", + "Glossary/IP_Address": { + "modified": "2019-03-23T22:19:57.768Z", "contributors": [ "Legioinvicta" ] }, - "Web/HTML/Element/noframes": { - "modified": "2019-03-23T22:23:17.870Z", + "Glossary/Scope": { + "modified": "2019-03-23T22:20:06.122Z", "contributors": [ "Legioinvicta" ] }, - "Web/HTML/Element/noscript": { - "modified": "2019-03-23T22:23:12.362Z", + "Glossary/Attribute": { + "modified": "2019-03-23T22:19:53.370Z", "contributors": [ "Legioinvicta" ] }, - "Web/HTML/Element/object": { - "modified": "2019-03-23T22:23:08.187Z", + "Glossary/Character": { + "modified": "2019-03-23T22:19:53.728Z", "contributors": [ "Legioinvicta" ] }, - "Web/HTML/Element/ol": { - "modified": "2019-03-23T22:23:11.431Z", + "Glossary/character_encoding": { + "modified": "2019-03-23T22:19:50.642Z", "contributors": [ "Legioinvicta" ] }, - "Web/HTML/Element/optgroup": { - "modified": "2019-03-23T22:23:08.674Z", + "Glossary/Tag": { + "modified": "2019-03-23T22:19:57.140Z", "contributors": [ "Legioinvicta" ] }, - "Web/HTML/Element/option": { - "modified": "2019-03-23T22:23:17.744Z", + "Glossary/Function": { + "modified": "2019-03-23T22:19:50.324Z", "contributors": [ "Legioinvicta" ] }, - "Web/HTML/Element/output": { - "modified": "2019-03-23T22:23:07.934Z", + "Glossary/Method": { + "modified": "2019-03-23T22:20:05.381Z", "contributors": [ - "wbamberg", "Legioinvicta" ] }, - "Web/HTML/Element/p": { - "modified": "2019-03-23T22:22:56.526Z", + "Glossary/Browser": { + "modified": "2019-03-23T22:19:58.039Z", "contributors": [ "Legioinvicta" ] }, - "Web/HTML/Element/param": { - "modified": "2019-03-23T22:23:02.418Z", + "Glossary/Object": { + "modified": "2019-03-23T22:19:50.943Z", "contributors": [ "Legioinvicta" ] }, - "Web/HTML/Element/picture": { - "modified": "2019-03-23T22:23:01.844Z", + "Glossary/Primitive": { + "modified": "2019-03-23T22:20:08.496Z", "contributors": [ "Legioinvicta" ] }, - "Web/HTML/Element/plaintext": { - "modified": "2019-03-23T22:22:59.391Z", + "Glossary/property": { + "modified": "2019-03-23T22:20:10.616Z", "contributors": [ "Legioinvicta" ] }, - "Web/HTML/Element/pre": { - "modified": "2019-03-23T22:23:02.683Z", + "Glossary/Object_reference": { + "modified": "2019-03-23T22:20:02.599Z", "contributors": [ "Legioinvicta" ] }, - "Web/HTML/Element/progress": { - "modified": "2019-03-23T22:22:54.749Z", + "Glossary/Server": { + "modified": "2019-03-23T22:19:48.520Z", "contributors": [ - "wbamberg", "Legioinvicta" ] }, - "Web/HTML/Element/q": { - "modified": "2020-10-15T21:50:56.392Z", + "Glossary/Value": { + "modified": "2019-03-23T22:20:04.109Z", "contributors": [ - "fscholz", "Legioinvicta" ] }, - "Web/HTML/Element/rp": { - "modified": "2019-03-23T22:22:55.170Z", + "Learn/Accessibility/What_is_accessibility": { + "modified": "2020-09-28T14:42:22.680Z", "contributors": [ - "Legioinvicta" + "PalomaBanyuls", + "editorUOC" ] }, - "Web/HTML/Element/rt": { - "modified": "2019-03-23T22:22:59.953Z", + "Learn/CSS/Building_blocks/Cascade_and_inheritance": { + "modified": "2020-09-06T11:07:02.729Z", "contributors": [ - "Legioinvicta" + "UOCccorcoles", + "editorUOC" ] }, - "Web/HTML/Element/rtc": { - "modified": "2019-03-23T22:22:57.513Z", + "Learn/CSS/Building_blocks/Debugging_CSS": { + "modified": "2020-10-15T22:27:14.006Z", "contributors": [ - "Legioinvicta" + "UOCccorcoles", + "editorUOC" ] }, - "Web/HTML/Element/ruby": { - "modified": "2019-03-23T22:48:18.101Z", + "Learn/CSS/Building_blocks/Overflowing_content": { + "modified": "2020-09-07T07:28:16.584Z", "contributors": [ - "llue" + "UOCccorcoles", + "editorUOC" ] }, - "Web/HTML/Element/s": { - "modified": "2019-03-23T22:23:02.208Z", + "Learn/CSS/Building_blocks/Sizing_items_in_CSS": { + "modified": "2020-07-16T22:29:20.212Z", "contributors": [ - "Legioinvicta" + "editorUOC" ] }, - "Web/HTML/Element/samp": { - "modified": "2019-03-23T22:22:59.763Z", + "Learn/CSS/Building_blocks/Backgrounds_and_borders": { + "modified": "2020-09-06T17:11:06.366Z", "contributors": [ - "Legioinvicta" + "UOCccorcoles", + "editorUOC" ] }, - "Web/HTML/Element/script": { - "modified": "2019-03-23T22:22:58.125Z", + "Learn/CSS/Building_blocks/Selectors/Combinators": { + "modified": "2020-09-06T14:03:41.366Z", "contributors": [ - "Legioinvicta" + "UOCccorcoles", + "editorUOC" ] }, - "Web/HTML/Element/section": { - "modified": "2019-03-23T22:23:02.047Z", + "Learn/CSS/Building_blocks/Selectors": { + "modified": "2020-09-06T12:38:01.863Z", "contributors": [ - "Legioinvicta" + "UOCccorcoles", + "editorUOC" ] }, - "Web/HTML/Element/select": { - "modified": "2019-03-23T22:22:53.707Z", + "Learn/CSS/Building_blocks/Selectors/Pseudo-classes_and_pseudo-elements": { + "modified": "2020-09-06T13:50:00.436Z", "contributors": [ - "Legioinvicta" + "UOCccorcoles", + "editorUOC" ] }, - "Web/HTML/Element/small": { - "modified": "2019-03-23T22:22:57.046Z", + "Learn/CSS/Building_blocks/Selectors/Attribute_selectors": { + "modified": "2020-09-06T13:31:42.768Z", "contributors": [ - "Legioinvicta" + "UOCccorcoles", + "editorUOC" ] }, - "Web/HTML/Element/source": { - "modified": "2019-03-23T22:23:01.454Z", + "Learn/CSS/Building_blocks/Selectors/Type_Class_and_ID_Selectors": { + "modified": "2020-09-06T13:14:37.617Z", "contributors": [ - "Legioinvicta" + "UOCccorcoles", + "editorUOC" ] }, - "Web/HTML/Element/spacer": { - "modified": "2019-03-23T22:23:01.649Z", + "Learn/CSS/Building_blocks/Values_and_units": { + "modified": "2020-09-07T09:12:07.786Z", "contributors": [ - "Legioinvicta" + "UOCccorcoles", + "editorUOC" ] }, - "Web/HTML/Element/span": { - "modified": "2019-03-23T22:22:57.324Z", + "Learn/CSS/Building_blocks/A_cool_looking_box": { + "modified": "2020-07-16T22:28:26.308Z", "contributors": [ "Legioinvicta" ] }, - "Web/HTML/Element/strike": { - "modified": "2019-03-23T22:22:53.130Z", + "Learn/CSS/Building_blocks/Creating_fancy_letterheaded_paper": { + "modified": "2020-07-16T22:28:24.307Z", "contributors": [ "Legioinvicta" ] }, - "Web/HTML/Element/strong": { - "modified": "2019-03-23T22:23:00.673Z", + "Learn/CSS/CSS_layout/Responsive_Design": { + "modified": "2020-09-17T06:03:03.884Z", "contributors": [ - "Legioinvicta" + "UOCccorcoles", + "editorUOC" ] }, - "Web/HTML/Element/style": { - "modified": "2019-03-23T22:22:54.521Z", + "Learn/CSS/CSS_layout/Practical_positioning_examples": { + "modified": "2020-07-16T22:26:47.642Z", "contributors": [ "Legioinvicta" ] }, - "Web/HTML/Element/sub": { - "modified": "2019-03-23T22:23:00.459Z", + "Learn/CSS/CSS_layout/Flexbox": { + "modified": "2020-09-15T14:11:31.873Z", "contributors": [ + "UOCccorcoles", + "editorUOC", "Legioinvicta" ] }, - "Web/HTML/Element/summary": { - "modified": "2019-03-23T22:22:43.871Z", + "Learn/CSS/CSS_layout/Floats": { + "modified": "2020-10-16T13:31:05.489Z", "contributors": [ + "zuruckzugehen", "Legioinvicta" ] }, - "Web/HTML/Element/sup": { - "modified": "2019-03-23T22:22:44.577Z", + "Learn/CSS/CSS_layout/Normal_Flow": { + "modified": "2020-07-16T22:27:20.382Z", "contributors": [ - "Legioinvicta" + "editorUOC" ] }, - "Web/HTML/Element/table": { - "modified": "2019-03-23T22:22:37.782Z", + "Learn/CSS/CSS_layout/Grids": { + "modified": "2020-09-15T17:42:28.654Z", "contributors": [ + "UOCccorcoles", + "editorUOC", "Legioinvicta" ] }, - "Web/HTML/Element/tbody": { - "modified": "2019-03-23T22:22:38.557Z", + "Learn/CSS/CSS_layout": { + "modified": "2020-07-16T22:26:29.321Z", "contributors": [ "Legioinvicta" ] }, - "Web/HTML/Element/td": { - "modified": "2019-03-23T22:22:36.618Z", + "Learn/CSS/CSS_layout/Introduction": { + "modified": "2020-09-15T13:10:38.905Z", "contributors": [ + "UOCccorcoles", + "editorUOC", "Legioinvicta" ] }, - "Web/HTML/Element/template": { - "modified": "2019-03-23T22:22:36.185Z", + "Learn/CSS/CSS_layout/Positioning": { + "modified": "2020-07-16T22:26:41.807Z", "contributors": [ "Legioinvicta" ] }, - "Web/HTML/Element/textarea": { - "modified": "2020-10-15T21:50:57.306Z", + "Learn/CSS/CSS_layout/Supporting_Older_Browsers": { + "modified": "2020-07-16T22:27:17.065Z", "contributors": [ - "fscholz", - "Legioinvicta" + "editorUOC" ] }, - "Web/HTML/Element/tfoot": { - "modified": "2019-03-23T22:22:35.229Z", + "Learn/CSS/Styling_text/Typesetting_a_homepage": { + "modified": "2020-07-16T22:26:25.942Z", "contributors": [ "Legioinvicta" ] }, - "Web/HTML/Element/th": { - "modified": "2019-03-23T22:22:39.656Z", + "Learn/CSS/Styling_text/Styling_links": { + "modified": "2020-09-18T08:18:22.715Z", "contributors": [ + "UOCccorcoles", + "editorUOC", "Legioinvicta" ] }, - "Web/HTML/Element/thead": { - "modified": "2020-10-15T21:50:57.690Z", + "Learn/CSS/Styling_text/Web_fonts": { + "modified": "2020-09-01T07:12:36.767Z", "contributors": [ - "fscholz", + "UOCccorcoles", + "editorUOC", "Legioinvicta" ] }, - "Web/HTML/Element/time": { - "modified": "2019-03-23T22:22:41.833Z", + "Learn/CSS/Styling_text": { + "modified": "2020-07-16T22:25:57.417Z", "contributors": [ "Legioinvicta" ] }, - "Web/HTML/Element/tr": { - "modified": "2019-03-23T22:22:38.222Z", + "Learn/CSS/Styling_text/Styling_lists": { + "modified": "2020-09-18T08:12:42.705Z", "contributors": [ + "UOCccorcoles", + "editorUOC", "Legioinvicta" ] }, - "Web/HTML/Element/track": { - "modified": "2019-03-23T22:22:43.012Z", + "Learn/CSS/Styling_text/Fundamentals": { + "modified": "2020-09-18T07:56:58.583Z", "contributors": [ + "UOCccorcoles", + "editorUOC", "Legioinvicta" ] }, - "Web/HTML/Element/tt": { - "modified": "2019-03-23T22:22:39.819Z", + "Learn/CSS/First_steps/Getting_started": { + "modified": "2020-08-31T14:05:15.542Z", "contributors": [ - "Legioinvicta" + "UOCccorcoles", + "editorUOC" ] }, - "Web/HTML/Element/u": { - "modified": "2019-03-23T22:22:42.717Z", + "Learn/CSS/First_steps/How_CSS_is_structured": { + "modified": "2020-09-18T07:37:19.056Z", "contributors": [ - "Legioinvicta" + "UOCccorcoles", + "editorUOC" ] }, - "Web/HTML/Element/ul": { - "modified": "2019-03-23T22:22:42.253Z", + "Learn/CSS/First_steps/How_CSS_works": { + "modified": "2020-09-18T07:45:35.450Z", "contributors": [ - "Legioinvicta" + "UOCccorcoles", + "editorUOC" ] }, - "Web/HTML/Element/var": { - "modified": "2019-03-23T22:22:43.305Z", + "Learn/CSS/First_steps/What_is_CSS": { + "modified": "2020-10-15T22:26:48.511Z", "contributors": [ - "Legioinvicta" + "UOCccorcoles", + "editorUOC" ] }, - "Web/HTML/Element/video": { - "modified": "2019-03-23T22:22:39.252Z", + "Learn/CSS/Building_blocks/Fundamental_CSS_comprehension": { + "modified": "2020-07-16T22:28:11.319Z", "contributors": [ "Legioinvicta" ] }, - "Web/HTML/Element/wbr": { - "modified": "2019-03-23T22:22:41.607Z", + "Learn/Getting_started_with_the_web/How_the_Web_works": { + "modified": "2020-07-16T22:33:59.006Z", "contributors": [ "Legioinvicta" ] }, - "Web/HTML/Element/xmp": { - "modified": "2019-03-23T22:22:35.712Z", + "Learn/Getting_started_with_the_web/CSS_basics": { + "modified": "2020-07-16T22:34:56.090Z", "contributors": [ "Legioinvicta" ] }, - "Web/HTML/Elements_en_línia": { - "modified": "2019-03-23T22:19:22.875Z", + "Learn/Getting_started_with_the_web/Installing_basic_software": { + "modified": "2020-07-16T22:34:06.205Z", "contributors": [ + "editorUOC", + "nuriarai", "Legioinvicta" ] }, - "Web/HTML/Global_attributes": { - "modified": "2019-03-23T23:02:43.690Z", + "Learn/Getting_started_with_the_web/JavaScript_basics": { + "modified": "2020-07-16T22:35:08.325Z", "contributors": [ - "teoli" + "Legioinvicta" ] }, - "Web/HTML/Global_attributes/accesskey": { - "modified": "2019-03-23T22:22:38.770Z", + "Learn/Getting_started_with_the_web/Publishing_your_website": { + "modified": "2020-07-16T22:34:23.226Z", "contributors": [ "Legioinvicta" ] }, - "Web/HTML/Global_attributes/class": { - "modified": "2019-03-23T22:22:35.405Z", + "Learn/Getting_started_with_the_web/What_will_your_website_look_like": { + "modified": "2020-07-16T22:34:14.054Z", "contributors": [ "Legioinvicta" ] }, - "Web/HTML/Global_attributes/contenteditable": { - "modified": "2019-03-23T22:22:43.650Z", + "Learn/Getting_started_with_the_web/Dealing_with_files": { + "modified": "2020-07-16T22:34:31.776Z", "contributors": [ "Legioinvicta" ] }, - "Web/HTML/Global_attributes/contextmenu": { - "modified": "2020-10-15T21:50:47.437Z", + "Learn/Forms/How_to_structure_a_web_form": { + "modified": "2020-09-18T11:10:39.794Z", "contributors": [ - "SphinxKnight", - "Legioinvicta" + "UOCccorcoles", + "editorUOC" ] }, - "Web/HTML/Global_attributes/data-*": { - "modified": "2019-03-23T22:22:26.612Z", + "Learn/Forms/Basic_native_form_controls": { + "modified": "2020-09-15T07:44:08.730Z", "contributors": [ - "Legioinvicta" + "UOCccorcoles", + "editorUOC" ] }, - "Web/HTML/Global_attributes/dir": { - "modified": "2019-03-23T22:22:29.249Z", + "Learn/Forms/Your_first_form": { + "modified": "2020-09-18T11:08:30.671Z", "contributors": [ - "Legioinvicta" + "UOCccorcoles", + "editorUOC" ] }, - "Web/HTML/Global_attributes/draggable": { - "modified": "2019-03-23T22:22:20.909Z", + "Learn/Forms": { + "modified": "2020-07-16T22:20:53.997Z", "contributors": [ + "chrisdavidmills", "Legioinvicta" ] }, - "Web/HTML/Global_attributes/dropzone": { - "modified": "2019-03-23T22:22:19.145Z", + "Learn/Forms/Form_validation": { + "modified": "2020-09-18T11:25:33.611Z", "contributors": [ - "Legioinvicta" + "UOCccorcoles", + "editorUOC" ] }, - "Web/HTML/Global_attributes/hidden": { - "modified": "2019-03-23T22:22:17.448Z", + "Learn/HTML/Introduction_to_HTML/Creating_hyperlinks": { + "modified": "2020-08-31T10:00:44.793Z", "contributors": [ + "UOCccorcoles", + "editorUOC", + "casabona1983", "Legioinvicta" ] }, - "Web/HTML/Global_attributes/id": { - "modified": "2019-03-23T22:22:26.785Z", + "Learn/HTML/Introduction_to_HTML/Debugging_HTML": { + "modified": "2020-08-31T12:21:35.167Z", "contributors": [ + "UOCccorcoles", + "editorUOC", "Legioinvicta" ] }, - "Web/HTML/Global_attributes/itemid": { - "modified": "2019-03-23T22:22:24.180Z", + "Learn/HTML/Introduction_to_HTML/Document_and_website_structure": { + "modified": "2020-08-31T11:17:14.859Z", "contributors": [ + "UOCccorcoles", + "editorUOC", "Legioinvicta" ] }, - "Web/HTML/Global_attributes/itemprop": { - "modified": "2019-03-23T22:22:18.837Z", + "Learn/HTML/Introduction_to_HTML/Structuring_a_page_of_content": { + "modified": "2020-07-16T22:24:17.607Z", "contributors": [ "Legioinvicta" ] }, - "Web/HTML/Global_attributes/itemref": { - "modified": "2019-03-23T22:22:25.523Z", + "Learn/HTML/Introduction_to_HTML/HTML_text_fundamentals": { + "modified": "2020-09-18T05:51:57.560Z", "contributors": [ + "UOCccorcoles", + "editorUOC", "Legioinvicta" ] }, - "Web/HTML/Global_attributes/itemscope": { - "modified": "2019-03-23T22:22:27.169Z", + "Learn/HTML/Introduction_to_HTML/Advanced_text_formatting": { + "modified": "2020-09-18T07:30:27.211Z", "contributors": [ + "UOCccorcoles", + "editorUOC", "Legioinvicta" ] }, - "Web/HTML/Global_attributes/itemtype": { - "modified": "2019-03-23T22:22:24.967Z", + "Learn/HTML/Introduction_to_HTML/Getting_started": { + "modified": "2020-09-18T05:39:40.192Z", "contributors": [ - "Legioinvicta" + "UOCccorcoles", + "editorUOC", + "casabona1983", + "nuriarai", + "Legioinvicta", + "lawer" ] }, - "Web/HTML/Global_attributes/lang": { - "modified": "2019-03-23T23:02:45.670Z", + "Learn/HTML/Introduction_to_HTML": { + "modified": "2020-07-16T22:22:45.604Z", "contributors": [ - "llue" + "Legioinvicta", + "ccorcoles" ] }, - "Web/HTML/Global_attributes/spellcheck": { - "modified": "2019-03-23T22:22:25.809Z", + "Learn/HTML/Introduction_to_HTML/Marking_up_a_letter": { + "modified": "2020-07-16T22:23:11.111Z", "contributors": [ + "laiagabe", "Legioinvicta" ] }, - "Web/HTML/Global_attributes/style": { - "modified": "2019-03-23T22:44:10.989Z", + "Learn/HTML/Introduction_to_HTML/The_head_metadata_in_HTML": { + "modified": "2020-08-31T06:21:25.281Z", "contributors": [ - "llue" + "UOCccorcoles", + "editorUOC", + "Legioinvicta" ] }, - "Web/HTML/Global_attributes/tabindex": { - "modified": "2019-03-23T22:22:21.110Z", + "Learn/HTML/Multimedia_and_embedding/Adding_vector_graphics_to_the_Web": { + "modified": "2020-07-16T22:24:39.628Z", "contributors": [ "Legioinvicta" ] }, - "Web/HTML/Global_attributes/title": { - "modified": "2019-03-23T22:22:28.134Z", + "Learn/HTML/Multimedia_and_embedding/Video_and_audio_content": { + "modified": "2020-07-16T22:24:50.962Z", "contributors": [ "Legioinvicta" ] }, - "Web/HTML/Global_attributes/translate": { - "modified": "2019-03-23T22:22:25.290Z", + "Learn/HTML/Multimedia_and_embedding/Other_embedding_technologies": { + "modified": "2020-07-16T22:25:00.150Z", "contributors": [ "Legioinvicta" ] }, - "Web/HTML/Optimizing_your_pages_for_speculative_parsing": { - "modified": "2019-03-23T22:24:14.691Z", + "Learn/HTML/Multimedia_and_embedding/Images_in_HTML": { + "modified": "2020-09-01T07:45:13.148Z", "contributors": [ + "UOCccorcoles", + "editorUOC", "Legioinvicta" ] }, - "Web/JavaScript": { - "modified": "2020-03-12T19:38:14.951Z", + "Learn/HTML/Multimedia_and_embedding/Responsive_images": { + "modified": "2020-07-16T22:24:32.326Z", "contributors": [ - "SphinxKnight", - "fv3rdugo", - "enTropy", - "teoli", - "allergic" + "rcomellas", + "Legioinvicta" ] }, - "Web/JavaScript/A_re-introduction_to_JavaScript": { - "modified": "2020-03-12T19:41:33.097Z", + "Learn/HTML/Multimedia_and_embedding": { + "modified": "2020-07-16T22:24:24.359Z", "contributors": [ - "pere", - "teoli", - "joanprimpratrec2" + "Legioinvicta" ] }, - "Web/JavaScript/Data_structures": { - "modified": "2020-07-27T06:57:51.432Z", + "Learn/HTML/Multimedia_and_embedding/Mozilla_splash_page": { + "modified": "2020-07-16T22:25:05.830Z", "contributors": [ - "joanpardo", - "enTropy" + "Legioinvicta" ] }, - "Web/JavaScript/Enumerability_and_ownership_of_properties": { - "modified": "2020-03-12T19:40:53.838Z", + "Learn/HTML/Tables/Structuring_planet_data": { + "modified": "2020-07-16T22:25:28.884Z", "contributors": [ - "enTropy" + "Legioinvicta" ] }, - "Web/JavaScript/EventLoop": { - "modified": "2020-03-12T19:40:40.928Z", + "Learn/HTML/Tables/Basics": { + "modified": "2020-09-09T11:52:32.829Z", "contributors": [ - "enTropy" + "UOCccorcoles", + "editorUOC", + "Legioinvicta" ] }, - "Web/JavaScript/Guide": { - "modified": "2020-03-12T19:40:37.449Z", + "Learn/HTML/Tables": { + "modified": "2020-07-16T22:25:10.298Z", "contributors": [ - "enTropy", - "fscholz" + "Legioinvicta" ] }, - "Web/JavaScript/Guide/Details_of_the_Object_Model": { - "modified": "2020-03-12T19:40:52.288Z", + "Learn/HTML/Tables/Advanced": { + "modified": "2020-09-09T12:02:19.448Z", "contributors": [ - "wbamberg", - "SphinxKnight", - "fscholz", - "enTropy" + "UOCccorcoles", + "editorUOC", + "Legioinvicta" ] }, - "Web/JavaScript/Guide/Expressions_i_Operadors": { - "modified": "2020-03-12T19:40:39.289Z", + "MDN/At_ten": { + "modified": "2019-03-23T22:45:53.203Z", "contributors": [ - "wbamberg", - "fscholz", - "enTropy", "llue" ] }, - "Web/JavaScript/Guide/Functions": { - "modified": "2020-03-12T19:40:36.377Z", + "orphaned/MDN/Community": { + "modified": "2019-09-11T08:03:49.400Z", "contributors": [ + "SphinxKnight", "wbamberg", - "fscholz", - "enTropy", - "llue" - ] - }, - "Web/JavaScript/Guide/Introducció": { - "modified": "2020-07-27T11:48:12.566Z", - "contributors": [ - "joanpardo", - "mariodev12", - "enTropy" + "Legioinvicta" ] }, - "Web/JavaScript/Inheritance_and_the_prototype_chain": { - "modified": "2020-03-12T19:42:16.312Z", + "orphaned/MDN/Contribute/Howto/Create_an_MDN_account": { + "modified": "2019-03-18T21:20:46.294Z", "contributors": [ - "ibesora", - "enTropy" + "jordibrus" ] }, - "Web/JavaScript/Introducció_al_Javascript_orientat_a_Objectes": { - "modified": "2020-03-12T19:40:42.090Z", + "MDN/Contribute/Processes": { + "modified": "2019-01-17T01:56:28.494Z", "contributors": [ - "llue" + "wbamberg", + "Legioinvicta" ] }, - "Web/JavaScript/Language_Resources": { - "modified": "2020-03-12T19:40:36.891Z", + "MDN/Yari": { + "modified": "2019-09-09T15:51:48.851Z", "contributors": [ - "enTropy" + "SphinxKnight", + "wbamberg", + "Legioinvicta" ] }, - "Web/JavaScript/Reference/Errors": { - "modified": "2020-03-12T19:48:06.943Z", + "Web/Guide/Mobile/A_hybrid_approach": { + "modified": "2019-03-23T23:33:18.345Z", "contributors": [ - "Sheppy" + "trevorh" ] }, - "Web/JavaScript/Reference/Errors/Nomes-Lectura": { - "modified": "2020-03-12T19:48:06.623Z", + "Web/Guide/Mobile/Mobile-friendliness": { + "modified": "2019-03-23T23:33:21.925Z", "contributors": [ - "vilherda" + "caos30" ] }, - "Web/JavaScript/Reference/Functions": { - "modified": "2020-03-12T19:42:52.475Z", + "Web/Guide/Mobile/Separate_sites": { + "modified": "2019-03-23T23:33:19.296Z", "contributors": [ - "fscholz" + "trevorh" ] }, - "Web/JavaScript/Reference/Functions/arguments": { - "modified": "2020-03-12T19:42:37.661Z", + "Web/API/Canvas_API/Tutorial/Advanced_animations": { + "modified": "2019-03-23T22:03:52.604Z", "contributors": [ - "mones-cse" + "Legioinvicta" ] }, - "Web/JavaScript/Reference/Functions/arguments/length": { - "modified": "2020-03-12T19:42:34.789Z", + "Web/API/Canvas_API/Tutorial/Basic_animations": { + "modified": "2019-03-23T22:03:56.826Z", "contributors": [ - "llue" + "Legioinvicta" ] }, - "Web/JavaScript/Reference/Functions/get": { - "modified": "2020-03-12T19:43:33.264Z", + "Web/API/Canvas_API/Tutorial/Applying_styles_and_colors": { + "modified": "2019-03-23T22:04:05.578Z", "contributors": [ - "llue" + "Legioinvicta" ] }, - "Web/JavaScript/Reference/Functions/parameters_rest": { - "modified": "2020-10-15T21:58:10.585Z", + "Web/API/Canvas_API/Tutorial/Compositing": { + "modified": "2019-03-23T22:04:02.955Z", "contributors": [ - "jordilondoner" + "Legioinvicta" ] }, - "Web/JavaScript/Reference/Global_Objects/DataView": { - "modified": "2019-03-23T22:46:12.658Z", + "Web/API/Canvas_API/Tutorial/Drawing_text": { + "modified": "2019-03-23T22:04:09.548Z", "contributors": [ - "Sebastianz" + "Legioinvicta" ] }, - "Web/JavaScript/Reference/Global_Objects/DataView/buffer": { - "modified": "2019-03-23T22:44:07.496Z", + "Web/API/Canvas_API/Tutorial/Pixel_manipulation_with_canvas": { + "modified": "2020-10-22T19:57:12.300Z", "contributors": [ - "llue" + "escattone", + "Legioinvicta" ] }, - "Web/JavaScript/Reference/Global_Objects/DataView/getFloat32": { - "modified": "2019-03-23T22:44:02.895Z", + "Web/API/Canvas_API/Tutorial/Transformations": { + "modified": "2019-03-23T22:03:59.945Z", "contributors": [ - "enTropy", - "llue" + "Legioinvicta" ] }, - "Web/JavaScript/Reference/Global_Objects/DataView/prototype": { - "modified": "2019-03-23T22:46:15.196Z", + "Web/API/Canvas_API/Tutorial/Basic_usage": { + "modified": "2019-03-23T22:04:22.078Z", "contributors": [ - "llue" + "Legioinvicta" ] }, - "Web/JavaScript/Reference/Global_Objects/EvalError": { - "modified": "2019-03-23T22:47:17.840Z", + "Web/CSS/CSS_Box_Model/Mastering_margin_collapsing": { + "modified": "2019-03-18T21:17:29.185Z", "contributors": [ - "fscholz" + "Legioinvicta" ] }, - "Web/JavaScript/Reference/Global_Objects/EvalError/prototype": { - "modified": "2019-03-23T22:47:27.467Z", + "Web/CSS/CSS_Box_Model/Introduction_to_the_CSS_box_model": { + "modified": "2019-03-18T21:15:28.600Z", "contributors": [ - "llue" + "Legioinvicta" ] }, - "Web/JavaScript/Reference/Global_Objects/Function": { - "modified": "2019-03-23T22:47:58.251Z", + "Web/CSS/Reference": { + "modified": "2019-03-23T22:21:55.917Z", "contributors": [ - "fscholz" + "Legioinvicta" ] }, - "Web/JavaScript/Reference/Global_Objects/Function/arguments": { - "modified": "2019-03-23T22:48:02.332Z", + "Web/CSS/CSS_Selectors": { + "modified": "2019-07-10T09:40:26.803Z", "contributors": [ - "llue" + "gavinsykes", + "Legioinvicta" ] }, - "Web/JavaScript/Reference/Global_Objects/Function/caller": { - "modified": "2019-03-18T21:15:51.563Z", + "Web/CSS/CSS_Selectors/Using_the_:target_pseudo-class_in_selectors": { + "modified": "2019-03-23T22:21:45.619Z", "contributors": [ - "teoli", - "llue" + "Legioinvicta" ] }, - "Web/JavaScript/Reference/Global_Objects/Function/length": { - "modified": "2019-03-23T22:48:00.101Z", + "Web/CSS/Attribute_selectors": { + "modified": "2019-03-23T22:21:47.586Z", "contributors": [ - "llue" + "Legioinvicta" ] }, - "Web/JavaScript/Reference/Global_Objects/Function/name": { - "modified": "2019-03-23T22:47:57.251Z", + "Web/CSS/Class_selectors": { + "modified": "2019-03-23T22:21:40.826Z", "contributors": [ - "SphinxKnight", - "kdex", - "llue" + "Legioinvicta" ] }, - "Web/JavaScript/Reference/Global_Objects/Function/toSource": { - "modified": "2019-03-23T22:46:13.863Z", + "Web/CSS/Descendant_combinator": { + "modified": "2019-03-23T22:21:41.801Z", "contributors": [ - "teoli", - "llue" + "Legioinvicta" ] }, - "Web/JavaScript/Reference/Global_Objects/Object": { - "modified": "2019-03-23T22:49:56.793Z", + "Web/CSS/Child_combinator": { + "modified": "2019-03-23T22:21:37.309Z", "contributors": [ - "enTropy", - "fscholz" + "Legioinvicta" ] }, - "Web/JavaScript/Reference/Global_Objects/Object/assign": { - "modified": "2019-05-19T17:20:08.284Z", + "Web/CSS/Adjacent_sibling_combinator": { + "modified": "2019-03-23T22:21:40.662Z", "contributors": [ - "SphinxKnight", - "kdex", - "mariodev12", - "llue" + "Legioinvicta" ] }, - "Web/JavaScript/Reference/Global_Objects/Object/freeze": { - "modified": "2019-03-23T22:46:16.251Z", + "Web/CSS/Type_selectors": { + "modified": "2019-03-23T22:21:49.346Z", "contributors": [ - "enTropy" + "Legioinvicta" ] }, - "Web/JavaScript/Reference/Global_Objects/Object/getPrototypeOf": { - "modified": "2019-03-23T22:46:10.277Z", + "Web/CSS/General_sibling_combinator": { + "modified": "2019-03-23T22:21:39.817Z", "contributors": [ - "enTropy" + "Legioinvicta" ] }, - "Web/JavaScript/Reference/Global_Objects/Object/isExtensible": { - "modified": "2019-03-23T22:46:14.358Z", + "Web/CSS/ID_selectors": { + "modified": "2019-03-18T21:15:31.059Z", "contributors": [ - "enTropy" + "Legioinvicta" ] }, - "Web/JavaScript/Reference/Global_Objects/Object/isFrozen": { - "modified": "2019-03-23T22:46:09.931Z", + "Web/CSS/Universal_selectors": { + "modified": "2019-03-23T22:21:38.063Z", "contributors": [ - "enTropy" + "Legioinvicta" ] }, - "Web/JavaScript/Reference/Global_Objects/Object/keys": { - "modified": "2019-03-23T22:46:06.321Z", + "Web/CSS/Syntax": { + "modified": "2019-03-23T22:05:30.508Z", "contributors": [ - "enTropy" + "Legioinvicta" ] }, - "Web/JavaScript/Reference/Global_Objects/Object/prototype": { - "modified": "2019-03-23T22:48:18.297Z", + "Web/Guide/AJAX/Getting_Started": { + "modified": "2019-01-16T16:22:29.202Z", "contributors": [ - "enTropy" + "chrisdavidmills", + "Toniher" ] }, - "Web/JavaScript/Reference/Global_Objects/WeakMap": { - "modified": "2020-10-06T14:35:54.632Z", + "Web/Progressive_web_apps/Responsive/Media_types": { + "modified": "2019-03-23T22:20:43.883Z", "contributors": [ - "oleksandrstarov", - "SphinxKnight", - "enTropy", - "llue", - "LPGhatguy" + "Legioinvicta" ] }, - "Web/JavaScript/Reference/Global_Objects/WeakMap/clear": { - "modified": "2019-03-23T22:44:13.701Z", + "Web/SVG/Tutorial/SVG_and_CSS": { + "modified": "2019-03-23T22:20:34.731Z", "contributors": [ - "teoli", - "llue" + "Legioinvicta" ] }, - "Web/JavaScript/Reference/Global_Objects/WeakMap/delete": { - "modified": "2019-03-23T22:44:05.122Z", + "Web/Guide/Graphics": { + "modified": "2019-03-23T22:04:22.823Z", "contributors": [ - "SphinxKnight", - "llue" + "Legioinvicta" ] }, - "Web/JavaScript/Reference/Global_Objects/WeakMap/get": { - "modified": "2019-03-23T22:43:55.576Z", + "Learn/HTML/Howto/Author_fast-loading_HTML_pages": { + "modified": "2020-07-16T22:22:32.019Z", "contributors": [ - "SphinxKnight", - "llue" + "Legioinvicta" ] }, - "Web/JavaScript/Reference/Global_Objects/WeakMap/has": { - "modified": "2019-03-18T21:16:35.783Z", + "Web/Guide/HTML/Using_HTML_sections_and_outlines": { + "modified": "2019-03-23T22:19:14.112Z", "contributors": [ - "SphinxKnight", - "llue" + "Legioinvicta" ] }, - "Web/JavaScript/Reference/Global_Objects/WeakMap/prototype": { - "modified": "2019-03-23T22:44:02.612Z", + "orphaned/Web/HTML/Element/command": { + "modified": "2019-03-23T22:24:15.300Z", "contributors": [ - "SphinxKnight", - "llue" + "Legioinvicta" ] }, - "Web/JavaScript/Reference/Global_Objects/WeakMap/set": { - "modified": "2019-03-23T22:43:56.028Z", + "orphaned/Web/HTML/Element/element": { + "modified": "2019-03-23T22:48:09.171Z", "contributors": [ - "SphinxKnight", "llue" ] }, - "Web/JavaScript/Reference/Global_Objects/WeakSet": { - "modified": "2019-03-23T22:44:01.226Z", + "Web/HTML/Inline_elements": { + "modified": "2019-03-23T22:19:22.875Z", "contributors": [ - "SphinxKnight", - "llue", - "fscholz" + "Legioinvicta" ] }, - "Web/JavaScript/Reference/Global_Objects/WeakSet/add": { - "modified": "2019-03-23T22:44:07.820Z", + "orphaned/Web/HTML/Global_attributes/dropzone": { + "modified": "2019-03-23T22:22:19.145Z", "contributors": [ - "SphinxKnight", - "llue" + "Legioinvicta" ] }, - "Web/JavaScript/Reference/Global_Objects/WeakSet/clear": { - "modified": "2019-03-23T22:44:09.553Z", + "Glossary/speculative_parsing": { + "modified": "2019-03-23T22:24:14.691Z", "contributors": [ - "teoli", - "llue" + "Legioinvicta" ] }, - "Web/JavaScript/Reference/Global_Objects/WeakSet/delete": { - "modified": "2019-03-23T22:44:09.377Z", + "Web/JavaScript/Guide/Expressions_and_Operators": { + "modified": "2020-03-12T19:40:39.289Z", "contributors": [ - "SphinxKnight", + "wbamberg", + "fscholz", + "enTropy", "llue" ] }, - "Web/JavaScript/Reference/Global_Objects/WeakSet/has": { - "modified": "2019-03-23T22:44:07.338Z", + "Web/JavaScript/Guide/Introduction": { + "modified": "2020-07-27T11:48:12.566Z", "contributors": [ - "SphinxKnight", - "llue" + "joanpardo", + "mariodev12", + "enTropy" ] }, - "Web/JavaScript/Reference/Global_Objects/WeakSet/prototype": { - "modified": "2019-03-23T22:44:06.443Z", + "Web/JavaScript/About_JavaScript": { + "modified": "2020-07-27T11:53:21.427Z", "contributors": [ - "SphinxKnight", - "llue" + "joanpardo", + "enTropy" ] }, - "Web/JavaScript/Referencia": { - "modified": "2020-03-12T19:38:14.018Z", + "Web/JavaScript/Reference/Errors/Read-only": { + "modified": "2020-03-12T19:48:06.623Z", "contributors": [ - "enTropy", - "teoli", - "JordiGuilleumes" + "vilherda" ] }, - "Web/JavaScript/Referencia/Classes": { - "modified": "2020-10-15T21:34:20.230Z", + "Web/JavaScript/Reference/Functions/rest_parameters": { + "modified": "2020-10-15T21:58:10.585Z", "contributors": [ - "SphinxKnight", - "kdex", - "fscholz" + "jordilondoner" ] }, - "Web/JavaScript/Referencia/Classes/constructor": { + "Web/JavaScript/Reference/Classes/constructor": { "modified": "2020-03-12T19:40:58.003Z", "contributors": [ "SphinxKnight", @@ -3316,7 +3218,15 @@ "llue" ] }, - "Web/JavaScript/Referencia/Classes/static": { + "Web/JavaScript/Reference/Classes": { + "modified": "2020-10-15T21:34:20.230Z", + "contributors": [ + "SphinxKnight", + "kdex", + "fscholz" + ] + }, + "Web/JavaScript/Reference/Classes/static": { "modified": "2020-03-12T19:41:02.767Z", "contributors": [ "SphinxKnight", @@ -3324,47 +3234,34 @@ "llue" ] }, - "Web/JavaScript/Referencia/Objectes_globals": { - "modified": "2020-03-12T19:40:38.690Z", + "Web/JavaScript/Reference": { + "modified": "2020-03-12T19:38:14.018Z", "contributors": [ - "teoli", "enTropy", - "Sheppy" - ] - }, - "Web/JavaScript/Referencia/Objectes_globals/Array": { - "modified": "2019-03-23T22:47:17.387Z", - "contributors": [ - "wbamberg", - "enTropy" - ] - }, - "Web/JavaScript/Referencia/Objectes_globals/Array/Reduce": { - "modified": "2019-03-23T22:44:04.496Z", - "contributors": [ - "enTropy" + "teoli", + "JordiGuilleumes" ] }, - "Web/JavaScript/Referencia/Objectes_globals/Array/entries": { + "Web/JavaScript/Reference/Global_Objects/Array/entries": { "modified": "2019-03-23T22:36:05.123Z", "contributors": [ "enTropy" ] }, - "Web/JavaScript/Referencia/Objectes_globals/Array/every": { + "Web/JavaScript/Reference/Global_Objects/Array/every": { "modified": "2019-03-23T22:37:52.531Z", "contributors": [ "enTropy" ] }, - "Web/JavaScript/Referencia/Objectes_globals/Array/fill": { + "Web/JavaScript/Reference/Global_Objects/Array/fill": { "modified": "2019-03-23T22:44:31.779Z", "contributors": [ "SphinxKnight", "enTropy" ] }, - "Web/JavaScript/Referencia/Objectes_globals/Array/filter": { + "Web/JavaScript/Reference/Global_Objects/Array/filter": { "modified": "2019-03-23T22:41:52.655Z", "contributors": [ "adriaroms", @@ -3372,67 +3269,74 @@ "enTropy" ] }, - "Web/JavaScript/Referencia/Objectes_globals/Array/find": { + "Web/JavaScript/Reference/Global_Objects/Array/find": { "modified": "2019-03-23T22:36:11.720Z", "contributors": [ "enTropy" ] }, - "Web/JavaScript/Referencia/Objectes_globals/Array/findIndex": { + "Web/JavaScript/Reference/Global_Objects/Array/findIndex": { "modified": "2019-03-23T22:36:14.897Z", "contributors": [ "enTropy" ] }, - "Web/JavaScript/Referencia/Objectes_globals/Array/forEach": { + "Web/JavaScript/Reference/Global_Objects/Array/forEach": { "modified": "2019-03-23T22:44:26.853Z", "contributors": [ "enTropy" ] }, - "Web/JavaScript/Referencia/Objectes_globals/Array/includes": { + "Web/JavaScript/Reference/Global_Objects/Array/includes": { "modified": "2019-03-23T22:36:01.831Z", "contributors": [ "enTropy" ] }, - "Web/JavaScript/Referencia/Objectes_globals/Array/indexOf": { + "Web/JavaScript/Reference/Global_Objects/Array": { + "modified": "2019-03-23T22:47:17.387Z", + "contributors": [ + "wbamberg", + "enTropy" + ] + }, + "Web/JavaScript/Reference/Global_Objects/Array/indexOf": { "modified": "2019-03-23T22:35:51.226Z", "contributors": [ "enTropy" ] }, - "Web/JavaScript/Referencia/Objectes_globals/Array/isArray": { + "Web/JavaScript/Reference/Global_Objects/Array/isArray": { "modified": "2019-03-23T22:47:07.014Z", "contributors": [ "llue" ] }, - "Web/JavaScript/Referencia/Objectes_globals/Array/join": { + "Web/JavaScript/Reference/Global_Objects/Array/join": { "modified": "2019-07-09T09:44:57.379Z", "contributors": [ "enTropy" ] }, - "Web/JavaScript/Referencia/Objectes_globals/Array/keys": { + "Web/JavaScript/Reference/Global_Objects/Array/keys": { "modified": "2019-03-23T22:36:08.512Z", "contributors": [ "enTropy" ] }, - "Web/JavaScript/Referencia/Objectes_globals/Array/lastIndexOf": { + "Web/JavaScript/Reference/Global_Objects/Array/lastIndexOf": { "modified": "2019-03-23T22:35:49.922Z", "contributors": [ "enTropy" ] }, - "Web/JavaScript/Referencia/Objectes_globals/Array/length": { + "Web/JavaScript/Reference/Global_Objects/Array/length": { "modified": "2019-03-23T22:44:31.474Z", "contributors": [ "llue" ] }, - "Web/JavaScript/Referencia/Objectes_globals/Array/map": { + "Web/JavaScript/Reference/Global_Objects/Array/map": { "modified": "2019-03-23T22:44:32.320Z", "contributors": [ "dsabalete", @@ -3440,66 +3344,72 @@ "llue" ] }, - "Web/JavaScript/Referencia/Objectes_globals/Array/of": { + "Web/JavaScript/Reference/Global_Objects/Array/of": { "modified": "2019-03-23T22:47:09.344Z", "contributors": [ "SphinxKnight", "llue" ] }, - "Web/JavaScript/Referencia/Objectes_globals/Array/pop": { + "Web/JavaScript/Reference/Global_Objects/Array/pop": { "modified": "2019-03-23T22:44:33.207Z", "contributors": [ "enTropy" ] }, - "Web/JavaScript/Referencia/Objectes_globals/Array/prototype": { + "orphaned/Web/JavaScript/Reference/Global_Objects/Array/prototype": { "modified": "2019-03-23T22:45:55.785Z", "contributors": [ "enTropy" ] }, - "Web/JavaScript/Referencia/Objectes_globals/Array/push": { + "Web/JavaScript/Reference/Global_Objects/Array/push": { "modified": "2019-03-23T22:45:57.375Z", "contributors": [ "ibesora", "enTropy" ] }, - "Web/JavaScript/Referencia/Objectes_globals/Array/reverse": { + "Web/JavaScript/Reference/Global_Objects/Array/Reduce": { + "modified": "2019-03-23T22:44:04.496Z", + "contributors": [ + "enTropy" + ] + }, + "Web/JavaScript/Reference/Global_Objects/Array/reverse": { "modified": "2019-03-23T22:46:09.763Z", "contributors": [ "llue" ] }, - "Web/JavaScript/Referencia/Objectes_globals/Array/shift": { + "Web/JavaScript/Reference/Global_Objects/Array/shift": { "modified": "2019-03-23T22:36:00.243Z", "contributors": [ "enTropy" ] }, - "Web/JavaScript/Referencia/Objectes_globals/Array/slice": { + "Web/JavaScript/Reference/Global_Objects/Array/slice": { "modified": "2019-03-23T22:36:58.980Z", "contributors": [ "ibesora", "enTropy" ] }, - "Web/JavaScript/Referencia/Objectes_globals/Array/some": { + "Web/JavaScript/Reference/Global_Objects/Array/some": { "modified": "2020-09-18T06:02:41.977Z", "contributors": [ "carmenansio", "enTropy" ] }, - "Web/JavaScript/Referencia/Objectes_globals/Array/splice": { + "Web/JavaScript/Reference/Global_Objects/Array/splice": { "modified": "2019-07-28T12:07:49.969Z", "contributors": [ "ricardbarnes", "enTropy" ] }, - "Web/JavaScript/Referencia/Objectes_globals/Boolean": { + "Web/JavaScript/Reference/Global_Objects/Boolean": { "modified": "2019-03-23T22:58:34.517Z", "contributors": [ "wbamberg", @@ -3507,660 +3417,583 @@ "enTropy" ] }, - "Web/JavaScript/Referencia/Objectes_globals/Boolean/prototype": { - "modified": "2019-03-23T22:58:39.243Z", - "contributors": [ - "teoli", - "enTropy" - ] - }, - "Web/JavaScript/Referencia/Objectes_globals/Boolean/toSource": { + "Web/JavaScript/Reference/Global_Objects/Boolean/toSource": { "modified": "2019-03-23T22:58:26.240Z", "contributors": [ "teoli", "enTropy" ] }, - "Web/JavaScript/Referencia/Objectes_globals/Boolean/toString": { + "Web/JavaScript/Reference/Global_Objects/Boolean/toString": { "modified": "2019-03-23T22:58:27.726Z", "contributors": [ "teoli", "enTropy" ] }, - "Web/JavaScript/Referencia/Objectes_globals/Boolean/valueOf": { + "Web/JavaScript/Reference/Global_Objects/Boolean/valueOf": { "modified": "2019-03-23T22:58:36.167Z", "contributors": [ "teoli", "enTropy" ] }, - "Web/JavaScript/Referencia/Objectes_globals/Date": { - "modified": "2019-03-23T22:58:49.026Z", - "contributors": [ - "wbamberg", - "teoli", - "enTropy" - ] - }, - "Web/JavaScript/Referencia/Objectes_globals/Date/UTC": { - "modified": "2019-03-23T22:50:18.733Z", - "contributors": [ - "enTropy" - ] - }, - "Web/JavaScript/Referencia/Objectes_globals/Date/getDate": { + "Web/JavaScript/Reference/Global_Objects/Date/getDate": { "modified": "2019-03-23T22:48:57.472Z", "contributors": [ "enTropy" ] }, - "Web/JavaScript/Referencia/Objectes_globals/Date/getDay": { + "Web/JavaScript/Reference/Global_Objects/Date/getDay": { "modified": "2019-03-23T22:57:51.802Z", "contributors": [ "teoli", "enTropy" ] }, - "Web/JavaScript/Referencia/Objectes_globals/Date/getFullYear": { + "Web/JavaScript/Reference/Global_Objects/Date/getFullYear": { "modified": "2019-03-23T22:57:49.306Z", "contributors": [ "teoli", "enTropy" ] }, - "Web/JavaScript/Referencia/Objectes_globals/Date/getHours": { + "Web/JavaScript/Reference/Global_Objects/Date/getHours": { "modified": "2019-03-23T22:57:45.516Z", "contributors": [ "teoli", "enTropy" ] }, - "Web/JavaScript/Referencia/Objectes_globals/Date/getMilliseconds": { + "Web/JavaScript/Reference/Global_Objects/Date/getMilliseconds": { "modified": "2019-03-23T22:56:22.446Z", "contributors": [ "teoli", "enTropy" ] }, - "Web/JavaScript/Referencia/Objectes_globals/Date/getMinutes": { + "Web/JavaScript/Reference/Global_Objects/Date/getMinutes": { "modified": "2019-03-23T22:56:14.420Z", "contributors": [ "teoli", "enTropy" ] }, - "Web/JavaScript/Referencia/Objectes_globals/Date/getMonth": { + "Web/JavaScript/Reference/Global_Objects/Date/getMonth": { "modified": "2019-03-23T22:56:25.114Z", "contributors": [ "teoli", "enTropy" ] }, - "Web/JavaScript/Referencia/Objectes_globals/Date/getSeconds": { + "Web/JavaScript/Reference/Global_Objects/Date/getSeconds": { "modified": "2019-03-23T22:56:18.781Z", "contributors": [ "teoli", "enTropy" ] }, - "Web/JavaScript/Referencia/Objectes_globals/Date/getTime": { + "Web/JavaScript/Reference/Global_Objects/Date/getTime": { "modified": "2019-03-23T22:52:30.279Z", "contributors": [ "enTropy" ] }, - "Web/JavaScript/Referencia/Objectes_globals/Date/getTimezoneOffset": { + "Web/JavaScript/Reference/Global_Objects/Date/getTimezoneOffset": { "modified": "2019-03-23T22:52:28.361Z", "contributors": [ "enTropy" ] }, - "Web/JavaScript/Referencia/Objectes_globals/Date/getUTCDate": { + "Web/JavaScript/Reference/Global_Objects/Date/getUTCDate": { "modified": "2019-03-23T22:52:26.697Z", "contributors": [ "enTropy" ] }, - "Web/JavaScript/Referencia/Objectes_globals/Date/getUTCDay": { + "Web/JavaScript/Reference/Global_Objects/Date/getUTCDay": { "modified": "2019-03-23T22:52:25.959Z", "contributors": [ "enTropy" ] }, - "Web/JavaScript/Referencia/Objectes_globals/Date/getUTCFullYear": { + "Web/JavaScript/Reference/Global_Objects/Date/getUTCFullYear": { "modified": "2019-03-23T22:52:25.556Z", "contributors": [ "enTropy" ] }, - "Web/JavaScript/Referencia/Objectes_globals/Date/getUTCHours": { + "Web/JavaScript/Reference/Global_Objects/Date/getUTCHours": { "modified": "2019-03-23T22:52:30.723Z", "contributors": [ "enTropy" ] }, - "Web/JavaScript/Referencia/Objectes_globals/Date/getUTCMilliseconds": { + "Web/JavaScript/Reference/Global_Objects/Date/getUTCMilliseconds": { "modified": "2019-03-23T22:50:00.925Z", "contributors": [ "enTropy" ] }, - "Web/JavaScript/Referencia/Objectes_globals/Date/getUTCMinutes": { + "Web/JavaScript/Reference/Global_Objects/Date/getUTCMinutes": { "modified": "2019-03-23T22:50:03.275Z", "contributors": [ "enTropy" ] }, - "Web/JavaScript/Referencia/Objectes_globals/Date/getUTCMonth": { + "Web/JavaScript/Reference/Global_Objects/Date/getUTCMonth": { "modified": "2019-03-23T22:50:00.074Z", "contributors": [ "enTropy" ] }, - "Web/JavaScript/Referencia/Objectes_globals/Date/getUTCSeconds": { + "Web/JavaScript/Reference/Global_Objects/Date/getUTCSeconds": { "modified": "2019-03-23T22:54:05.883Z", "contributors": [ "enTropy" ] }, - "Web/JavaScript/Referencia/Objectes_globals/Date/getYear": { + "Web/JavaScript/Reference/Global_Objects/Date/getYear": { "modified": "2019-03-23T22:55:06.079Z", "contributors": [ "enTropy" ] }, - "Web/JavaScript/Referencia/Objectes_globals/Date/now": { - "modified": "2019-03-23T22:58:46.822Z", + "Web/JavaScript/Reference/Global_Objects/Date": { + "modified": "2019-03-23T22:58:49.026Z", "contributors": [ + "wbamberg", "teoli", "enTropy" ] }, - "Web/JavaScript/Referencia/Objectes_globals/Date/prototype": { - "modified": "2019-03-23T22:57:58.782Z", + "Web/JavaScript/Reference/Global_Objects/Date/now": { + "modified": "2019-03-23T22:58:46.822Z", "contributors": [ "teoli", "enTropy" ] }, - "Web/JavaScript/Referencia/Objectes_globals/Date/setDate": { + "Web/JavaScript/Reference/Global_Objects/Date/setDate": { "modified": "2019-03-23T22:48:51.145Z", "contributors": [ "enTropy" ] }, - "Web/JavaScript/Referencia/Objectes_globals/Date/setFullYear": { + "Web/JavaScript/Reference/Global_Objects/Date/setFullYear": { "modified": "2019-03-23T22:49:59.211Z", "contributors": [ "enTropy" ] }, - "Web/JavaScript/Referencia/Objectes_globals/Date/setHours": { + "Web/JavaScript/Reference/Global_Objects/Date/setHours": { "modified": "2019-03-23T22:50:02.700Z", "contributors": [ "enTropy" ] }, - "Web/JavaScript/Referencia/Objectes_globals/Date/setMilliseconds": { + "Web/JavaScript/Reference/Global_Objects/Date/setMilliseconds": { "modified": "2019-03-23T22:49:57.669Z", "contributors": [ "enTropy" ] }, - "Web/JavaScript/Referencia/Objectes_globals/Date/setMinutes": { + "Web/JavaScript/Reference/Global_Objects/Date/setMinutes": { "modified": "2019-03-23T22:49:59.031Z", "contributors": [ "enTropy" ] }, - "Web/JavaScript/Referencia/Objectes_globals/Date/setMonth": { + "Web/JavaScript/Reference/Global_Objects/Date/setMonth": { "modified": "2019-03-23T22:50:03.659Z", "contributors": [ "enTropy" ] }, - "Web/JavaScript/Referencia/Objectes_globals/Date/setSeconds": { + "Web/JavaScript/Reference/Global_Objects/Date/setSeconds": { "modified": "2019-03-23T22:50:03.128Z", "contributors": [ "enTropy" ] }, - "Web/JavaScript/Referencia/Objectes_globals/Date/setTime": { + "Web/JavaScript/Reference/Global_Objects/Date/setTime": { "modified": "2019-03-23T22:49:27.118Z", "contributors": [ "enTropy" ] }, - "Web/JavaScript/Referencia/Objectes_globals/Date/setUTCDate": { + "Web/JavaScript/Reference/Global_Objects/Date/setUTCDate": { "modified": "2019-03-23T22:49:50.108Z", "contributors": [ "enTropy" ] }, - "Web/JavaScript/Referencia/Objectes_globals/Date/setUTCFullYear": { + "Web/JavaScript/Reference/Global_Objects/Date/setUTCFullYear": { "modified": "2019-03-23T22:49:52.095Z", "contributors": [ "enTropy" ] }, - "Web/JavaScript/Referencia/Objectes_globals/Date/setUTCHours": { + "Web/JavaScript/Reference/Global_Objects/Date/setUTCHours": { "modified": "2019-03-23T22:49:48.535Z", "contributors": [ "enTropy" ] }, - "Web/JavaScript/Referencia/Objectes_globals/Date/setUTCMilliseconds": { + "Web/JavaScript/Reference/Global_Objects/Date/setUTCMilliseconds": { "modified": "2019-03-23T22:49:50.754Z", "contributors": [ "enTropy" ] }, - "Web/JavaScript/Referencia/Objectes_globals/Date/setUTCMinutes": { + "Web/JavaScript/Reference/Global_Objects/Date/setUTCMinutes": { "modified": "2019-03-23T22:49:49.021Z", "contributors": [ "enTropy" ] }, - "Web/JavaScript/Referencia/Objectes_globals/Date/setUTCMonth": { + "Web/JavaScript/Reference/Global_Objects/Date/setUTCMonth": { "modified": "2019-03-23T22:49:46.275Z", "contributors": [ "enTropy" ] }, - "Web/JavaScript/Referencia/Objectes_globals/Date/setUTCSeconds": { + "Web/JavaScript/Reference/Global_Objects/Date/setUTCSeconds": { "modified": "2019-03-23T22:49:41.087Z", "contributors": [ "enTropy" ] }, - "Web/JavaScript/Referencia/Objectes_globals/Date/setYear": { + "Web/JavaScript/Reference/Global_Objects/Date/setYear": { "modified": "2019-03-23T22:49:56.942Z", "contributors": [ "enTropy" ] }, - "Web/JavaScript/Referencia/Objectes_globals/Date/toDateString": { + "Web/JavaScript/Reference/Global_Objects/Date/toDateString": { "modified": "2019-03-23T22:48:45.186Z", "contributors": [ "enTropy" ] }, - "Web/JavaScript/Referencia/Objectes_globals/Date/toGMTString": { + "Web/JavaScript/Reference/Global_Objects/Date/toGMTString": { "modified": "2019-03-23T22:48:40.259Z", "contributors": [ "enTropy" ] }, - "Web/JavaScript/Referencia/Objectes_globals/Date/toISOString": { + "Web/JavaScript/Reference/Global_Objects/Date/toISOString": { "modified": "2019-03-23T22:43:47.322Z", "contributors": [ "llue" ] }, - "Web/JavaScript/Referencia/Objectes_globals/Date/toJSON": { + "Web/JavaScript/Reference/Global_Objects/Date/toJSON": { "modified": "2019-03-23T22:43:46.391Z", "contributors": [ "llue" ] }, - "Web/JavaScript/Referencia/Objectes_globals/Date/toString": { + "Web/JavaScript/Reference/Global_Objects/Date/toString": { "modified": "2019-03-23T22:48:56.142Z", "contributors": [ "enTropy" ] }, - "Web/JavaScript/Referencia/Objectes_globals/Date/toTimeString": { + "Web/JavaScript/Reference/Global_Objects/Date/toTimeString": { "modified": "2019-03-23T22:48:45.015Z", "contributors": [ "enTropy" ] }, - "Web/JavaScript/Referencia/Objectes_globals/Date/valueOf": { - "modified": "2019-03-23T22:50:27.263Z", + "Web/JavaScript/Reference/Global_Objects/Date/UTC": { + "modified": "2019-03-23T22:50:18.733Z", "contributors": [ "enTropy" ] }, - "Web/JavaScript/Referencia/Objectes_globals/Error": { - "modified": "2019-03-23T22:59:09.305Z", + "Web/JavaScript/Reference/Global_Objects/Date/valueOf": { + "modified": "2019-03-23T22:50:27.263Z", "contributors": [ - "agustisanchez", - "llue", - "teoli", "enTropy" ] }, - "Web/JavaScript/Referencia/Objectes_globals/Error/Stack": { - "modified": "2019-03-23T22:53:56.473Z", + "Web/JavaScript/Reference/Global_Objects/Error/columnNumber": { + "modified": "2019-03-23T22:59:13.362Z", "contributors": [ + "teoli", "enTropy" ] }, - "Web/JavaScript/Referencia/Objectes_globals/Error/columnNumber": { - "modified": "2019-03-23T22:59:13.362Z", + "Web/JavaScript/Reference/Global_Objects/Error/fileName": { + "modified": "2019-03-23T22:59:08.164Z", "contributors": [ "teoli", "enTropy" ] }, - "Web/JavaScript/Referencia/Objectes_globals/Error/fileName": { - "modified": "2019-03-23T22:59:08.164Z", + "Web/JavaScript/Reference/Global_Objects/Error": { + "modified": "2019-03-23T22:59:09.305Z", "contributors": [ + "agustisanchez", + "llue", "teoli", "enTropy" ] }, - "Web/JavaScript/Referencia/Objectes_globals/Error/lineNumber": { + "Web/JavaScript/Reference/Global_Objects/Error/lineNumber": { "modified": "2019-03-23T22:58:50.297Z", "contributors": [ "teoli", "enTropy" ] }, - "Web/JavaScript/Referencia/Objectes_globals/Error/message": { + "Web/JavaScript/Reference/Global_Objects/Error/message": { "modified": "2019-03-23T22:58:44.991Z", "contributors": [ "teoli", "enTropy" ] }, - "Web/JavaScript/Referencia/Objectes_globals/Error/name": { + "Web/JavaScript/Reference/Global_Objects/Error/name": { "modified": "2019-03-23T22:58:36.308Z", "contributors": [ "teoli", "enTropy" ] }, - "Web/JavaScript/Referencia/Objectes_globals/Error/prototype": { - "modified": "2019-03-23T22:58:43.169Z", + "Web/JavaScript/Reference/Global_Objects/Error/Stack": { + "modified": "2019-03-23T22:53:56.473Z", "contributors": [ - "teoli", "enTropy" ] }, - "Web/JavaScript/Referencia/Objectes_globals/Error/toSource": { + "Web/JavaScript/Reference/Global_Objects/Error/toSource": { "modified": "2019-03-23T22:50:37.577Z", "contributors": [ "teoli", "enTropy" ] }, - "Web/JavaScript/Referencia/Objectes_globals/Error/toString": { + "Web/JavaScript/Reference/Global_Objects/Error/toString": { "modified": "2019-03-23T22:58:29.847Z", "contributors": [ "teoli", "enTropy" ] }, - "Web/JavaScript/Referencia/Objectes_globals/Infinity": { - "modified": "2020-03-12T19:40:33.531Z", + "Web/JavaScript/Reference/Global_Objects": { + "modified": "2020-03-12T19:40:38.690Z", "contributors": [ "teoli", - "Sheppy", - "enTropy" + "enTropy", + "Sheppy" ] }, - "Web/JavaScript/Referencia/Objectes_globals/JSON": { - "modified": "2019-03-23T22:59:27.157Z", + "Web/JavaScript/Reference/Global_Objects/Infinity": { + "modified": "2020-03-12T19:40:33.531Z", "contributors": [ "teoli", + "Sheppy", "enTropy" ] }, - "Web/JavaScript/Referencia/Objectes_globals/Map": { - "modified": "2019-03-23T22:58:51.190Z", + "Web/JavaScript/Reference/Global_Objects/JSON": { + "modified": "2019-03-23T22:59:27.157Z", "contributors": [ - "SphinxKnight", - "enTropy", "teoli", - "llue" + "enTropy" ] }, - "Web/JavaScript/Referencia/Objectes_globals/Map/clear": { + "Web/JavaScript/Reference/Global_Objects/Map/clear": { "modified": "2019-03-23T22:48:01.579Z", "contributors": [ "SphinxKnight", "enTropy" ] }, - "Web/JavaScript/Referencia/Objectes_globals/Map/delete": { + "Web/JavaScript/Reference/Global_Objects/Map/delete": { "modified": "2019-03-23T22:46:15.513Z", "contributors": [ "SphinxKnight", "llue" ] }, - "Web/JavaScript/Referencia/Objectes_globals/Map/entries": { + "Web/JavaScript/Reference/Global_Objects/Map/entries": { "modified": "2019-03-23T22:46:12.124Z", "contributors": [ "SphinxKnight", "llue" ] }, - "Web/JavaScript/Referencia/Objectes_globals/Map/forEach": { + "Web/JavaScript/Reference/Global_Objects/Map/forEach": { "modified": "2019-03-23T22:36:05.941Z", "contributors": [ "enTropy" ] }, - "Web/JavaScript/Referencia/Objectes_globals/Map/get": { + "Web/JavaScript/Reference/Global_Objects/Map/get": { "modified": "2019-03-23T22:36:04.988Z", "contributors": [ "enTropy" ] }, - "Web/JavaScript/Referencia/Objectes_globals/Map/has": { + "Web/JavaScript/Reference/Global_Objects/Map/has": { "modified": "2019-03-23T22:47:08.906Z", "contributors": [ "SphinxKnight", "enTropy" ] }, - "Web/JavaScript/Referencia/Objectes_globals/Map/keys": { - "modified": "2019-03-23T22:46:07.341Z", + "Web/JavaScript/Reference/Global_Objects/Map": { + "modified": "2019-03-23T22:58:51.190Z", "contributors": [ "SphinxKnight", + "enTropy", + "teoli", "llue" ] }, - "Web/JavaScript/Referencia/Objectes_globals/Map/prototype": { - "modified": "2019-03-23T22:48:45.592Z", + "Web/JavaScript/Reference/Global_Objects/Map/keys": { + "modified": "2019-03-23T22:46:07.341Z", "contributors": [ "SphinxKnight", - "enTropy" + "llue" ] }, - "Web/JavaScript/Referencia/Objectes_globals/Map/set": { + "Web/JavaScript/Reference/Global_Objects/Map/set": { "modified": "2019-03-23T22:47:59.009Z", "contributors": [ "SphinxKnight", "enTropy" ] }, - "Web/JavaScript/Referencia/Objectes_globals/Map/size": { + "Web/JavaScript/Reference/Global_Objects/Map/size": { "modified": "2019-03-23T22:44:25.711Z", "contributors": [ "SphinxKnight", "llue" ] }, - "Web/JavaScript/Referencia/Objectes_globals/Map/values": { + "Web/JavaScript/Reference/Global_Objects/Map/values": { "modified": "2019-03-23T22:46:05.395Z", "contributors": [ "SphinxKnight", "llue" ] }, - "Web/JavaScript/Referencia/Objectes_globals/Math": { - "modified": "2019-03-23T23:02:38.773Z", - "contributors": [ - "teoli", - "Sheppy", - "enTropy" - ] - }, - "Web/JavaScript/Referencia/Objectes_globals/Math/E": { - "modified": "2019-03-23T22:59:53.807Z", - "contributors": [ - "txatoman", - "teoli", - "enTropy" - ] - }, - "Web/JavaScript/Referencia/Objectes_globals/Math/LN10": { - "modified": "2019-03-23T22:59:31.907Z", - "contributors": [ - "teoli", - "enTropy" - ] - }, - "Web/JavaScript/Referencia/Objectes_globals/Math/LN2": { - "modified": "2019-03-23T22:59:34.119Z", - "contributors": [ - "teoli", - "enTropy" - ] - }, - "Web/JavaScript/Referencia/Objectes_globals/Math/LOG10E": { - "modified": "2019-03-23T22:59:30.685Z", - "contributors": [ - "teoli", - "enTropy" - ] - }, - "Web/JavaScript/Referencia/Objectes_globals/Math/LOG2E": { - "modified": "2019-03-23T22:59:30.287Z", - "contributors": [ - "teoli", - "enTropy" - ] - }, - "Web/JavaScript/Referencia/Objectes_globals/Math/PI": { - "modified": "2019-03-23T22:59:30.058Z", - "contributors": [ - "teoli", - "enTropy" - ] - }, - "Web/JavaScript/Referencia/Objectes_globals/Math/SQRT1_2": { - "modified": "2019-03-23T22:58:52.217Z", - "contributors": [ - "teoli", - "enTropy" - ] - }, - "Web/JavaScript/Referencia/Objectes_globals/Math/SQRT2": { - "modified": "2019-03-23T22:58:47.387Z", - "contributors": [ - "teoli", - "enTropy" - ] - }, - "Web/JavaScript/Referencia/Objectes_globals/Math/abs": { + "Web/JavaScript/Reference/Global_Objects/Math/abs": { "modified": "2019-03-23T22:58:46.278Z", "contributors": [ "teoli", "enTropy" ] }, - "Web/JavaScript/Referencia/Objectes_globals/Math/acos": { + "Web/JavaScript/Reference/Global_Objects/Math/acos": { "modified": "2019-03-23T22:58:47.009Z", "contributors": [ "teoli", "enTropy" ] }, - "Web/JavaScript/Referencia/Objectes_globals/Math/acosh": { + "Web/JavaScript/Reference/Global_Objects/Math/acosh": { "modified": "2019-03-23T22:48:46.522Z", "contributors": [ "SphinxKnight", "enTropy" ] }, - "Web/JavaScript/Referencia/Objectes_globals/Math/asin": { + "Web/JavaScript/Reference/Global_Objects/Math/asin": { "modified": "2019-03-23T22:58:44.169Z", "contributors": [ "teoli", "enTropy" ] }, - "Web/JavaScript/Referencia/Objectes_globals/Math/asinh": { + "Web/JavaScript/Reference/Global_Objects/Math/asinh": { "modified": "2019-03-23T22:48:48.134Z", "contributors": [ "SphinxKnight", "enTropy" ] }, - "Web/JavaScript/Referencia/Objectes_globals/Math/atan": { + "Web/JavaScript/Reference/Global_Objects/Math/atan": { "modified": "2019-03-23T22:58:42.177Z", "contributors": [ "teoli", "enTropy" ] }, - "Web/JavaScript/Referencia/Objectes_globals/Math/atan2": { + "Web/JavaScript/Reference/Global_Objects/Math/atan2": { "modified": "2019-03-23T22:48:53.219Z", "contributors": [ "enTropy" ] }, - "Web/JavaScript/Referencia/Objectes_globals/Math/atanh": { + "Web/JavaScript/Reference/Global_Objects/Math/atanh": { "modified": "2019-03-23T22:48:44.070Z", "contributors": [ "SphinxKnight", "enTropy" ] }, - "Web/JavaScript/Referencia/Objectes_globals/Math/cbrt": { + "Web/JavaScript/Reference/Global_Objects/Math/cbrt": { "modified": "2019-03-23T22:48:55.792Z", "contributors": [ "SphinxKnight", "enTropy" ] }, - "Web/JavaScript/Referencia/Objectes_globals/Math/ceil": { + "Web/JavaScript/Reference/Global_Objects/Math/ceil": { "modified": "2019-03-23T22:58:48.560Z", "contributors": [ "teoli", "enTropy" ] }, - "Web/JavaScript/Referencia/Objectes_globals/Math/clz32": { + "Web/JavaScript/Reference/Global_Objects/Math/clz32": { "modified": "2019-03-23T22:48:56.655Z", "contributors": [ "SphinxKnight", "enTropy" ] }, - "Web/JavaScript/Referencia/Objectes_globals/Math/cos": { + "Web/JavaScript/Reference/Global_Objects/Math/cos": { "modified": "2019-03-23T22:58:45.410Z", "contributors": [ "teoli", "enTropy" ] }, - "Web/JavaScript/Referencia/Objectes_globals/Math/cosh": { + "Web/JavaScript/Reference/Global_Objects/Math/cosh": { "modified": "2019-03-23T22:48:43.862Z", "contributors": [ "SphinxKnight", "enTropy" ] }, - "Web/JavaScript/Referencia/Objectes_globals/Math/exp": { + "Web/JavaScript/Reference/Global_Objects/Math/E": { + "modified": "2019-03-23T22:59:53.807Z", + "contributors": [ + "txatoman", + "teoli", + "enTropy" + ] + }, + "Web/JavaScript/Reference/Global_Objects/Math/exp": { "modified": "2019-03-23T22:50:22.320Z", "contributors": [ "enTropy" ] }, - "Web/JavaScript/Referencia/Objectes_globals/Math/expm1": { + "Web/JavaScript/Reference/Global_Objects/Math/expm1": { "modified": "2019-03-23T22:50:01.816Z", "contributors": [ "SphinxKnight", "enTropy" ] }, - "Web/JavaScript/Referencia/Objectes_globals/Math/floor": { + "Web/JavaScript/Reference/Global_Objects/Math/floor": { "modified": "2019-03-23T22:58:49.209Z", "contributors": [ "emoriarty", @@ -4168,133 +4001,190 @@ "enTropy" ] }, - "Web/JavaScript/Referencia/Objectes_globals/Math/fround": { + "Web/JavaScript/Reference/Global_Objects/Math/fround": { "modified": "2019-03-23T22:50:16.642Z", "contributors": [ "SphinxKnight", "enTropy" ] }, - "Web/JavaScript/Referencia/Objectes_globals/Math/hypot": { + "Web/JavaScript/Reference/Global_Objects/Math/hypot": { "modified": "2019-03-23T22:48:56.476Z", "contributors": [ "SphinxKnight", "enTropy" ] }, - "Web/JavaScript/Referencia/Objectes_globals/Math/imul": { + "Web/JavaScript/Reference/Global_Objects/Math/imul": { "modified": "2019-03-23T22:50:18.208Z", "contributors": [ "SphinxKnight", "enTropy" ] }, - "Web/JavaScript/Referencia/Objectes_globals/Math/log": { + "Web/JavaScript/Reference/Global_Objects/Math": { + "modified": "2019-03-23T23:02:38.773Z", + "contributors": [ + "teoli", + "Sheppy", + "enTropy" + ] + }, + "Web/JavaScript/Reference/Global_Objects/Math/LN10": { + "modified": "2019-03-23T22:59:31.907Z", + "contributors": [ + "teoli", + "enTropy" + ] + }, + "Web/JavaScript/Reference/Global_Objects/Math/LN2": { + "modified": "2019-03-23T22:59:34.119Z", + "contributors": [ + "teoli", + "enTropy" + ] + }, + "Web/JavaScript/Reference/Global_Objects/Math/log": { "modified": "2019-03-23T22:50:10.638Z", "contributors": [ "enTropy" ] }, - "Web/JavaScript/Referencia/Objectes_globals/Math/log10": { + "Web/JavaScript/Reference/Global_Objects/Math/log10": { "modified": "2019-03-23T22:50:12.937Z", "contributors": [ "SphinxKnight", "enTropy" ] }, - "Web/JavaScript/Referencia/Objectes_globals/Math/log1p": { + "Web/JavaScript/Reference/Global_Objects/Math/LOG10E": { + "modified": "2019-03-23T22:59:30.685Z", + "contributors": [ + "teoli", + "enTropy" + ] + }, + "Web/JavaScript/Reference/Global_Objects/Math/log1p": { "modified": "2019-03-23T22:50:10.434Z", "contributors": [ "SphinxKnight", "enTropy" ] }, - "Web/JavaScript/Referencia/Objectes_globals/Math/log2": { + "Web/JavaScript/Reference/Global_Objects/Math/log2": { "modified": "2019-03-23T22:50:11.657Z", "contributors": [ "SphinxKnight", "enTropy" ] }, - "Web/JavaScript/Referencia/Objectes_globals/Math/max": { + "Web/JavaScript/Reference/Global_Objects/Math/LOG2E": { + "modified": "2019-03-23T22:59:30.287Z", + "contributors": [ + "teoli", + "enTropy" + ] + }, + "Web/JavaScript/Reference/Global_Objects/Math/max": { "modified": "2019-03-23T22:50:08.623Z", "contributors": [ "enTropy" ] }, - "Web/JavaScript/Referencia/Objectes_globals/Math/min": { + "Web/JavaScript/Reference/Global_Objects/Math/min": { "modified": "2019-03-23T22:50:12.646Z", "contributors": [ "enTropy" ] }, - "Web/JavaScript/Referencia/Objectes_globals/Math/pow": { + "Web/JavaScript/Reference/Global_Objects/Math/PI": { + "modified": "2019-03-23T22:59:30.058Z", + "contributors": [ + "teoli", + "enTropy" + ] + }, + "Web/JavaScript/Reference/Global_Objects/Math/pow": { "modified": "2019-03-23T22:50:15.471Z", "contributors": [ "enTropy" ] }, - "Web/JavaScript/Referencia/Objectes_globals/Math/random": { + "Web/JavaScript/Reference/Global_Objects/Math/random": { "modified": "2019-03-23T22:50:08.471Z", "contributors": [ "enTropy" ] }, - "Web/JavaScript/Referencia/Objectes_globals/Math/round": { + "Web/JavaScript/Reference/Global_Objects/Math/round": { "modified": "2019-03-23T22:50:17.743Z", "contributors": [ "enTropy" ] }, - "Web/JavaScript/Referencia/Objectes_globals/Math/sign": { + "Web/JavaScript/Reference/Global_Objects/Math/sign": { "modified": "2019-03-23T22:50:19.897Z", "contributors": [ "SphinxKnight", "enTropy" ] }, - "Web/JavaScript/Referencia/Objectes_globals/Math/sin": { + "Web/JavaScript/Reference/Global_Objects/Math/sin": { "modified": "2019-03-23T22:58:51.491Z", "contributors": [ "teoli", "enTropy" ] }, - "Web/JavaScript/Referencia/Objectes_globals/Math/sinh": { + "Web/JavaScript/Reference/Global_Objects/Math/sinh": { "modified": "2019-03-23T22:48:42.925Z", "contributors": [ "SphinxKnight", "enTropy" ] }, - "Web/JavaScript/Referencia/Objectes_globals/Math/sqrt": { + "Web/JavaScript/Reference/Global_Objects/Math/sqrt": { "modified": "2019-03-23T22:50:15.980Z", "contributors": [ "enTropy" ] }, - "Web/JavaScript/Referencia/Objectes_globals/Math/tan": { + "Web/JavaScript/Reference/Global_Objects/Math/SQRT1_2": { + "modified": "2019-03-23T22:58:52.217Z", + "contributors": [ + "teoli", + "enTropy" + ] + }, + "Web/JavaScript/Reference/Global_Objects/Math/SQRT2": { + "modified": "2019-03-23T22:58:47.387Z", + "contributors": [ + "teoli", + "enTropy" + ] + }, + "Web/JavaScript/Reference/Global_Objects/Math/tan": { "modified": "2019-03-23T22:58:48.781Z", "contributors": [ "teoli", "enTropy" ] }, - "Web/JavaScript/Referencia/Objectes_globals/Math/tanh": { + "Web/JavaScript/Reference/Global_Objects/Math/tanh": { "modified": "2019-03-23T22:48:43.115Z", "contributors": [ "SphinxKnight", "enTropy" ] }, - "Web/JavaScript/Referencia/Objectes_globals/Math/trunc": { + "Web/JavaScript/Reference/Global_Objects/Math/trunc": { "modified": "2019-03-23T22:50:09.096Z", "contributors": [ "SphinxKnight", "enTropy" ] }, - "Web/JavaScript/Referencia/Objectes_globals/NaN": { + "Web/JavaScript/Reference/Global_Objects/NaN": { "modified": "2020-03-12T19:40:28.856Z", "contributors": [ "teoli", @@ -4302,16 +4192,15 @@ "enTropy" ] }, - "Web/JavaScript/Referencia/Objectes_globals/Number": { - "modified": "2019-03-23T23:02:38.020Z", + "Web/JavaScript/Reference/Global_Objects/null": { + "modified": "2020-03-12T19:40:31.685Z", "contributors": [ - "wbamberg", "teoli", "Sheppy", "enTropy" ] }, - "Web/JavaScript/Referencia/Objectes_globals/Number/EPSILON": { + "Web/JavaScript/Reference/Global_Objects/Number/EPSILON": { "modified": "2019-03-23T23:02:23.744Z", "contributors": [ "SphinxKnight", @@ -4319,402 +4208,384 @@ "enTropy" ] }, - "Web/JavaScript/Referencia/Objectes_globals/Number/MAX_SAFE_INTEGER": { - "modified": "2019-03-23T22:59:46.174Z", + "Web/JavaScript/Reference/Global_Objects/Number": { + "modified": "2019-03-23T23:02:38.020Z", "contributors": [ - "SphinxKnight", + "wbamberg", "teoli", + "Sheppy", "enTropy" ] }, - "Web/JavaScript/Referencia/Objectes_globals/Number/MAX_VALUE": { - "modified": "2019-03-23T22:59:54.604Z", + "Web/JavaScript/Reference/Global_Objects/Number/isFinite": { + "modified": "2019-03-23T22:50:13.566Z", "contributors": [ - "teoli", - "enTropy", - "llue" + "SphinxKnight", + "enTropy" ] }, - "Web/JavaScript/Referencia/Objectes_globals/Number/MIN_SAFE_INTEGER": { - "modified": "2019-03-23T22:59:44.907Z", + "Web/JavaScript/Reference/Global_Objects/Number/isInteger": { + "modified": "2019-03-23T22:50:19.513Z", "contributors": [ "SphinxKnight", - "teoli", "enTropy" ] }, - "Web/JavaScript/Referencia/Objectes_globals/Number/MIN_VALUE": { - "modified": "2019-03-23T22:59:48.435Z", + "Web/JavaScript/Reference/Global_Objects/Number/isNaN": { + "modified": "2019-03-23T22:50:18.389Z", "contributors": [ - "teoli", - "llue" + "SphinxKnight", + "enTropy" ] }, - "Web/JavaScript/Referencia/Objectes_globals/Number/NEGATIVE_INFINITY": { - "modified": "2020-11-14T03:03:56.198Z", + "Web/JavaScript/Reference/Global_Objects/Number/isSafeInteger": { + "modified": "2019-03-23T22:50:16.157Z", "contributors": [ - "jaumeol", - "teoli", - "llue" + "SphinxKnight", + "enTropy" ] }, - "Web/JavaScript/Referencia/Objectes_globals/Number/NaN": { - "modified": "2019-03-23T22:59:42.798Z", + "Web/JavaScript/Reference/Global_Objects/Number/MAX_SAFE_INTEGER": { + "modified": "2019-03-23T22:59:46.174Z", "contributors": [ + "SphinxKnight", "teoli", "enTropy" ] }, - "Web/JavaScript/Referencia/Objectes_globals/Number/POSITIVE_INFINITY": { - "modified": "2019-03-23T22:50:15.189Z", + "Web/JavaScript/Reference/Global_Objects/Number/MAX_VALUE": { + "modified": "2019-03-23T22:59:54.604Z", "contributors": [ - "enTropy" + "teoli", + "enTropy", + "llue" ] }, - "Web/JavaScript/Referencia/Objectes_globals/Number/isFinite": { - "modified": "2019-03-23T22:50:13.566Z", + "Web/JavaScript/Reference/Global_Objects/Number/MIN_SAFE_INTEGER": { + "modified": "2019-03-23T22:59:44.907Z", "contributors": [ "SphinxKnight", + "teoli", "enTropy" ] }, - "Web/JavaScript/Referencia/Objectes_globals/Number/isInteger": { - "modified": "2019-03-23T22:50:19.513Z", + "Web/JavaScript/Reference/Global_Objects/Number/MIN_VALUE": { + "modified": "2019-03-23T22:59:48.435Z", "contributors": [ - "SphinxKnight", - "enTropy" + "teoli", + "llue" ] }, - "Web/JavaScript/Referencia/Objectes_globals/Number/isNaN": { - "modified": "2019-03-23T22:50:18.389Z", + "Web/JavaScript/Reference/Global_Objects/Number/NaN": { + "modified": "2019-03-23T22:59:42.798Z", "contributors": [ - "SphinxKnight", + "teoli", "enTropy" ] }, - "Web/JavaScript/Referencia/Objectes_globals/Number/isSafeInteger": { - "modified": "2019-03-23T22:50:16.157Z", + "Web/JavaScript/Reference/Global_Objects/Number/NEGATIVE_INFINITY": { + "modified": "2020-11-14T03:03:56.198Z", "contributors": [ - "SphinxKnight", - "enTropy" + "jaumeol", + "teoli", + "llue" ] }, - "Web/JavaScript/Referencia/Objectes_globals/Number/parseFloat": { + "Web/JavaScript/Reference/Global_Objects/Number/parseFloat": { "modified": "2019-03-23T22:50:16.465Z", "contributors": [ "SphinxKnight", "enTropy" ] }, - "Web/JavaScript/Referencia/Objectes_globals/Number/parseInt": { + "Web/JavaScript/Reference/Global_Objects/Number/parseInt": { "modified": "2019-03-23T22:50:15.600Z", "contributors": [ "SphinxKnight", "enTropy" ] }, - "Web/JavaScript/Referencia/Objectes_globals/Number/prototype": { - "modified": "2019-03-23T22:50:16.328Z", + "Web/JavaScript/Reference/Global_Objects/Number/POSITIVE_INFINITY": { + "modified": "2019-03-23T22:50:15.189Z", "contributors": [ "enTropy" ] }, - "Web/JavaScript/Referencia/Objectes_globals/Number/toExponential": { + "Web/JavaScript/Reference/Global_Objects/Number/toExponential": { "modified": "2019-03-23T22:47:09.904Z", "contributors": [ "enTropy" ] }, - "Web/JavaScript/Referencia/Objectes_globals/Number/toFixed": { + "Web/JavaScript/Reference/Global_Objects/Number/toFixed": { "modified": "2019-03-23T22:47:11.555Z", "contributors": [ "enTropy" ] }, - "Web/JavaScript/Referencia/Objectes_globals/Number/toPrecision": { + "Web/JavaScript/Reference/Global_Objects/Number/toPrecision": { "modified": "2019-03-23T22:47:14.199Z", "contributors": [ "enTropy" ] }, - "Web/JavaScript/Referencia/Objectes_globals/Number/toString": { + "Web/JavaScript/Reference/Global_Objects/Number/toString": { "modified": "2019-03-23T22:48:42.234Z", "contributors": [ "enTropy" ] }, - "Web/JavaScript/Referencia/Objectes_globals/Set": { - "modified": "2019-03-23T22:50:13.401Z", + "Web/JavaScript/Reference/Global_Objects/parseFloat": { + "modified": "2020-03-12T19:42:39.159Z", "contributors": [ - "SphinxKnight", - "enTropy" + "llue" ] }, - "Web/JavaScript/Referencia/Objectes_globals/Set/add": { + "Web/JavaScript/Reference/Global_Objects/Set/add": { "modified": "2019-03-23T22:47:36.595Z", "contributors": [ "SphinxKnight", "enTropy" ] }, - "Web/JavaScript/Referencia/Objectes_globals/Set/clear": { + "Web/JavaScript/Reference/Global_Objects/Set/clear": { "modified": "2019-03-23T22:47:32.618Z", "contributors": [ "SphinxKnight", "enTropy" ] }, - "Web/JavaScript/Referencia/Objectes_globals/Set/delete": { + "Web/JavaScript/Reference/Global_Objects/Set/delete": { "modified": "2019-03-23T22:47:38.806Z", "contributors": [ "SphinxKnight", "enTropy" ] }, - "Web/JavaScript/Referencia/Objectes_globals/Set/entries": { + "Web/JavaScript/Reference/Global_Objects/Set/entries": { "modified": "2019-03-23T22:47:23.301Z", "contributors": [ "SphinxKnight", "enTropy" ] }, - "Web/JavaScript/Referencia/Objectes_globals/Set/has": { + "Web/JavaScript/Reference/Global_Objects/Set/has": { "modified": "2019-03-23T22:47:39.893Z", "contributors": [ "SphinxKnight", "enTropy" ] }, - "Web/JavaScript/Referencia/Objectes_globals/Set/prototype": { - "modified": "2019-03-23T22:48:42.404Z", + "Web/JavaScript/Reference/Global_Objects/Set": { + "modified": "2019-03-23T22:50:13.401Z", "contributors": [ "SphinxKnight", "enTropy" ] }, - "Web/JavaScript/Referencia/Objectes_globals/Set/values": { + "Web/JavaScript/Reference/Global_Objects/Set/values": { "modified": "2019-03-23T22:47:24.630Z", "contributors": [ "SphinxKnight", "enTropy" ] }, - "Web/JavaScript/Referencia/Objectes_globals/String": { - "modified": "2019-03-23T22:59:56.998Z", - "contributors": [ - "wbamberg", - "teoli", - "enTropy" - ] - }, - "Web/JavaScript/Referencia/Objectes_globals/String/Trim": { - "modified": "2019-03-23T22:47:13.066Z", - "contributors": [ - "enTropy" - ] - }, - "Web/JavaScript/Referencia/Objectes_globals/String/TrimLeft": { - "modified": "2019-03-23T22:47:12.920Z", - "contributors": [ - "teoli", - "enTropy" - ] - }, - "Web/JavaScript/Referencia/Objectes_globals/String/TrimRight": { - "modified": "2019-03-23T22:47:06.878Z", - "contributors": [ - "teoli", - "enTropy" - ] - }, - "Web/JavaScript/Referencia/Objectes_globals/String/anchor": { + "Web/JavaScript/Reference/Global_Objects/String/anchor": { "modified": "2019-03-23T22:46:04.637Z", "contributors": [ "llue" ] }, - "Web/JavaScript/Referencia/Objectes_globals/String/big": { + "Web/JavaScript/Reference/Global_Objects/String/big": { "modified": "2019-03-23T22:46:08.467Z", "contributors": [ "llue" ] }, - "Web/JavaScript/Referencia/Objectes_globals/String/blink": { + "Web/JavaScript/Reference/Global_Objects/String/blink": { "modified": "2019-03-23T22:46:14.520Z", "contributors": [ "llue" ] }, - "Web/JavaScript/Referencia/Objectes_globals/String/bold": { + "Web/JavaScript/Reference/Global_Objects/String/bold": { "modified": "2019-03-23T22:46:06.144Z", "contributors": [ "llue" ] }, - "Web/JavaScript/Referencia/Objectes_globals/String/charAt": { + "Web/JavaScript/Reference/Global_Objects/String/charAt": { "modified": "2019-03-23T22:34:11.527Z", "contributors": [ "enTropy" ] }, - "Web/JavaScript/Referencia/Objectes_globals/String/concat": { + "Web/JavaScript/Reference/Global_Objects/String/concat": { "modified": "2019-03-23T22:47:12.620Z", "contributors": [ "enTropy" ] }, - "Web/JavaScript/Referencia/Objectes_globals/String/endsWith": { + "Web/JavaScript/Reference/Global_Objects/String/endsWith": { "modified": "2019-03-23T22:46:45.620Z", "contributors": [ "SphinxKnight", "enTropy" ] }, - "Web/JavaScript/Referencia/Objectes_globals/String/fixed": { + "Web/JavaScript/Reference/Global_Objects/String/fixed": { "modified": "2019-03-23T22:46:13.249Z", "contributors": [ "llue" ] }, - "Web/JavaScript/Referencia/Objectes_globals/String/fontcolor": { + "Web/JavaScript/Reference/Global_Objects/String/fontcolor": { "modified": "2019-03-23T22:46:09.421Z", "contributors": [ "llue" ] }, - "Web/JavaScript/Referencia/Objectes_globals/String/fontsize": { + "Web/JavaScript/Reference/Global_Objects/String/fontsize": { "modified": "2019-03-23T22:46:08.641Z", "contributors": [ "llue" ] }, - "Web/JavaScript/Referencia/Objectes_globals/String/fromCharCode": { + "Web/JavaScript/Reference/Global_Objects/String/fromCharCode": { "modified": "2019-03-23T22:44:31.969Z", "contributors": [ "enTropy" ] }, - "Web/JavaScript/Referencia/Objectes_globals/String/indexOf": { + "Web/JavaScript/Reference/Global_Objects/String": { + "modified": "2019-03-23T22:59:56.998Z", + "contributors": [ + "wbamberg", + "teoli", + "enTropy" + ] + }, + "Web/JavaScript/Reference/Global_Objects/String/indexOf": { "modified": "2019-03-23T22:35:48.565Z", "contributors": [ "paumoreno", "enTropy" ] }, - "Web/JavaScript/Referencia/Objectes_globals/String/italics": { + "Web/JavaScript/Reference/Global_Objects/String/italics": { "modified": "2019-03-23T22:45:54.760Z", "contributors": [ "llue" ] }, - "Web/JavaScript/Referencia/Objectes_globals/String/length": { + "Web/JavaScript/Reference/Global_Objects/String/length": { "modified": "2019-03-23T22:59:07.848Z", "contributors": [ "teoli", "enTropy" ] }, - "Web/JavaScript/Referencia/Objectes_globals/String/link": { + "Web/JavaScript/Reference/Global_Objects/String/link": { "modified": "2019-03-23T22:46:06.865Z", "contributors": [ "llue" ] }, - "Web/JavaScript/Referencia/Objectes_globals/String/normalize": { + "Web/JavaScript/Reference/Global_Objects/String/normalize": { "modified": "2019-03-23T22:47:12.181Z", "contributors": [ "SphinxKnight", "enTropy" ] }, - "Web/JavaScript/Referencia/Objectes_globals/String/small": { + "Web/JavaScript/Reference/Global_Objects/String/small": { "modified": "2019-03-23T22:46:05.677Z", "contributors": [ "llue" ] }, - "Web/JavaScript/Referencia/Objectes_globals/String/startsWith": { + "Web/JavaScript/Reference/Global_Objects/String/startsWith": { "modified": "2019-03-23T22:47:12.778Z", "contributors": [ "SphinxKnight", "enTropy" ] }, - "Web/JavaScript/Referencia/Objectes_globals/String/sub": { + "Web/JavaScript/Reference/Global_Objects/String/sub": { "modified": "2019-03-23T22:45:49.091Z", "contributors": [ "llue" ] }, - "Web/JavaScript/Referencia/Objectes_globals/String/substr": { + "Web/JavaScript/Reference/Global_Objects/String/substr": { "modified": "2019-03-23T22:45:47.809Z", "contributors": [ "llue" ] }, - "Web/JavaScript/Referencia/Objectes_globals/String/sup": { + "Web/JavaScript/Reference/Global_Objects/String/sup": { "modified": "2019-03-23T22:45:50.875Z", "contributors": [ "llue" ] }, - "Web/JavaScript/Referencia/Objectes_globals/String/toLocaleLowerCase": { + "Web/JavaScript/Reference/Global_Objects/String/toLocaleLowerCase": { "modified": "2019-03-23T22:50:22.032Z", "contributors": [ "enTropy" ] }, - "Web/JavaScript/Referencia/Objectes_globals/String/toLocaleUpperCase": { + "Web/JavaScript/Reference/Global_Objects/String/toLocaleUpperCase": { "modified": "2019-03-23T22:50:21.889Z", "contributors": [ "enTropy" ] }, - "Web/JavaScript/Referencia/Objectes_globals/String/toLowerCase": { + "Web/JavaScript/Reference/Global_Objects/String/toLowerCase": { "modified": "2019-03-23T22:50:11.452Z", "contributors": [ "enTropy" ] }, - "Web/JavaScript/Referencia/Objectes_globals/String/toString": { + "Web/JavaScript/Reference/Global_Objects/String/toString": { "modified": "2019-03-23T22:47:22.295Z", "contributors": [ "enTropy" ] }, - "Web/JavaScript/Referencia/Objectes_globals/String/toUpperCase": { + "Web/JavaScript/Reference/Global_Objects/String/toUpperCase": { "modified": "2019-03-23T22:50:17.891Z", "contributors": [ "enTropy" ] }, - "Web/JavaScript/Referencia/Objectes_globals/SyntaxError": { - "modified": "2019-03-23T22:47:51.903Z", + "Web/JavaScript/Reference/Global_Objects/String/Trim": { + "modified": "2019-03-23T22:47:13.066Z", "contributors": [ - "llue" + "enTropy" ] }, - "Web/JavaScript/Referencia/Objectes_globals/SyntaxError/prototype": { - "modified": "2019-03-23T22:47:20.553Z", + "Web/JavaScript/Reference/Global_Objects/String/trimStart": { + "modified": "2019-03-23T22:47:12.920Z", "contributors": [ - "llue" + "teoli", + "enTropy" ] }, - "Web/JavaScript/Referencia/Objectes_globals/null": { - "modified": "2020-03-12T19:40:31.685Z", + "Web/JavaScript/Reference/Global_Objects/String/trimEnd": { + "modified": "2019-03-23T22:47:06.878Z", "contributors": [ "teoli", - "Sheppy", "enTropy" ] }, - "Web/JavaScript/Referencia/Objectes_globals/parseFloat": { - "modified": "2020-03-12T19:42:39.159Z", + "Web/JavaScript/Reference/Global_Objects/SyntaxError": { + "modified": "2019-03-23T22:47:51.903Z", "contributors": [ "llue" ] }, - "Web/JavaScript/Referencia/Objectes_globals/undefined": { + "Web/JavaScript/Reference/Global_Objects/undefined": { "modified": "2020-03-12T19:40:33.567Z", "contributors": [ "teoli", @@ -4722,37 +4593,20 @@ "enTropy" ] }, - "Web/JavaScript/Referencia/Operadors": { - "modified": "2020-03-12T19:40:33.454Z", - "contributors": [ - "teoli", - "enTropy", - "fscholz" - ] - }, - "Web/JavaScript/Referencia/Operadors/Arithmetic_Operators": { - "modified": "2020-03-12T19:40:35.933Z", + "Web/JavaScript/Reference/Operators/Conditional_Operator": { + "modified": "2020-03-12T19:40:36.029Z", "contributors": [ "teoli", - "enTropy", "llue" ] }, - "Web/JavaScript/Referencia/Operadors/Bitwise_Operators": { - "modified": "2020-03-12T19:40:37.718Z", - "contributors": [ - "teoli", - "enTropy" - ] - }, - "Web/JavaScript/Referencia/Operadors/Conditional_Operator": { - "modified": "2020-03-12T19:40:36.029Z", + "Web/JavaScript/Reference/Operators/function": { + "modified": "2020-03-12T19:43:14.603Z", "contributors": [ - "teoli", "llue" ] }, - "Web/JavaScript/Referencia/Operadors/Grouping": { + "Web/JavaScript/Reference/Operators/Grouping": { "modified": "2020-03-12T19:40:35.580Z", "contributors": [ "teoli", @@ -4760,15 +4614,15 @@ "llue" ] }, - "Web/JavaScript/Referencia/Operadors/Logical_Operators": { - "modified": "2020-03-12T19:40:33.485Z", + "Web/JavaScript/Reference/Operators": { + "modified": "2020-03-12T19:40:33.454Z", "contributors": [ "teoli", "enTropy", - "llue" + "fscholz" ] }, - "Web/JavaScript/Referencia/Operadors/Operador_Coma": { + "Web/JavaScript/Reference/Operators/Comma_Operator": { "modified": "2020-03-12T19:40:38.129Z", "contributors": [ "teoli", @@ -4776,20 +4630,14 @@ "llue" ] }, - "Web/JavaScript/Referencia/Operadors/function": { - "modified": "2020-03-12T19:43:14.603Z", - "contributors": [ - "llue" - ] - }, - "Web/JavaScript/Referencia/Operadors/super": { + "Web/JavaScript/Reference/Operators/super": { "modified": "2020-03-12T19:40:57.165Z", "contributors": [ "SphinxKnight", "llue" ] }, - "Web/JavaScript/Referencia/Operadors/typeof": { + "Web/JavaScript/Reference/Operators/typeof": { "modified": "2020-03-12T19:40:39.552Z", "contributors": [ "teoli", @@ -4797,68 +4645,60 @@ "llue" ] }, - "Web/JavaScript/Referencia/Operadors/void": { + "Web/JavaScript/Reference/Operators/void": { "modified": "2020-03-12T19:40:51.423Z", "contributors": [ "teoli", "enTropy" ] }, - "Web/JavaScript/Referencia/Operadors/yield": { + "Web/JavaScript/Reference/Operators/yield": { "modified": "2020-03-12T19:40:38.885Z", "contributors": [ "teoli", "enTropy" ] }, - "Web/JavaScript/Referencia/Sentencies": { - "modified": "2020-03-12T19:40:33.725Z", - "contributors": [ - "fscholz", - "enTropy", - "schlagi123" - ] - }, - "Web/JavaScript/Referencia/Sentencies/Buida": { - "modified": "2020-03-12T19:40:53.165Z", + "Web/JavaScript/Reference/Statements/block": { + "modified": "2020-03-12T19:40:58.782Z", "contributors": [ "fscholz", "llue" ] }, - "Web/JavaScript/Referencia/Sentencies/block": { - "modified": "2020-03-12T19:40:58.782Z", + "Web/JavaScript/Reference/Statements/break": { + "modified": "2020-03-12T19:42:37.121Z", "contributors": [ - "fscholz", "llue" ] }, - "Web/JavaScript/Referencia/Sentencies/break": { - "modified": "2020-03-12T19:42:37.121Z", + "Web/JavaScript/Reference/Statements/Empty": { + "modified": "2020-03-12T19:40:53.165Z", "contributors": [ + "fscholz", "llue" ] }, - "Web/JavaScript/Referencia/Sentencies/continue": { + "Web/JavaScript/Reference/Statements/continue": { "modified": "2020-03-12T19:42:36.256Z", "contributors": [ "llue" ] }, - "Web/JavaScript/Referencia/Sentencies/debugger": { + "Web/JavaScript/Reference/Statements/debugger": { "modified": "2020-03-12T19:42:42.043Z", "contributors": [ "llue" ] }, - "Web/JavaScript/Referencia/Sentencies/do...while": { + "Web/JavaScript/Reference/Statements/do...while": { "modified": "2020-03-12T19:42:35.370Z", "contributors": [ "antoniomatt", "llue" ] }, - "Web/JavaScript/Referencia/Sentencies/export": { + "Web/JavaScript/Reference/Statements/export": { "modified": "2020-11-15T17:57:08.110Z", "contributors": [ "marc.valerio", @@ -4867,56 +4707,64 @@ "llue" ] }, - "Web/JavaScript/Referencia/Sentencies/for": { - "modified": "2020-03-12T19:40:55.949Z", + "Web/JavaScript/Reference/Statements/for...of": { + "modified": "2020-03-12T19:40:34.152Z", "contributors": [ + "SphinxKnight", "fscholz", - "llue" + "enTropy" ] }, - "Web/JavaScript/Referencia/Sentencies/for...of": { - "modified": "2020-03-12T19:40:34.152Z", + "Web/JavaScript/Reference/Statements/for": { + "modified": "2020-03-12T19:40:55.949Z", "contributors": [ - "SphinxKnight", "fscholz", - "enTropy" + "llue" ] }, - "Web/JavaScript/Referencia/Sentencies/function": { + "Web/JavaScript/Reference/Statements/function": { "modified": "2020-03-12T19:40:57.798Z", "contributors": [ "fscholz", "llue" ] }, - "Web/JavaScript/Referencia/Sentencies/if...else": { + "Web/JavaScript/Reference/Statements/if...else": { "modified": "2020-03-12T19:40:53.418Z", "contributors": [ "fscholz", "llue" ] }, - "Web/JavaScript/Referencia/Sentencies/return": { + "Web/JavaScript/Reference/Statements": { + "modified": "2020-03-12T19:40:33.725Z", + "contributors": [ + "fscholz", + "enTropy", + "schlagi123" + ] + }, + "Web/JavaScript/Reference/Statements/return": { "modified": "2020-03-12T19:40:55.904Z", "contributors": [ "fscholz", "llue" ] }, - "Web/JavaScript/Referencia/Sentencies/throw": { + "Web/JavaScript/Reference/Statements/throw": { "modified": "2020-03-12T19:42:33.312Z", "contributors": [ "llue" ] }, - "Web/JavaScript/Referencia/Sentencies/while": { + "Web/JavaScript/Reference/Statements/while": { "modified": "2020-03-12T19:40:53.547Z", "contributors": [ "fscholz", "llue" ] }, - "Web/JavaScript/Referencia/Sobre": { + "Web/JavaScript/Reference/About": { "modified": "2020-03-12T19:38:14.941Z", "contributors": [ "enTropy", @@ -4924,76 +4772,228 @@ "JordiGuilleumes" ] }, - "Web/JavaScript/quant_a_JavaScript": { - "modified": "2020-07-27T11:53:21.427Z", + "Web/OpenSearch": { + "modified": "2019-01-16T15:50:29.790Z", "contributors": [ - "joanpardo", - "enTropy" + "Toniher" ] }, - "Web/Reference": { - "modified": "2019-03-23T22:22:23.982Z", + "conflicting/Web/Guide": { + "modified": "2019-03-23T23:33:13.846Z", "contributors": [ - "Legioinvicta", - "andrealeone" + "caos30", + "ethertank" ] }, - "Web/Reference/API": { - "modified": "2019-03-23T22:22:24.413Z", + "Web/Guide/Mobile": { + "modified": "2019-03-23T23:33:13.336Z", + "contributors": [ + "caos30", + "wbamberg" + ] + }, + "Web/Progressive_web_apps": { + "modified": "2019-03-23T23:33:17.529Z", + "contributors": [ + "caos30" + ] + }, + "Web/CSS/:is": { + "modified": "2019-03-23T22:21:40.467Z", "contributors": [ "Legioinvicta" ] }, - "Web/Tutorials": { - "modified": "2019-03-23T22:22:12.721Z", + "conflicting/Learn/CSS/Building_blocks": { + "modified": "2019-03-23T22:21:00.737Z", "contributors": [ "Legioinvicta" ] }, - "Web/XSLT": { - "modified": "2019-03-23T23:40:59.738Z", + "conflicting/Learn/CSS/Building_blocks/Cascade_and_inheritance": { + "modified": "2019-03-23T22:21:11.477Z", + "contributors": [ + "Legioinvicta" + ] + }, + "conflicting/Learn/CSS/Building_blocks/Values_and_units": { + "modified": "2019-03-23T22:20:58.899Z", + "contributors": [ + "Legioinvicta" + ] + }, + "conflicting/Learn/CSS/First_steps/How_CSS_works": { + "modified": "2019-03-23T22:21:14.792Z", + "contributors": [ + "Legioinvicta" + ] + }, + "conflicting/Learn/CSS/First_steps/How_CSS_is_structured": { + "modified": "2019-03-23T22:20:58.263Z", + "contributors": [ + "Legioinvicta" + ] + }, + "conflicting/Learn/CSS/CSS_layout": { + "modified": "2019-03-23T22:20:52.030Z", + "contributors": [ + "Legioinvicta" + ] + }, + "conflicting/Learn/CSS/Styling_text/Fundamentals": { + "modified": "2019-03-23T22:21:09.957Z", + "contributors": [ + "Legioinvicta" + ] + }, + "conflicting/Learn/CSS/First_steps": { + "modified": "2019-03-23T22:22:04.507Z", + "contributors": [ + "Legioinvicta" + ] + }, + "Learn/JavaScript/Client-side_web_APIs/Manipulating_documents": { + "modified": "2019-03-23T22:20:34.923Z", + "contributors": [ + "Legioinvicta" + ] + }, + "conflicting/Learn/CSS/Styling_text/Styling_lists": { + "modified": "2019-03-23T22:21:00.463Z", + "contributors": [ + "Legioinvicta" + ] + }, + "conflicting/Learn/CSS/First_steps/How_CSS_works_54b8e7ce45c74338181144ded4fbdccf": { + "modified": "2019-03-23T22:21:21.787Z", + "contributors": [ + "Legioinvicta" + ] + }, + "conflicting/Learn/CSS/First_steps/How_CSS_works_9566880e82eb23b2f47f8821f75e0ab1": { + "modified": "2019-03-23T22:21:22.840Z", + "contributors": [ + "Legioinvicta" + ] + }, + "conflicting/Learn/CSS/Building_blocks/Selectors": { + "modified": "2019-03-23T22:21:02.763Z", + "contributors": [ + "Legioinvicta" + ] + }, + "conflicting/Learn/CSS/Building_blocks/Styling_tables": { + "modified": "2019-03-23T22:20:47.336Z", + "contributors": [ + "Legioinvicta" + ] + }, + "Learn/JavaScript/Objects": { + "modified": "2020-03-12T19:40:42.090Z", + "contributors": [ + "llue" + ] + }, + "conflicting/Web/JavaScript/Reference/Global_Objects/DataView": { + "modified": "2019-03-23T22:46:15.196Z", + "contributors": [ + "llue" + ] + }, + "conflicting/Web/JavaScript/Reference/Global_Objects/EvalError": { + "modified": "2019-03-23T22:47:27.467Z", + "contributors": [ + "llue" + ] + }, + "conflicting/Web/JavaScript/Reference/Global_Objects/Object": { + "modified": "2019-03-23T22:48:18.297Z", + "contributors": [ + "enTropy" + ] + }, + "conflicting/Web/JavaScript/Reference/Global_Objects/WeakMap": { + "modified": "2019-03-23T22:44:02.612Z", + "contributors": [ + "SphinxKnight", + "llue" + ] + }, + "conflicting/Web/JavaScript/Reference/Global_Objects/WeakSet": { + "modified": "2019-03-23T22:44:06.443Z", + "contributors": [ + "SphinxKnight", + "llue" + ] + }, + "conflicting/Web/JavaScript/Reference/Global_Objects/Boolean": { + "modified": "2019-03-23T22:58:39.243Z", "contributors": [ - "ExE-Boss", "teoli", - "Oriol" + "enTropy" ] }, - "Web_Development": { - "modified": "2019-03-23T23:33:13.846Z", + "conflicting/Web/JavaScript/Reference/Global_Objects/Date": { + "modified": "2019-03-23T22:57:58.782Z", "contributors": [ - "caos30", - "ethertank" + "teoli", + "enTropy" ] }, - "Web_Development/Mobile": { - "modified": "2019-03-23T23:33:13.336Z", + "conflicting/Web/JavaScript/Reference/Global_Objects/Error": { + "modified": "2019-03-23T22:58:43.169Z", "contributors": [ - "caos30", - "wbamberg" + "teoli", + "enTropy" ] }, - "Web_Development/Mobile/A_hybrid_approach": { - "modified": "2019-03-23T23:33:18.345Z", + "conflicting/Web/JavaScript/Reference/Global_Objects/Map": { + "modified": "2019-03-23T22:48:45.592Z", "contributors": [ - "trevorh" + "SphinxKnight", + "enTropy" ] }, - "Web_Development/Mobile/Mobile-friendliness": { - "modified": "2019-03-23T23:33:21.925Z", + "conflicting/Web/JavaScript/Reference/Global_Objects/Number": { + "modified": "2019-03-23T22:50:16.328Z", "contributors": [ - "caos30" + "enTropy" ] }, - "Web_Development/Mobile/Responsive_design": { - "modified": "2019-03-23T23:33:17.529Z", + "conflicting/Web/JavaScript/Reference/Global_Objects/Set": { + "modified": "2019-03-23T22:48:42.404Z", "contributors": [ - "caos30" + "SphinxKnight", + "enTropy" ] }, - "Web_Development/Mobile/Separate_sites": { - "modified": "2019-03-23T23:33:19.296Z", + "conflicting/Web/JavaScript/Reference/Global_Objects/SyntaxError": { + "modified": "2019-03-23T22:47:20.553Z", "contributors": [ - "trevorh" + "llue" + ] + }, + "conflicting/Web/JavaScript/Reference/Operators": { + "modified": "2020-03-12T19:40:35.933Z", + "contributors": [ + "teoli", + "enTropy", + "llue" + ] + }, + "conflicting/Web/JavaScript/Reference/Operators_94c03c413a71df1ccff4c3ede275360c": { + "modified": "2020-03-12T19:40:37.718Z", + "contributors": [ + "teoli", + "enTropy" + ] + }, + "conflicting/Web/JavaScript/Reference/Operators_af596841c6a3650ee514088f0e310901": { + "modified": "2020-03-12T19:40:33.485Z", + "contributors": [ + "teoli", + "enTropy", + "llue" ] } } \ No newline at end of file diff --git a/files/ca/conflicting/learn/css/building_blocks/cascade_and_inheritance/index.html b/files/ca/conflicting/learn/css/building_blocks/cascade_and_inheritance/index.html index b7bf86a77f..738c16d558 100644 --- a/files/ca/conflicting/learn/css/building_blocks/cascade_and_inheritance/index.html +++ b/files/ca/conflicting/learn/css/building_blocks/cascade_and_inheritance/index.html @@ -1,16 +1,17 @@ --- title: Cascada i herència -slug: Web/Guide/CSS/Inici_en_CSS/Cascada_i_herència +slug: conflicting/Learn/CSS/Building_blocks/Cascade_and_inheritance tags: - Beginner - CSS - - 'CSS:Getting_Started' + - CSS:Getting_Started - Guide - NeedsBeginnerUpdate - NeedsUpdate - Web translation_of: Learn/CSS/Building_blocks/Cascade_and_inheritance translation_of_original: Web/Guide/CSS/Getting_started/Cascading_and_inheritance +original_slug: Web/Guide/CSS/Inici_en_CSS/Cascada_i_herència ---

{{ CSSTutorialTOC() }}

diff --git a/files/ca/conflicting/learn/css/building_blocks/index.html b/files/ca/conflicting/learn/css/building_blocks/index.html index 39d411bb19..b0105c59c4 100644 --- a/files/ca/conflicting/learn/css/building_blocks/index.html +++ b/files/ca/conflicting/learn/css/building_blocks/index.html @@ -1,6 +1,6 @@ --- title: Caixes -slug: Web/Guide/CSS/Inici_en_CSS/Caixes +slug: conflicting/Learn/CSS/Building_blocks tags: - Basic - Beginner @@ -8,12 +8,13 @@ tags: - CSS Borders - CSS Margin - CSS Padding - - 'CSS:Getting_Started' + - CSS:Getting_Started - NeedsBeginnerUpdate - NeedsUpdate - Web translation_of: Learn/CSS/Building_blocks translation_of_original: Web/Guide/CSS/Getting_started/Boxes +original_slug: Web/Guide/CSS/Inici_en_CSS/Caixes ---

{{ CSSTutorialTOC() }}

diff --git a/files/ca/conflicting/learn/css/building_blocks/selectors/index.html b/files/ca/conflicting/learn/css/building_blocks/selectors/index.html index a3e8534ee5..3e3f5edc98 100644 --- a/files/ca/conflicting/learn/css/building_blocks/selectors/index.html +++ b/files/ca/conflicting/learn/css/building_blocks/selectors/index.html @@ -1,11 +1,11 @@ --- title: Selectors -slug: Web/Guide/CSS/Inici_en_CSS/Selectors +slug: conflicting/Learn/CSS/Building_blocks/Selectors tags: - Beginner - CSS - CSS Selector - - 'CSS:Getting_Started' + - CSS:Getting_Started - Example - Guide - NeedsBeginnerUpdate @@ -14,6 +14,7 @@ tags: - Web translation_of: Learn/CSS/Building_blocks/Selectors translation_of_original: Web/Guide/CSS/Getting_started/Selectors +original_slug: Web/Guide/CSS/Inici_en_CSS/Selectors ---

{{ CSSTutorialTOC() }}

diff --git a/files/ca/conflicting/learn/css/building_blocks/styling_tables/index.html b/files/ca/conflicting/learn/css/building_blocks/styling_tables/index.html index d7875ae370..7b09140c78 100644 --- a/files/ca/conflicting/learn/css/building_blocks/styling_tables/index.html +++ b/files/ca/conflicting/learn/css/building_blocks/styling_tables/index.html @@ -1,10 +1,10 @@ --- title: Taules -slug: Web/Guide/CSS/Inici_en_CSS/Taules +slug: conflicting/Learn/CSS/Building_blocks/Styling_tables tags: - CSS - CSS Tables - - 'CSS:Getting_Started' + - CSS:Getting_Started - Example - Guide - Intermediate @@ -14,6 +14,7 @@ tags: - Web translation_of: Learn/CSS/Building_blocks/Styling_tables translation_of_original: Web/Guide/CSS/Getting_started/Tables +original_slug: Web/Guide/CSS/Inici_en_CSS/Taules ---

{{CSSTutorialTOC}}{{previousPage("/en-US/docs/Web/Guide/CSS/Getting_Started/Layout", "Disseny")}}

diff --git a/files/ca/conflicting/learn/css/building_blocks/values_and_units/index.html b/files/ca/conflicting/learn/css/building_blocks/values_and_units/index.html index ba607aab18..dc9e9a197e 100644 --- a/files/ca/conflicting/learn/css/building_blocks/values_and_units/index.html +++ b/files/ca/conflicting/learn/css/building_blocks/values_and_units/index.html @@ -1,10 +1,10 @@ --- title: Color -slug: Web/Guide/CSS/Inici_en_CSS/Color +slug: conflicting/Learn/CSS/Building_blocks/Values_and_units tags: - Beginner - CSS - - 'CSS:Getting_Started' + - CSS:Getting_Started - Example - Guide - NeedsBeginnerUpdate @@ -12,6 +12,7 @@ tags: - Web translation_of: Learn/CSS/Introduction_to_CSS/Values_and_units#Colors translation_of_original: Web/Guide/CSS/Getting_started/Color +original_slug: Web/Guide/CSS/Inici_en_CSS/Color ---

{{ CSSTutorialTOC() }}

diff --git a/files/ca/conflicting/learn/css/css_layout/index.html b/files/ca/conflicting/learn/css/css_layout/index.html index 28045a681d..b19a07ffe4 100644 --- a/files/ca/conflicting/learn/css/css_layout/index.html +++ b/files/ca/conflicting/learn/css/css_layout/index.html @@ -1,12 +1,12 @@ --- title: Disseny -slug: Web/Guide/CSS/Inici_en_CSS/Disseny +slug: conflicting/Learn/CSS/CSS_layout tags: - CSS - CSS Float - CSS Text Align - CSS Unit - - 'CSS:Getting_Started' + - CSS:Getting_Started - Example - Guide - Intermediate @@ -16,6 +16,7 @@ tags: - Web translation_of: Learn/CSS/CSS_layout translation_of_original: Web/Guide/CSS/Getting_started/Layout +original_slug: Web/Guide/CSS/Inici_en_CSS/Disseny ---

{{ CSSTutorialTOC() }}

diff --git a/files/ca/conflicting/learn/css/first_steps/how_css_is_structured/index.html b/files/ca/conflicting/learn/css/first_steps/how_css_is_structured/index.html index 15b376dad0..d2b6959c85 100644 --- a/files/ca/conflicting/learn/css/first_steps/how_css_is_structured/index.html +++ b/files/ca/conflicting/learn/css/first_steps/how_css_is_structured/index.html @@ -1,9 +1,9 @@ --- title: CSS llegible -slug: Web/Guide/CSS/Inici_en_CSS/CSS_llegible +slug: conflicting/Learn/CSS/First_steps/How_CSS_is_structured tags: - CSS - - 'CSS:Getting_Started' + - CSS:Getting_Started - Guide - Intermediate - NeedsBeginnerUpdate @@ -11,6 +11,7 @@ tags: - Web translation_of: Learn/CSS/Introduction_to_CSS/Syntax#Beyond_syntax_make_CSS_readable translation_of_original: Web/Guide/CSS/Getting_started/Readable_CSS +original_slug: Web/Guide/CSS/Inici_en_CSS/CSS_llegible ---

{{ CSSTutorialTOC() }}

diff --git a/files/ca/conflicting/learn/css/first_steps/how_css_works/index.html b/files/ca/conflicting/learn/css/first_steps/how_css_works/index.html index eb6512b8bb..067de9bb09 100644 --- a/files/ca/conflicting/learn/css/first_steps/how_css_works/index.html +++ b/files/ca/conflicting/learn/css/first_steps/how_css_works/index.html @@ -1,16 +1,17 @@ --- title: Com funciona el CSS -slug: Web/Guide/CSS/Inici_en_CSS/Com_funciona_el_CSS +slug: conflicting/Learn/CSS/First_steps/How_CSS_works tags: - Beginner - CSS - - 'CSS:Getting_Started' + - CSS:Getting_Started - Guide - NeedsBeginnerUpdate - NeedsUpdate - Web translation_of: Learn/CSS/First_steps/How_CSS_works translation_of_original: Web/Guide/CSS/Getting_started/How_CSS_works +original_slug: Web/Guide/CSS/Inici_en_CSS/Com_funciona_el_CSS ---

{{ CSSTutorialTOC() }}

diff --git a/files/ca/conflicting/learn/css/first_steps/how_css_works_54b8e7ce45c74338181144ded4fbdccf/index.html b/files/ca/conflicting/learn/css/first_steps/how_css_works_54b8e7ce45c74338181144ded4fbdccf/index.html index d3685309c7..99da18a2b6 100644 --- a/files/ca/conflicting/learn/css/first_steps/how_css_works_54b8e7ce45c74338181144ded4fbdccf/index.html +++ b/files/ca/conflicting/learn/css/first_steps/how_css_works_54b8e7ce45c74338181144ded4fbdccf/index.html @@ -1,16 +1,18 @@ --- title: Per què utilitzar CSS? -slug: Web/Guide/CSS/Inici_en_CSS/Per_què_utilitzar_CSS +slug: >- + conflicting/Learn/CSS/First_steps/How_CSS_works_54b8e7ce45c74338181144ded4fbdccf tags: - Beginner - CSS - - 'CSS:Getting_Started' + - CSS:Getting_Started - Example - Guide - NeedsBeginnerUpdate - Web translation_of: Learn/CSS/First_steps/How_CSS_works translation_of_original: Web/Guide/CSS/Getting_started/Why_use_CSS +original_slug: Web/Guide/CSS/Inici_en_CSS/Per_què_utilitzar_CSS ---

{{ CSSTutorialTOC() }}

diff --git a/files/ca/conflicting/learn/css/first_steps/how_css_works_9566880e82eb23b2f47f8821f75e0ab1/index.html b/files/ca/conflicting/learn/css/first_steps/how_css_works_9566880e82eb23b2f47f8821f75e0ab1/index.html index 28db41fa98..5d4592efb8 100644 --- a/files/ca/conflicting/learn/css/first_steps/how_css_works_9566880e82eb23b2f47f8821f75e0ab1/index.html +++ b/files/ca/conflicting/learn/css/first_steps/how_css_works_9566880e82eb23b2f47f8821f75e0ab1/index.html @@ -1,16 +1,18 @@ --- title: Que és CSS? -slug: Web/Guide/CSS/Inici_en_CSS/Que_és_CSS +slug: >- + conflicting/Learn/CSS/First_steps/How_CSS_works_9566880e82eb23b2f47f8821f75e0ab1 tags: - Beginner - CSS - - 'CSS:Getting_Started' + - CSS:Getting_Started - Example - Guide - NeedsBeginnerUpdate - Web translation_of: Learn/CSS/First_steps/How_CSS_works translation_of_original: Web/Guide/CSS/Getting_started/What_is_CSS +original_slug: Web/Guide/CSS/Inici_en_CSS/Que_és_CSS ---
{{CSSTutorialTOC}}
diff --git a/files/ca/conflicting/learn/css/first_steps/index.html b/files/ca/conflicting/learn/css/first_steps/index.html index 8de66f308e..2f821fe1eb 100644 --- a/files/ca/conflicting/learn/css/first_steps/index.html +++ b/files/ca/conflicting/learn/css/first_steps/index.html @@ -1,10 +1,10 @@ --- title: Inici en CSS -slug: Web/Guide/CSS/Inici_en_CSS +slug: conflicting/Learn/CSS/First_steps tags: - Beginner - CSS - - 'CSS:Getting_Started' + - CSS:Getting_Started - Guide - Needs - NeedsBeginnerUpdate @@ -12,6 +12,7 @@ tags: - Web translation_of: Learn/CSS/First_steps translation_of_original: Web/Guide/CSS/Getting_started +original_slug: Web/Guide/CSS/Inici_en_CSS ---

Aquest tutorial és una introducció a les característiques bàsiques i llenguatge (la sintaxi) per als fulls d'estil en cascada(Cascading Style Sheets) (CSS). S'utilitza CSS per canviar l'aspecte d'un document estructurat, com ara una pàgina web. El tutorial també inclou exemples d'exercicis que podeu provar en el vostre ordinador per veure els efectes de les CSS i les característiques que funcionen en els navegadors moderns.

diff --git a/files/ca/conflicting/learn/css/styling_text/fundamentals/index.html b/files/ca/conflicting/learn/css/styling_text/fundamentals/index.html index a1a8c9364f..8561eb551c 100644 --- a/files/ca/conflicting/learn/css/styling_text/fundamentals/index.html +++ b/files/ca/conflicting/learn/css/styling_text/fundamentals/index.html @@ -1,11 +1,11 @@ --- title: Estils de text -slug: Web/Guide/CSS/Inici_en_CSS/Estils_de_text +slug: conflicting/Learn/CSS/Styling_text/Fundamentals tags: - Beginner - CSS - CSS Fonts - - 'CSS:Getting_Started' + - CSS:Getting_Started - Guide - NeedsBeginnerUpdate - NeedsLiveSample @@ -13,6 +13,7 @@ tags: - Web translation_of: Learn/CSS/Styling_text/Fundamentals translation_of_original: Web/Guide/CSS/Getting_started/Text_styles +original_slug: Web/Guide/CSS/Inici_en_CSS/Estils_de_text ---

{{ CSSTutorialTOC() }}

diff --git a/files/ca/conflicting/learn/css/styling_text/styling_lists/index.html b/files/ca/conflicting/learn/css/styling_text/styling_lists/index.html index a6bd0d31a1..7968e26f8b 100644 --- a/files/ca/conflicting/learn/css/styling_text/styling_lists/index.html +++ b/files/ca/conflicting/learn/css/styling_text/styling_lists/index.html @@ -1,10 +1,10 @@ --- title: Llistes -slug: Web/Guide/CSS/Inici_en_CSS/Llistes +slug: conflicting/Learn/CSS/Styling_text/Styling_lists tags: - Beginner - CSS - - 'CSS:Getting_Started' + - CSS:Getting_Started - Example - Guide - Intermediate @@ -13,6 +13,7 @@ tags: - Web translation_of: Learn/CSS/Styling_text/Styling_lists translation_of_original: Web/Guide/CSS/Getting_started/Lists +original_slug: Web/Guide/CSS/Inici_en_CSS/Llistes ---

{{ CSSTutorialTOC() }}

diff --git a/files/ca/conflicting/web/guide/index.html b/files/ca/conflicting/web/guide/index.html index ba6fb934f0..4debdf0059 100644 --- a/files/ca/conflicting/web/guide/index.html +++ b/files/ca/conflicting/web/guide/index.html @@ -1,12 +1,13 @@ --- title: Desenvolupament web -slug: Web_Development +slug: conflicting/Web/Guide tags: - NeedsTranslation - TopicStub - Web Development translation_of: Web/Guide translation_of_original: Web_Development +original_slug: Web_Development ---

El desenvolupament web comprèn tots els aspectes de construir un portal o aplicació web.

Aprèn a crear qualsevol cosa des d'una simple web fins a una web complexa i altament interactiva emprant les darreres tecnologies web  fullejant els articles que et mostrem aquí.

diff --git a/files/ca/conflicting/web/javascript/reference/global_objects/boolean/index.html b/files/ca/conflicting/web/javascript/reference/global_objects/boolean/index.html index e0845eb102..1f032b041e 100644 --- a/files/ca/conflicting/web/javascript/reference/global_objects/boolean/index.html +++ b/files/ca/conflicting/web/javascript/reference/global_objects/boolean/index.html @@ -1,8 +1,9 @@ --- title: Boolean.prototype -slug: Web/JavaScript/Referencia/Objectes_globals/Boolean/prototype +slug: conflicting/Web/JavaScript/Reference/Global_Objects/Boolean translation_of: Web/JavaScript/Reference/Global_Objects/Boolean translation_of_original: Web/JavaScript/Reference/Global_Objects/Boolean/prototype +original_slug: Web/JavaScript/Referencia/Objectes_globals/Boolean/prototype ---
{{JSRef("Global_Objects", "Boolean")}}
diff --git a/files/ca/conflicting/web/javascript/reference/global_objects/dataview/index.html b/files/ca/conflicting/web/javascript/reference/global_objects/dataview/index.html index ebd6cbe729..7f75592b39 100644 --- a/files/ca/conflicting/web/javascript/reference/global_objects/dataview/index.html +++ b/files/ca/conflicting/web/javascript/reference/global_objects/dataview/index.html @@ -1,8 +1,9 @@ --- title: DataView.prototype -slug: Web/JavaScript/Reference/Global_Objects/DataView/prototype +slug: conflicting/Web/JavaScript/Reference/Global_Objects/DataView translation_of: Web/JavaScript/Reference/Global_Objects/DataView translation_of_original: Web/JavaScript/Reference/Global_Objects/DataView/prototype +original_slug: Web/JavaScript/Reference/Global_Objects/DataView/prototype ---
{{JSRef}}
diff --git a/files/ca/conflicting/web/javascript/reference/global_objects/date/index.html b/files/ca/conflicting/web/javascript/reference/global_objects/date/index.html index 91e2dff38f..e9e2bb9c7d 100644 --- a/files/ca/conflicting/web/javascript/reference/global_objects/date/index.html +++ b/files/ca/conflicting/web/javascript/reference/global_objects/date/index.html @@ -1,8 +1,9 @@ --- title: Date.prototype -slug: Web/JavaScript/Referencia/Objectes_globals/Date/prototype +slug: conflicting/Web/JavaScript/Reference/Global_Objects/Date translation_of: Web/JavaScript/Reference/Global_Objects/Date translation_of_original: Web/JavaScript/Reference/Global_Objects/Date/prototype +original_slug: Web/JavaScript/Referencia/Objectes_globals/Date/prototype ---
{{JSRef("Global_Objects", "Date")}}
diff --git a/files/ca/conflicting/web/javascript/reference/global_objects/error/index.html b/files/ca/conflicting/web/javascript/reference/global_objects/error/index.html index 53e22669e9..96d7ea961e 100644 --- a/files/ca/conflicting/web/javascript/reference/global_objects/error/index.html +++ b/files/ca/conflicting/web/javascript/reference/global_objects/error/index.html @@ -1,8 +1,9 @@ --- title: Error.prototype -slug: Web/JavaScript/Referencia/Objectes_globals/Error/prototype +slug: conflicting/Web/JavaScript/Reference/Global_Objects/Error translation_of: Web/JavaScript/Reference/Global_Objects/Error translation_of_original: Web/JavaScript/Reference/Global_Objects/Error/prototype +original_slug: Web/JavaScript/Referencia/Objectes_globals/Error/prototype ---
{{JSRef("Global_Objects", "Error", "EvalError,InternalError,RangeError,ReferenceError,SyntaxError,TypeError,URIError")}}
diff --git a/files/ca/conflicting/web/javascript/reference/global_objects/evalerror/index.html b/files/ca/conflicting/web/javascript/reference/global_objects/evalerror/index.html index 5f83d25a6f..e058929546 100644 --- a/files/ca/conflicting/web/javascript/reference/global_objects/evalerror/index.html +++ b/files/ca/conflicting/web/javascript/reference/global_objects/evalerror/index.html @@ -1,8 +1,9 @@ --- title: EvalError.prototype -slug: Web/JavaScript/Reference/Global_Objects/EvalError/prototype +slug: conflicting/Web/JavaScript/Reference/Global_Objects/EvalError translation_of: Web/JavaScript/Reference/Global_Objects/EvalError translation_of_original: Web/JavaScript/Reference/Global_Objects/EvalError/prototype +original_slug: Web/JavaScript/Reference/Global_Objects/EvalError/prototype ---
{{JSRef}}
diff --git a/files/ca/conflicting/web/javascript/reference/global_objects/map/index.html b/files/ca/conflicting/web/javascript/reference/global_objects/map/index.html index 3a7508f042..bcab0afb8a 100644 --- a/files/ca/conflicting/web/javascript/reference/global_objects/map/index.html +++ b/files/ca/conflicting/web/javascript/reference/global_objects/map/index.html @@ -1,8 +1,9 @@ --- title: Map.prototype -slug: Web/JavaScript/Referencia/Objectes_globals/Map/prototype +slug: conflicting/Web/JavaScript/Reference/Global_Objects/Map translation_of: Web/JavaScript/Reference/Global_Objects/Map translation_of_original: Web/JavaScript/Reference/Global_Objects/Map/prototype +original_slug: Web/JavaScript/Referencia/Objectes_globals/Map/prototype ---
{{JSRef}}
diff --git a/files/ca/conflicting/web/javascript/reference/global_objects/number/index.html b/files/ca/conflicting/web/javascript/reference/global_objects/number/index.html index ae733e56ec..d5c2f282cd 100644 --- a/files/ca/conflicting/web/javascript/reference/global_objects/number/index.html +++ b/files/ca/conflicting/web/javascript/reference/global_objects/number/index.html @@ -1,8 +1,9 @@ --- title: Number.prototype -slug: Web/JavaScript/Referencia/Objectes_globals/Number/prototype +slug: conflicting/Web/JavaScript/Reference/Global_Objects/Number translation_of: Web/JavaScript/Reference/Global_Objects/Number translation_of_original: Web/JavaScript/Reference/Global_Objects/Number/prototype +original_slug: Web/JavaScript/Referencia/Objectes_globals/Number/prototype ---
{{JSRef}}
diff --git a/files/ca/conflicting/web/javascript/reference/global_objects/object/index.html b/files/ca/conflicting/web/javascript/reference/global_objects/object/index.html index 9451ccfefe..a5bfe248c9 100644 --- a/files/ca/conflicting/web/javascript/reference/global_objects/object/index.html +++ b/files/ca/conflicting/web/javascript/reference/global_objects/object/index.html @@ -1,8 +1,9 @@ --- title: Object.prototype -slug: Web/JavaScript/Reference/Global_Objects/Object/prototype +slug: conflicting/Web/JavaScript/Reference/Global_Objects/Object translation_of: Web/JavaScript/Reference/Global_Objects/Object translation_of_original: Web/JavaScript/Reference/Global_Objects/Object/prototype +original_slug: Web/JavaScript/Reference/Global_Objects/Object/prototype ---
{{JSRef}}
diff --git a/files/ca/conflicting/web/javascript/reference/global_objects/set/index.html b/files/ca/conflicting/web/javascript/reference/global_objects/set/index.html index 9d6f6e90ee..d4e6516f15 100644 --- a/files/ca/conflicting/web/javascript/reference/global_objects/set/index.html +++ b/files/ca/conflicting/web/javascript/reference/global_objects/set/index.html @@ -1,8 +1,9 @@ --- title: Set.prototype -slug: Web/JavaScript/Referencia/Objectes_globals/Set/prototype +slug: conflicting/Web/JavaScript/Reference/Global_Objects/Set translation_of: Web/JavaScript/Reference/Global_Objects/Set translation_of_original: Web/JavaScript/Reference/Global_Objects/Set/prototype +original_slug: Web/JavaScript/Referencia/Objectes_globals/Set/prototype ---
{{JSRef}}
diff --git a/files/ca/conflicting/web/javascript/reference/global_objects/syntaxerror/index.html b/files/ca/conflicting/web/javascript/reference/global_objects/syntaxerror/index.html index 35aea642bd..e2641c4057 100644 --- a/files/ca/conflicting/web/javascript/reference/global_objects/syntaxerror/index.html +++ b/files/ca/conflicting/web/javascript/reference/global_objects/syntaxerror/index.html @@ -1,8 +1,9 @@ --- title: SyntaxError.prototype -slug: Web/JavaScript/Referencia/Objectes_globals/SyntaxError/prototype +slug: conflicting/Web/JavaScript/Reference/Global_Objects/SyntaxError translation_of: Web/JavaScript/Reference/Global_Objects/SyntaxError translation_of_original: Web/JavaScript/Reference/Global_Objects/SyntaxError/prototype +original_slug: Web/JavaScript/Referencia/Objectes_globals/SyntaxError/prototype ---
{{JSRef}}
diff --git a/files/ca/conflicting/web/javascript/reference/global_objects/weakmap/index.html b/files/ca/conflicting/web/javascript/reference/global_objects/weakmap/index.html index 40c3e72ff6..45313877ce 100644 --- a/files/ca/conflicting/web/javascript/reference/global_objects/weakmap/index.html +++ b/files/ca/conflicting/web/javascript/reference/global_objects/weakmap/index.html @@ -1,8 +1,9 @@ --- title: WeakMap.prototype -slug: Web/JavaScript/Reference/Global_Objects/WeakMap/prototype +slug: conflicting/Web/JavaScript/Reference/Global_Objects/WeakMap translation_of: Web/JavaScript/Reference/Global_Objects/WeakMap translation_of_original: Web/JavaScript/Reference/Global_Objects/WeakMap/prototype +original_slug: Web/JavaScript/Reference/Global_Objects/WeakMap/prototype ---
{{JSRef}}
diff --git a/files/ca/conflicting/web/javascript/reference/global_objects/weakset/index.html b/files/ca/conflicting/web/javascript/reference/global_objects/weakset/index.html index 4e86935904..f602febbc9 100644 --- a/files/ca/conflicting/web/javascript/reference/global_objects/weakset/index.html +++ b/files/ca/conflicting/web/javascript/reference/global_objects/weakset/index.html @@ -1,8 +1,9 @@ --- title: WeakSet.prototype -slug: Web/JavaScript/Reference/Global_Objects/WeakSet/prototype +slug: conflicting/Web/JavaScript/Reference/Global_Objects/WeakSet translation_of: Web/JavaScript/Reference/Global_Objects/WeakSet translation_of_original: Web/JavaScript/Reference/Global_Objects/WeakSet/prototype +original_slug: Web/JavaScript/Reference/Global_Objects/WeakSet/prototype ---
{{JSRef}}
diff --git a/files/ca/conflicting/web/javascript/reference/operators/index.html b/files/ca/conflicting/web/javascript/reference/operators/index.html index 9b6816c2d6..5f5221c244 100644 --- a/files/ca/conflicting/web/javascript/reference/operators/index.html +++ b/files/ca/conflicting/web/javascript/reference/operators/index.html @@ -1,8 +1,9 @@ --- title: Operadors aritmètics -slug: Web/JavaScript/Referencia/Operadors/Arithmetic_Operators +slug: conflicting/Web/JavaScript/Reference/Operators translation_of: Web/JavaScript/Reference/Operators translation_of_original: Web/JavaScript/Reference/Operators/Arithmetic_Operators +original_slug: Web/JavaScript/Referencia/Operadors/Arithmetic_Operators ---
{{jsSidebar("Operators")}}
diff --git a/files/ca/conflicting/web/javascript/reference/operators_94c03c413a71df1ccff4c3ede275360c/index.html b/files/ca/conflicting/web/javascript/reference/operators_94c03c413a71df1ccff4c3ede275360c/index.html index f7fbae7b47..73733f5188 100644 --- a/files/ca/conflicting/web/javascript/reference/operators_94c03c413a71df1ccff4c3ede275360c/index.html +++ b/files/ca/conflicting/web/javascript/reference/operators_94c03c413a71df1ccff4c3ede275360c/index.html @@ -1,8 +1,10 @@ --- title: Operadors de bits -slug: Web/JavaScript/Referencia/Operadors/Bitwise_Operators +slug: >- + conflicting/Web/JavaScript/Reference/Operators_94c03c413a71df1ccff4c3ede275360c translation_of: Web/JavaScript/Reference/Operators translation_of_original: Web/JavaScript/Reference/Operators/Bitwise_Operators +original_slug: Web/JavaScript/Referencia/Operadors/Bitwise_Operators ---
{{jsSidebar("Operators")}}
diff --git a/files/ca/conflicting/web/javascript/reference/operators_af596841c6a3650ee514088f0e310901/index.html b/files/ca/conflicting/web/javascript/reference/operators_af596841c6a3650ee514088f0e310901/index.html index 591e1fbc4f..3dc7af9899 100644 --- a/files/ca/conflicting/web/javascript/reference/operators_af596841c6a3650ee514088f0e310901/index.html +++ b/files/ca/conflicting/web/javascript/reference/operators_af596841c6a3650ee514088f0e310901/index.html @@ -1,8 +1,10 @@ --- title: Operadors Lògics -slug: Web/JavaScript/Referencia/Operadors/Logical_Operators +slug: >- + conflicting/Web/JavaScript/Reference/Operators_af596841c6a3650ee514088f0e310901 translation_of: Web/JavaScript/Reference/Operators translation_of_original: Web/JavaScript/Reference/Operators/Logical_Operators +original_slug: Web/JavaScript/Referencia/Operadors/Logical_Operators ---
{{jsSidebar("Operators")}}
diff --git a/files/ca/glossary/attribute/index.html b/files/ca/glossary/attribute/index.html index 8cb4795ca4..51b8de1e1c 100644 --- a/files/ca/glossary/attribute/index.html +++ b/files/ca/glossary/attribute/index.html @@ -1,11 +1,12 @@ --- title: Atribut -slug: Glossary/Atribut +slug: Glossary/Attribute tags: - CodingScripting - Glossary - HTML translation_of: Glossary/Attribute +original_slug: Glossary/Atribut ---

Un atribut estén una {{Glossary("etiqueta")}}, canviant el comportament de l'etiqueta o proporcionant metadades. Un atribut té sempre la forma nom = valor (donant l'identificador de l'atribut i el valor associat a l'atribut).

diff --git a/files/ca/glossary/browser/index.html b/files/ca/glossary/browser/index.html index c3280d723b..a9780ffbf2 100644 --- a/files/ca/glossary/browser/index.html +++ b/files/ca/glossary/browser/index.html @@ -1,10 +1,11 @@ --- title: Navegador -slug: Glossary/Navegador +slug: Glossary/Browser tags: - Glossary - Navigation translation_of: Glossary/Browser +original_slug: Glossary/Navegador ---

Un navegador web és un programa que recupera i mostra les pàgines de la {{Glossary("World Wide Web","Web")}}, i permet als usuaris accedir a més pàgines a través {{Glossary("hyperlink","hipervincles")}}.

diff --git a/files/ca/glossary/character/index.html b/files/ca/glossary/character/index.html index 4c887673a2..957c03a534 100644 --- a/files/ca/glossary/character/index.html +++ b/files/ca/glossary/character/index.html @@ -1,11 +1,12 @@ --- title: Caràcter -slug: Glossary/Caràcter +slug: Glossary/Character tags: - CodingScripting - Glossary - strings translation_of: Glossary/Character +original_slug: Glossary/Caràcter ---

Un caràcter és o bé un símbol (lletres, nombres, puntuació) o "control" no imprès (per exemple, retorn de carro o guió suau). {{Glossary("UTF-8")}} és el conjunt de caràcters més comuna i inclou els grafemes dels idiomes humans més populars.

diff --git a/files/ca/glossary/character_encoding/index.html b/files/ca/glossary/character_encoding/index.html index 40179b5e89..15caec7d33 100644 --- a/files/ca/glossary/character_encoding/index.html +++ b/files/ca/glossary/character_encoding/index.html @@ -1,10 +1,11 @@ --- title: Codificació de caràcters -slug: Glossary/Codificació_de_caràcters +slug: Glossary/character_encoding tags: - Composing - Glossary translation_of: Glossary/character_encoding +original_slug: Glossary/Codificació_de_caràcters ---

La codificació de caràcters proporciona un sistema de codificació dels caràcters específics en els diferents idiomes, per permetre que tots ells existeixen i poguin ser manejats consistentment en un sistema informàtic o entorn de programació.

diff --git a/files/ca/glossary/function/index.html b/files/ca/glossary/function/index.html index d022b3196b..fa534958eb 100644 --- a/files/ca/glossary/function/index.html +++ b/files/ca/glossary/function/index.html @@ -1,6 +1,6 @@ --- title: Funció -slug: Glossary/Funció +slug: Glossary/Function tags: - CodingScripting - Glossary @@ -8,6 +8,7 @@ tags: - Immediately Invoked Function Expressions (IIFE) - JavaScript translation_of: Glossary/Function +original_slug: Glossary/Funció ---

Una funció és un fragment de codi que pot ser cridat per altres codis o per si mateix, o una {{Glossary("variable")}} que fa referència a la funció. Quan una funció es cridada, es passan {{Glossary("argument", "arguments")}} a la funció com a entrada, i opcionalment la funció pot retornar una sortida. Una funció de {{glossary("JavaScript")}} és també un {{glossary("objecte")}}.

diff --git a/files/ca/glossary/ip_address/index.html b/files/ca/glossary/ip_address/index.html index 8e855d55ac..67b49ef99f 100644 --- a/files/ca/glossary/ip_address/index.html +++ b/files/ca/glossary/ip_address/index.html @@ -1,12 +1,13 @@ --- title: adreça IP (IP address) -slug: Glossary/adreça_IP +slug: Glossary/IP_Address tags: - Beginner - Glossary - Infrastructure - Web translation_of: Glossary/IP_Address +original_slug: Glossary/adreça_IP ---

Una adreça IP (IP address) és un nombre assignat a cada dispositiu connectat a una xarxa que utilitza el protocol d'Internet.

diff --git a/files/ca/glossary/method/index.html b/files/ca/glossary/method/index.html index 65838733f8..da2077d87a 100644 --- a/files/ca/glossary/method/index.html +++ b/files/ca/glossary/method/index.html @@ -1,11 +1,12 @@ --- title: Mètode -slug: Glossary/Mètode +slug: Glossary/Method tags: - CodingScripting - Glossary - JavaScript translation_of: Glossary/Method +original_slug: Glossary/Mètode ---

Un mètode és una {{glossary("funció")}} que és {{glossary("propietat")}} d'un {{glossary("objecte")}}. Existeixen dos tipus de mètodes: Mètode Instància que estan incorporades en les tasques dutes a terme per una instància d'objecte, o Mètodes Estàtics que són tasques que es poden realitzar sense necessitat d'una instància d'objecte.

diff --git a/files/ca/glossary/object/index.html b/files/ca/glossary/object/index.html index 2688a42fed..09d2e7b145 100644 --- a/files/ca/glossary/object/index.html +++ b/files/ca/glossary/object/index.html @@ -1,12 +1,13 @@ --- title: Objecte -slug: Glossary/Objecte +slug: Glossary/Object tags: - CodingScripting - Glossary - Intro - Object translation_of: Glossary/Object +original_slug: Glossary/Objecte ---

Objecte, es refereix a una estructura de dades que conté dades i instruccions per treballar amb les dades. Els objectes a vegades es refereixen a les coses del món real, per exemple, un objecte cotxe o mapa en un joc de carreres. {{glossary("JavaScript")}}, Java, C ++, Python i Ruby són exemples de llenguatges de {{glossary("OOP", "programació orientada a objectes")}}.

diff --git a/files/ca/glossary/object_reference/index.html b/files/ca/glossary/object_reference/index.html index 1eca91862d..6cb976de0e 100644 --- a/files/ca/glossary/object_reference/index.html +++ b/files/ca/glossary/object_reference/index.html @@ -1,10 +1,11 @@ --- title: Referències a objectes -slug: Glossary/referències_a_objectes +slug: Glossary/Object_reference tags: - CodingScripting - Glossary translation_of: Glossary/Object_reference +original_slug: Glossary/referències_a_objectes ---

Un enllaç a un {{glossary("objecte")}}. Les referències a objectes poden usar-se exactament igual que els objectes vinculats.

diff --git a/files/ca/glossary/primitive/index.html b/files/ca/glossary/primitive/index.html index c0e1cd1ff3..3916313c36 100644 --- a/files/ca/glossary/primitive/index.html +++ b/files/ca/glossary/primitive/index.html @@ -1,11 +1,12 @@ --- title: Primitiu -slug: Glossary/Primitiu +slug: Glossary/Primitive tags: - CodingScripting - Glossary - JavaScript translation_of: Glossary/Primitive +original_slug: Glossary/Primitiu ---

Un primitiu (valor primitiu, tipus de dades primitiu) és una dada que no és un {{Glossary("objecte")}} i no té {{glossary("method","mètodes")}}. En {{Glossary("JavaScript")}}, hi ha 6 tipus de dades primitius: {{Glossary("string")}}, {{Glossary("number")}}, {{Glossary("boolean")}}, {{Glossary("null")}}, {{Glossary("undefined")}}, {{Glossary("symbol")}} (nou en {{Glossary("ECMAScript")}} 2015).

diff --git a/files/ca/glossary/property/index.html b/files/ca/glossary/property/index.html index a6b0970dd6..abe7a9ec32 100644 --- a/files/ca/glossary/property/index.html +++ b/files/ca/glossary/property/index.html @@ -1,10 +1,11 @@ --- title: Propietat -slug: Glossary/Propietat +slug: Glossary/property tags: - Disambiguation - Glossary translation_of: Glossary/property +original_slug: Glossary/Propietat ---

El terme propietat pot tenir diversos significats, depenent del context. Es pot fer referència a:

diff --git a/files/ca/glossary/scope/index.html b/files/ca/glossary/scope/index.html index 10707ada0b..a77a178a5c 100644 --- a/files/ca/glossary/scope/index.html +++ b/files/ca/glossary/scope/index.html @@ -1,10 +1,11 @@ --- title: Àmbit -slug: Glossary/Àmbit +slug: Glossary/Scope tags: - CodingScripting - Glossary translation_of: Glossary/Scope +original_slug: Glossary/Àmbit ---

El context actual d'{{glossary("execute","execució")}}. El context en el qual {{glossary("value","valors")}} i expressions són "visibles", o poden ser referenciats. Si una {{glossary("variable")}} o una altra expressió no és "en l'àmbit actual", llavors no està disponible per al seu ús. Els àmbits també es poden superposar en una jerarquia, de manera que els àmbits fills tinguin accés als àmbits dels pares, però no viceversa.

diff --git a/files/ca/glossary/server/index.html b/files/ca/glossary/server/index.html index cda9e7c3ea..c778694214 100644 --- a/files/ca/glossary/server/index.html +++ b/files/ca/glossary/server/index.html @@ -1,6 +1,6 @@ --- title: Servidor -slug: Glossary/Servidor +slug: Glossary/Server tags: - Glossary - Infrastructure @@ -8,6 +8,7 @@ tags: - Protocol - Server translation_of: Glossary/Server +original_slug: Glossary/Servidor ---

Un servidor de maquinari és un equip compartit en una xarxa que proporciona serveis a clients. Un servidor de programari és un programa que proporciona serveis als programes de client.

diff --git a/files/ca/glossary/speculative_parsing/index.html b/files/ca/glossary/speculative_parsing/index.html index df48dec4e3..97d763bd02 100644 --- a/files/ca/glossary/speculative_parsing/index.html +++ b/files/ca/glossary/speculative_parsing/index.html @@ -1,7 +1,8 @@ --- title: Optimizing your pages for speculative parsing -slug: Web/HTML/Optimizing_your_pages_for_speculative_parsing +slug: Glossary/speculative_parsing translation_of: Glossary/speculative_parsing +original_slug: Web/HTML/Optimizing_your_pages_for_speculative_parsing ---

Tradicionalment en els navegadors, el analitzador sintàctic d'HTML s'executa en el fil principal i s'ha bloquejat després d'una etiqueta </script> fins que l'script s'ha recuperat de la xarxa i s'executat. El analitzador sintàctic d'HTML en Firefox 4 i versions posteriors dóna suport a l'anàlisi especulativa fora del fil principal. A continuació s'analitza mentre que els scripts estan sent descarregats i s'executen. Com en Firefox 3.5 i 3.6, l'analitzador sintàctic d'HTML comença càrregues especulatives per als scripts, fulles d'estil i imatges que troba per davant en la seqüència. No obstant això, en Firefox 4 i posterior l'analitzador sintàctic d'HTML també executa l'algorisme de construcció de l'arbre HTML especulativament. L'avantatge és que quan una especulació èxit, no hi ha necessitat de reanàlisi de la part de l'arxiu d'entrada ja que va ser analitzat a la recerca de scripts, fulls d'estil i imatges. L'inconvenient és que hi ha més feina perduda quan l'especulació falla.

diff --git a/files/ca/glossary/tag/index.html b/files/ca/glossary/tag/index.html index e52b3f29a2..6b3860391e 100644 --- a/files/ca/glossary/tag/index.html +++ b/files/ca/glossary/tag/index.html @@ -1,12 +1,13 @@ --- title: Etiqueta -slug: Glossary/Etiqueta +slug: Glossary/Tag tags: - CodingScripting - Glossary - HTML - Intro translation_of: Glossary/Tag +original_slug: Glossary/Etiqueta ---

En {{Glossary("HTML")}} una etiqueta s'utilitza per a la creació d'un {{Glossary("element")}}. El nom d'un element HTML és el nom usat en parèntesis angulars, com <p> per al paràgraf. Recordeu que el nom de l'etiqueta final és precedit per un caràcter de barra, "</p>", i que en els elements buits l'etiqueta final no és necessària ni permesa. Si els atributs no s'esmenten, els valors per omissió s'utilitzen en cada cas.

diff --git a/files/ca/glossary/value/index.html b/files/ca/glossary/value/index.html index 972fd4303d..352c8c4be0 100644 --- a/files/ca/glossary/value/index.html +++ b/files/ca/glossary/value/index.html @@ -1,11 +1,12 @@ --- title: Valor -slug: Glossary/Valor +slug: Glossary/Value tags: - CodingScripting - Glossary - NeedsContent translation_of: Glossary/Value +original_slug: Glossary/Valor ---

En el context de les dades o un {{Glossary("Wrapper","contenidor")}} d'objectes al voltant d'aquestes dades, el valor és el {{Glossary("Primitive", "valor primitiu")}} que conté el contenidor d'objectes. En el context d'una {{Glossary("Variable","variable")}} or {{Glossary("Property","propietat")}}, el valor pot ser una primitiva o una {{Glossary("Object reference","referència d'objecte")}}.

diff --git a/files/ca/learn/accessibility/what_is_accessibility/index.html b/files/ca/learn/accessibility/what_is_accessibility/index.html index 6d8891a20c..5978594345 100644 --- a/files/ca/learn/accessibility/what_is_accessibility/index.html +++ b/files/ca/learn/accessibility/what_is_accessibility/index.html @@ -1,7 +1,8 @@ --- title: Què és l'accessibilitat? -slug: Learn/Accessibility/Que_es_accessibilitat +slug: Learn/Accessibility/What_is_accessibility translation_of: Learn/Accessibility/What_is_accessibility +original_slug: Learn/Accessibility/Que_es_accessibilitat ---
{{LearnSidebar}}
diff --git a/files/ca/learn/css/building_blocks/a_cool_looking_box/index.html b/files/ca/learn/css/building_blocks/a_cool_looking_box/index.html index 3a4df8a2b2..4a8e050221 100644 --- a/files/ca/learn/css/building_blocks/a_cool_looking_box/index.html +++ b/files/ca/learn/css/building_blocks/a_cool_looking_box/index.html @@ -1,6 +1,6 @@ --- title: Una caixa d'aspecte interessant -slug: Learn/CSS/Caixes_estil/Caixa_aspecte_interessant +slug: Learn/CSS/Building_blocks/A_cool_looking_box tags: - Assessment - Beginner @@ -12,6 +12,7 @@ tags: - box model - effects translation_of: Learn/CSS/Building_blocks/A_cool_looking_box +original_slug: Learn/CSS/Caixes_estil/Caixa_aspecte_interessant ---
{{LearnSidebar}}
diff --git a/files/ca/learn/css/building_blocks/backgrounds_and_borders/index.html b/files/ca/learn/css/building_blocks/backgrounds_and_borders/index.html index 2e2ce4727c..71da89b786 100644 --- a/files/ca/learn/css/building_blocks/backgrounds_and_borders/index.html +++ b/files/ca/learn/css/building_blocks/backgrounds_and_borders/index.html @@ -1,7 +1,8 @@ --- title: Fons i vores -slug: Learn/CSS/Building_blocks/Fons_i_vores +slug: Learn/CSS/Building_blocks/Backgrounds_and_borders translation_of: Learn/CSS/Building_blocks/Backgrounds_and_borders +original_slug: Learn/CSS/Building_blocks/Fons_i_vores ---
{{LearnSidebar}}{{PreviousMenuNext("Learn/CSS/Building_blocks/The_box_model", "Learn/CSS/Building_blocks/Handling_different_text_directions", "Learn/CSS/Building_blocks")}}
diff --git a/files/ca/learn/css/building_blocks/cascade_and_inheritance/index.html b/files/ca/learn/css/building_blocks/cascade_and_inheritance/index.html index 09a5e368eb..b99c93e29e 100644 --- a/files/ca/learn/css/building_blocks/cascade_and_inheritance/index.html +++ b/files/ca/learn/css/building_blocks/cascade_and_inheritance/index.html @@ -1,7 +1,8 @@ --- title: Cascada i herència -slug: Learn/CSS/Building_blocks/Cascada_i_herència +slug: Learn/CSS/Building_blocks/Cascade_and_inheritance translation_of: Learn/CSS/Building_blocks/Cascade_and_inheritance +original_slug: Learn/CSS/Building_blocks/Cascada_i_herència ---
{{LearnSidebar}}{{NextMenu("Learn/CSS/Building_blocks/Selectors", "Learn/CSS/Building_blocks")}}
diff --git a/files/ca/learn/css/building_blocks/creating_fancy_letterheaded_paper/index.html b/files/ca/learn/css/building_blocks/creating_fancy_letterheaded_paper/index.html index 2623d6d0dd..bf71948ffb 100644 --- a/files/ca/learn/css/building_blocks/creating_fancy_letterheaded_paper/index.html +++ b/files/ca/learn/css/building_blocks/creating_fancy_letterheaded_paper/index.html @@ -1,6 +1,6 @@ --- title: Creació d'una carta amb encapçalat de fantasia -slug: Learn/CSS/Caixes_estil/Creació_carta +slug: Learn/CSS/Building_blocks/Creating_fancy_letterheaded_paper tags: - Assessment - Background @@ -14,6 +14,7 @@ tags: - letterheaded - paper translation_of: Learn/CSS/Building_blocks/Creating_fancy_letterheaded_paper +original_slug: Learn/CSS/Caixes_estil/Creació_carta ---
{{LearnSidebar}}
diff --git a/files/ca/learn/css/building_blocks/debugging_css/index.html b/files/ca/learn/css/building_blocks/debugging_css/index.html index 273468969e..45bdbe5587 100644 --- a/files/ca/learn/css/building_blocks/debugging_css/index.html +++ b/files/ca/learn/css/building_blocks/debugging_css/index.html @@ -1,7 +1,8 @@ --- title: Depurar el CSS -slug: Learn/CSS/Building_blocks/Depurar_el_CSS +slug: Learn/CSS/Building_blocks/Debugging_CSS translation_of: Learn/CSS/Building_blocks/Debugging_CSS +original_slug: Learn/CSS/Building_blocks/Depurar_el_CSS ---
{{LearnSidebar}}{{PreviousMenuNext("Learn/CSS/Building_blocks/Styling_tables", "Learn/CSS/Building_blocks/Organizing", "Learn/CSS/Building_blocks")}}
diff --git a/files/ca/learn/css/building_blocks/fundamental_css_comprehension/index.html b/files/ca/learn/css/building_blocks/fundamental_css_comprehension/index.html index 34a654269a..ff288a91bb 100644 --- a/files/ca/learn/css/building_blocks/fundamental_css_comprehension/index.html +++ b/files/ca/learn/css/building_blocks/fundamental_css_comprehension/index.html @@ -1,6 +1,6 @@ --- title: Comprensió CSS fonamental -slug: Learn/CSS/Introducció_a_CSS/Comprensió_CSS_fonamental +slug: Learn/CSS/Building_blocks/Fundamental_CSS_comprehension tags: - Assessment - Beginner @@ -13,6 +13,7 @@ tags: - comments - rules translation_of: Learn/CSS/Building_blocks/Fundamental_CSS_comprehension +original_slug: Learn/CSS/Introducció_a_CSS/Comprensió_CSS_fonamental ---
{{LearnSidebar}}
diff --git a/files/ca/learn/css/building_blocks/overflowing_content/index.html b/files/ca/learn/css/building_blocks/overflowing_content/index.html index 2ee0dc6129..8f5b6e641d 100644 --- a/files/ca/learn/css/building_blocks/overflowing_content/index.html +++ b/files/ca/learn/css/building_blocks/overflowing_content/index.html @@ -1,7 +1,8 @@ --- title: Desbordament de contingut -slug: Learn/CSS/Building_blocks/Desbordament_de_contingut +slug: Learn/CSS/Building_blocks/Overflowing_content translation_of: Learn/CSS/Building_blocks/Overflowing_content +original_slug: Learn/CSS/Building_blocks/Desbordament_de_contingut ---
{{LearnSidebar}}{{PreviousMenuNext("Learn/CSS/Building_blocks/Handling_different_text_directions", "Learn/CSS/Building_blocks/Values_and_units", "Learn/CSS/Building_blocks")}}
diff --git a/files/ca/learn/css/building_blocks/selectors/attribute_selectors/index.html b/files/ca/learn/css/building_blocks/selectors/attribute_selectors/index.html index 6ab61828f8..2039eda428 100644 --- a/files/ca/learn/css/building_blocks/selectors/attribute_selectors/index.html +++ b/files/ca/learn/css/building_blocks/selectors/attribute_selectors/index.html @@ -1,7 +1,8 @@ --- title: Selectors d'atribut -slug: Learn/CSS/Building_blocks/Selectors_CSS/Selectors_atribut +slug: Learn/CSS/Building_blocks/Selectors/Attribute_selectors translation_of: Learn/CSS/Building_blocks/Selectors/Attribute_selectors +original_slug: Learn/CSS/Building_blocks/Selectors_CSS/Selectors_atribut ---

{{LearnSidebar}}{{PreviousMenuNext("Learn/CSS/Building_blocks/Selectors/Type_Class_and_ID_Selectors", "Learn/CSS/Building_blocks/Selectors/Pseudo-classes_and_pseudo-elements", "Learn/CSS/Building_blocks")}}

diff --git a/files/ca/learn/css/building_blocks/selectors/combinators/index.html b/files/ca/learn/css/building_blocks/selectors/combinators/index.html index 175379f986..1806678d4a 100644 --- a/files/ca/learn/css/building_blocks/selectors/combinators/index.html +++ b/files/ca/learn/css/building_blocks/selectors/combinators/index.html @@ -1,7 +1,8 @@ --- title: Combinadors -slug: Learn/CSS/Building_blocks/Selectors_CSS/Combinadors +slug: Learn/CSS/Building_blocks/Selectors/Combinators translation_of: Learn/CSS/Building_blocks/Selectors/Combinators +original_slug: Learn/CSS/Building_blocks/Selectors_CSS/Combinadors ---

{{LearnSidebar}}{{PreviousMenuNext("Learn/CSS/Building_blocks/Selectors/Pseudo-classes_and_pseudo-elements", "Learn/CSS/Building_blocks/The_box_model", "Learn/CSS/Building_blocks")}}

diff --git a/files/ca/learn/css/building_blocks/selectors/index.html b/files/ca/learn/css/building_blocks/selectors/index.html index 4bd7b005de..e58dd3cf92 100644 --- a/files/ca/learn/css/building_blocks/selectors/index.html +++ b/files/ca/learn/css/building_blocks/selectors/index.html @@ -1,7 +1,8 @@ --- title: Selectors CSS -slug: Learn/CSS/Building_blocks/Selectors_CSS +slug: Learn/CSS/Building_blocks/Selectors translation_of: Learn/CSS/Building_blocks/Selectors +original_slug: Learn/CSS/Building_blocks/Selectors_CSS ---
{{LearnSidebar}}{{PreviousMenuNext("Learn/CSS/Building_blocks/Cascade_and_inheritance", "Learn/CSS/Building_blocks/Selectors/Type_Class_and_ID_Selectors", "Learn/CSS/Building_blocks")}}
diff --git a/files/ca/learn/css/building_blocks/selectors/pseudo-classes_and_pseudo-elements/index.html b/files/ca/learn/css/building_blocks/selectors/pseudo-classes_and_pseudo-elements/index.html index b28cb4873a..b9ecc0a3be 100644 --- a/files/ca/learn/css/building_blocks/selectors/pseudo-classes_and_pseudo-elements/index.html +++ b/files/ca/learn/css/building_blocks/selectors/pseudo-classes_and_pseudo-elements/index.html @@ -1,7 +1,8 @@ --- title: Pseudoclasses i pseudoelements -slug: Learn/CSS/Building_blocks/Selectors_CSS/Pseudo-classes_and_pseudo-elements +slug: Learn/CSS/Building_blocks/Selectors/Pseudo-classes_and_pseudo-elements translation_of: Learn/CSS/Building_blocks/Selectors/Pseudo-classes_and_pseudo-elements +original_slug: Learn/CSS/Building_blocks/Selectors_CSS/Pseudo-classes_and_pseudo-elements ---

{{LearnSidebar}}{{PreviousMenuNext("Learn/CSS/Building_blocks/Selectors/Attribute_selectors", "Learn/CSS/Building_blocks/Selectors/Combinators", "Learn/CSS/Building_blocks")}}

diff --git a/files/ca/learn/css/building_blocks/selectors/type_class_and_id_selectors/index.html b/files/ca/learn/css/building_blocks/selectors/type_class_and_id_selectors/index.html index 2cdbdc244a..8eaf6cf50e 100644 --- a/files/ca/learn/css/building_blocks/selectors/type_class_and_id_selectors/index.html +++ b/files/ca/learn/css/building_blocks/selectors/type_class_and_id_selectors/index.html @@ -1,7 +1,8 @@ --- -title: 'Selectors de tipus, classe i ID' -slug: Learn/CSS/Building_blocks/Selectors_CSS/Selectors_de_tipus_classe_i_ID +title: Selectors de tipus, classe i ID +slug: Learn/CSS/Building_blocks/Selectors/Type_Class_and_ID_Selectors translation_of: Learn/CSS/Building_blocks/Selectors/Type_Class_and_ID_Selectors +original_slug: Learn/CSS/Building_blocks/Selectors_CSS/Selectors_de_tipus_classe_i_ID ---

{{LearnSidebar}}{{PreviousMenuNext("Learn/CSS/Building_blocks/Selectors", "Learn/CSS/Building_blocks/Selectors/Attribute_selectors", "Learn/CSS/Building_blocks")}}

diff --git a/files/ca/learn/css/building_blocks/sizing_items_in_css/index.html b/files/ca/learn/css/building_blocks/sizing_items_in_css/index.html index 5ff34b8d93..36a1ed3a18 100644 --- a/files/ca/learn/css/building_blocks/sizing_items_in_css/index.html +++ b/files/ca/learn/css/building_blocks/sizing_items_in_css/index.html @@ -1,7 +1,8 @@ --- title: Dimensionar elements en CSS -slug: Learn/CSS/Building_blocks/Dimensionar_elements_en_CSS +slug: Learn/CSS/Building_blocks/Sizing_items_in_CSS translation_of: Learn/CSS/Building_blocks/Sizing_items_in_CSS +original_slug: Learn/CSS/Building_blocks/Dimensionar_elements_en_CSS ---
{{LearnSidebar}}{{PreviousMenuNext("Learn/CSS/Building_blocks/Values_and_units", "Learn/CSS/Building_blocks/Images_media_form_elements", "Learn/CSS/Building_blocks")}}
diff --git a/files/ca/learn/css/building_blocks/values_and_units/index.html b/files/ca/learn/css/building_blocks/values_and_units/index.html index b754bd27ac..12ec749f01 100644 --- a/files/ca/learn/css/building_blocks/values_and_units/index.html +++ b/files/ca/learn/css/building_blocks/values_and_units/index.html @@ -1,7 +1,8 @@ --- title: Valors i unitats CSS -slug: Learn/CSS/Building_blocks/Valors_i_unitats_CSS +slug: Learn/CSS/Building_blocks/Values_and_units translation_of: Learn/CSS/Building_blocks/Values_and_units +original_slug: Learn/CSS/Building_blocks/Valors_i_unitats_CSS ---
{{LearnSidebar}}{{PreviousMenuNext("Learn/CSS/Building_blocks/Overflowing_content", "Learn/CSS/Building_blocks/Sizing_items_in_CSS", "Learn/CSS/Building_blocks")}}
diff --git a/files/ca/learn/css/css_layout/flexbox/index.html b/files/ca/learn/css/css_layout/flexbox/index.html index 37f31f619b..f16e4bec67 100644 --- a/files/ca/learn/css/css_layout/flexbox/index.html +++ b/files/ca/learn/css/css_layout/flexbox/index.html @@ -1,6 +1,6 @@ --- title: Flexbox -slug: Learn/CSS/Disseny_CSS/Flexbox +slug: Learn/CSS/CSS_layout/Flexbox tags: - Article - Beginner @@ -14,6 +14,7 @@ tags: - Learn - flexbox translation_of: Learn/CSS/CSS_layout/Flexbox +original_slug: Learn/CSS/Disseny_CSS/Flexbox ---
{{LearnSidebar}}
diff --git a/files/ca/learn/css/css_layout/floats/index.html b/files/ca/learn/css/css_layout/floats/index.html index 25d2fe01a6..36d5e17da5 100644 --- a/files/ca/learn/css/css_layout/floats/index.html +++ b/files/ca/learn/css/css_layout/floats/index.html @@ -1,6 +1,6 @@ --- title: Flotadors (Floats) -slug: Learn/CSS/Disseny_CSS/Flotadors +slug: Learn/CSS/CSS_layout/Floats tags: - Article - Beginner @@ -13,6 +13,7 @@ tags: - columns - multi-column translation_of: Learn/CSS/CSS_layout/Floats +original_slug: Learn/CSS/Disseny_CSS/Flotadors ---
{{LearnSidebar}}
diff --git a/files/ca/learn/css/css_layout/grids/index.html b/files/ca/learn/css/css_layout/grids/index.html index af97c6f989..98cf560583 100644 --- a/files/ca/learn/css/css_layout/grids/index.html +++ b/files/ca/learn/css/css_layout/grids/index.html @@ -1,6 +1,6 @@ --- title: Graelles (Grids) -slug: Learn/CSS/Disseny_CSS/Graelles +slug: Learn/CSS/CSS_layout/Grids tags: - Article - Beginner @@ -16,6 +16,7 @@ tags: - grid framework - grid system translation_of: Learn/CSS/CSS_layout/Grids +original_slug: Learn/CSS/Disseny_CSS/Graelles ---
{{LearnSidebar}}
diff --git a/files/ca/learn/css/css_layout/index.html b/files/ca/learn/css/css_layout/index.html index e74e5da0b9..408d33bd80 100644 --- a/files/ca/learn/css/css_layout/index.html +++ b/files/ca/learn/css/css_layout/index.html @@ -1,6 +1,6 @@ --- title: Disseny CSS -slug: Learn/CSS/Disseny_CSS +slug: Learn/CSS/CSS_layout tags: - Beginner - CSS @@ -16,6 +16,7 @@ tags: - flexbox - float translation_of: Learn/CSS/CSS_layout +original_slug: Learn/CSS/Disseny_CSS ---
{{LearnSidebar}}
diff --git a/files/ca/learn/css/css_layout/introduction/index.html b/files/ca/learn/css/css_layout/introduction/index.html index 88a924dc00..c14622da8f 100644 --- a/files/ca/learn/css/css_layout/introduction/index.html +++ b/files/ca/learn/css/css_layout/introduction/index.html @@ -1,6 +1,6 @@ --- title: Introducció al disseny CSS -slug: Learn/CSS/Disseny_CSS/Introduccio_disseny_CSS +slug: Learn/CSS/CSS_layout/Introduction tags: - Article - Beginner @@ -15,6 +15,7 @@ tags: - flexbox - flow translation_of: Learn/CSS/CSS_layout/Introduction +original_slug: Learn/CSS/Disseny_CSS/Introduccio_disseny_CSS ---
{{LearnSidebar}}
diff --git a/files/ca/learn/css/css_layout/normal_flow/index.html b/files/ca/learn/css/css_layout/normal_flow/index.html index ac44f6a95a..afa52896d8 100644 --- a/files/ca/learn/css/css_layout/normal_flow/index.html +++ b/files/ca/learn/css/css_layout/normal_flow/index.html @@ -1,7 +1,8 @@ --- title: Flux normal -slug: Learn/CSS/Disseny_CSS/Flux_normal +slug: Learn/CSS/CSS_layout/Normal_Flow translation_of: Learn/CSS/CSS_layout/Normal_Flow +original_slug: Learn/CSS/Disseny_CSS/Flux_normal ---
{{LearnSidebar}}
diff --git a/files/ca/learn/css/css_layout/positioning/index.html b/files/ca/learn/css/css_layout/positioning/index.html index 213293ff4e..154d8fabac 100644 --- a/files/ca/learn/css/css_layout/positioning/index.html +++ b/files/ca/learn/css/css_layout/positioning/index.html @@ -1,6 +1,6 @@ --- title: Posicionament -slug: Learn/CSS/Disseny_CSS/Posicionament +slug: Learn/CSS/CSS_layout/Positioning tags: - Article - Beginner @@ -13,6 +13,7 @@ tags: - fixed - relative translation_of: Learn/CSS/CSS_layout/Positioning +original_slug: Learn/CSS/Disseny_CSS/Posicionament ---
{{LearnSidebar}}
diff --git a/files/ca/learn/css/css_layout/practical_positioning_examples/index.html b/files/ca/learn/css/css_layout/practical_positioning_examples/index.html index dfaac7f63c..036cb5d308 100644 --- a/files/ca/learn/css/css_layout/practical_positioning_examples/index.html +++ b/files/ca/learn/css/css_layout/practical_positioning_examples/index.html @@ -1,6 +1,6 @@ --- title: Exemples pràctics de posicionament -slug: Learn/CSS/Disseny_CSS/Exemples_pràctics_posicionament +slug: Learn/CSS/CSS_layout/Practical_positioning_examples tags: - Article - Beginner @@ -13,6 +13,7 @@ tags: - fixed - relative translation_of: Learn/CSS/CSS_layout/Practical_positioning_examples +original_slug: Learn/CSS/Disseny_CSS/Exemples_pràctics_posicionament ---
{{LearnSidebar}}
diff --git a/files/ca/learn/css/css_layout/responsive_design/index.html b/files/ca/learn/css/css_layout/responsive_design/index.html index 5bf909e6e7..b8f0011edd 100644 --- a/files/ca/learn/css/css_layout/responsive_design/index.html +++ b/files/ca/learn/css/css_layout/responsive_design/index.html @@ -1,7 +1,8 @@ --- title: Disseny responsiu -slug: Learn/CSS/Disseny_CSS/Disseny_responsiu +slug: Learn/CSS/CSS_layout/Responsive_Design translation_of: Learn/CSS/CSS_layout/Responsive_Design +original_slug: Learn/CSS/Disseny_CSS/Disseny_responsiu ---
{{learnsidebar}}{{PreviousMenuNext("Learn/CSS/CSS_layout/Multiple-column_Layout", "Learn/CSS/CSS_layout/Media_queries", "Learn/CSS/CSS_layout")}}
diff --git a/files/ca/learn/css/css_layout/supporting_older_browsers/index.html b/files/ca/learn/css/css_layout/supporting_older_browsers/index.html index 5a689b6437..e5ee4a703c 100644 --- a/files/ca/learn/css/css_layout/supporting_older_browsers/index.html +++ b/files/ca/learn/css/css_layout/supporting_older_browsers/index.html @@ -1,7 +1,8 @@ --- title: Suport en navegadors antics -slug: Learn/CSS/Disseny_CSS/Suport_en_navegadors_antics +slug: Learn/CSS/CSS_layout/Supporting_Older_Browsers translation_of: Learn/CSS/CSS_layout/Supporting_Older_Browsers +original_slug: Learn/CSS/Disseny_CSS/Suport_en_navegadors_antics ---
{{LearnSidebar}}
diff --git a/files/ca/learn/css/first_steps/getting_started/index.html b/files/ca/learn/css/first_steps/getting_started/index.html index dfc1ae29b3..555dc4f0cd 100644 --- a/files/ca/learn/css/first_steps/getting_started/index.html +++ b/files/ca/learn/css/first_steps/getting_started/index.html @@ -1,7 +1,8 @@ --- title: Com començar amb CSS -slug: Learn/CSS/First_steps/Com_començar_amb_CSS +slug: Learn/CSS/First_steps/Getting_started translation_of: Learn/CSS/First_steps/Getting_started +original_slug: Learn/CSS/First_steps/Com_començar_amb_CSS ---
{{LearnSidebar}}
diff --git a/files/ca/learn/css/first_steps/how_css_is_structured/index.html b/files/ca/learn/css/first_steps/how_css_is_structured/index.html index 6c216af68c..afe4804394 100644 --- a/files/ca/learn/css/first_steps/how_css_is_structured/index.html +++ b/files/ca/learn/css/first_steps/how_css_is_structured/index.html @@ -1,7 +1,8 @@ --- title: Com estructurar el CSS -slug: Learn/CSS/First_steps/Com_estructurar_el_CSS +slug: Learn/CSS/First_steps/How_CSS_is_structured translation_of: Learn/CSS/First_steps/How_CSS_is_structured +original_slug: Learn/CSS/First_steps/Com_estructurar_el_CSS ---
{{LearnSidebar}}
diff --git a/files/ca/learn/css/first_steps/how_css_works/index.html b/files/ca/learn/css/first_steps/how_css_works/index.html index 9621d2c21c..24727cbdf8 100644 --- a/files/ca/learn/css/first_steps/how_css_works/index.html +++ b/files/ca/learn/css/first_steps/how_css_works/index.html @@ -1,7 +1,8 @@ --- title: Com funciona el CSS -slug: Learn/CSS/First_steps/Com_funciona_el_CSS +slug: Learn/CSS/First_steps/How_CSS_works translation_of: Learn/CSS/First_steps/How_CSS_works +original_slug: Learn/CSS/First_steps/Com_funciona_el_CSS ---

{{LearnSidebar}}
{{PreviousMenuNext("Learn/CSS/First_steps/How_CSS_is_structured", "Learn/CSS/First_steps/Using_your_new_knowledge", "Learn/CSS/First_steps")}}

diff --git a/files/ca/learn/css/first_steps/what_is_css/index.html b/files/ca/learn/css/first_steps/what_is_css/index.html index b158b8e62e..e1817bb73c 100644 --- a/files/ca/learn/css/first_steps/what_is_css/index.html +++ b/files/ca/learn/css/first_steps/what_is_css/index.html @@ -1,7 +1,8 @@ --- title: Què és el CSS? -slug: Learn/CSS/First_steps/Que_es_el_CSS +slug: Learn/CSS/First_steps/What_is_CSS translation_of: Learn/CSS/First_steps/What_is_CSS +original_slug: Learn/CSS/First_steps/Que_es_el_CSS ---
{{LearnSidebar}}
diff --git a/files/ca/learn/css/styling_text/fundamentals/index.html b/files/ca/learn/css/styling_text/fundamentals/index.html index e258171ffc..2d8295df54 100644 --- a/files/ca/learn/css/styling_text/fundamentals/index.html +++ b/files/ca/learn/css/styling_text/fundamentals/index.html @@ -1,6 +1,6 @@ --- title: Text fonamental i estil de font -slug: Learn/CSS/Estilitzar_text/Text_fonamental +slug: Learn/CSS/Styling_text/Fundamentals tags: - Article - Beginner @@ -15,6 +15,7 @@ tags: - spacing - weight translation_of: Learn/CSS/Styling_text/Fundamentals +original_slug: Learn/CSS/Estilitzar_text/Text_fonamental ---
{{LearnSidebar}}
diff --git a/files/ca/learn/css/styling_text/index.html b/files/ca/learn/css/styling_text/index.html index c815d83297..39ad209939 100644 --- a/files/ca/learn/css/styling_text/index.html +++ b/files/ca/learn/css/styling_text/index.html @@ -1,6 +1,6 @@ --- title: Estilitzar text -slug: Learn/CSS/Estilitzar_text +slug: Learn/CSS/Styling_text tags: - Beginner - CSS @@ -17,6 +17,7 @@ tags: - shadow - web fonts translation_of: Learn/CSS/Styling_text +original_slug: Learn/CSS/Estilitzar_text ---
{{LearnSidebar}}
diff --git a/files/ca/learn/css/styling_text/styling_links/index.html b/files/ca/learn/css/styling_text/styling_links/index.html index 448a53289d..9ab78597b2 100644 --- a/files/ca/learn/css/styling_text/styling_links/index.html +++ b/files/ca/learn/css/styling_text/styling_links/index.html @@ -1,7 +1,8 @@ --- title: Aplicar estils a enllaços -slug: Learn/CSS/Estilitzar_text/Estilitzar_enllaços +slug: Learn/CSS/Styling_text/Styling_links translation_of: Learn/CSS/Styling_text/Styling_links +original_slug: Learn/CSS/Estilitzar_text/Estilitzar_enllaços ---
{{LearnSidebar}}
diff --git a/files/ca/learn/css/styling_text/styling_lists/index.html b/files/ca/learn/css/styling_text/styling_lists/index.html index 6caa6e0e24..8ea4d15476 100644 --- a/files/ca/learn/css/styling_text/styling_lists/index.html +++ b/files/ca/learn/css/styling_text/styling_lists/index.html @@ -1,6 +1,6 @@ --- title: Estils de llistes -slug: Learn/CSS/Estilitzar_text/Llistes_estil +slug: Learn/CSS/Styling_text/Styling_lists tags: - Article - Beginner @@ -11,6 +11,7 @@ tags: - bullets - lists translation_of: Learn/CSS/Styling_text/Styling_lists +original_slug: Learn/CSS/Estilitzar_text/Llistes_estil ---
{{LearnSidebar}}
diff --git a/files/ca/learn/css/styling_text/typesetting_a_homepage/index.html b/files/ca/learn/css/styling_text/typesetting_a_homepage/index.html index 2619be67e7..48c4955f34 100644 --- a/files/ca/learn/css/styling_text/typesetting_a_homepage/index.html +++ b/files/ca/learn/css/styling_text/typesetting_a_homepage/index.html @@ -1,6 +1,6 @@ --- title: Composició d'una pàgina d'inici de l'escola comunitaria -slug: Learn/CSS/Estilitzar_text/Composició_pàgina_inici +slug: Learn/CSS/Styling_text/Typesetting_a_homepage tags: - Assessment - Beginner @@ -12,6 +12,7 @@ tags: - list - web font translation_of: Learn/CSS/Styling_text/Typesetting_a_homepage +original_slug: Learn/CSS/Estilitzar_text/Composició_pàgina_inici ---
{{LearnSidebar}}
diff --git a/files/ca/learn/css/styling_text/web_fonts/index.html b/files/ca/learn/css/styling_text/web_fonts/index.html index b4d1e8ecfd..beba582471 100644 --- a/files/ca/learn/css/styling_text/web_fonts/index.html +++ b/files/ca/learn/css/styling_text/web_fonts/index.html @@ -1,6 +1,6 @@ --- title: Fonts Web -slug: Learn/CSS/Estilitzar_text/Fonts_Web +slug: Learn/CSS/Styling_text/Web_fonts tags: - '@font-face' - Article @@ -12,6 +12,7 @@ tags: - font-family - web fonts translation_of: Learn/CSS/Styling_text/Web_fonts +original_slug: Learn/CSS/Estilitzar_text/Fonts_Web ---
{{LearnSidebar}}
diff --git a/files/ca/learn/forms/basic_native_form_controls/index.html b/files/ca/learn/forms/basic_native_form_controls/index.html index 73ee2a9249..4cc3b868b6 100644 --- a/files/ca/learn/forms/basic_native_form_controls/index.html +++ b/files/ca/learn/forms/basic_native_form_controls/index.html @@ -1,7 +1,8 @@ --- title: Controls de formulari originals -slug: Learn/HTML/Forms/Controls_de_formulari_originals +slug: Learn/Forms/Basic_native_form_controls translation_of: Learn/Forms/Basic_native_form_controls +original_slug: Learn/HTML/Forms/Controls_de_formulari_originals ---
{{LearnSidebar}}
diff --git a/files/ca/learn/forms/form_validation/index.html b/files/ca/learn/forms/form_validation/index.html index 0b76183d7e..7d5b432e1c 100644 --- a/files/ca/learn/forms/form_validation/index.html +++ b/files/ca/learn/forms/form_validation/index.html @@ -1,7 +1,8 @@ --- title: Validació de formularis del costat del client -slug: Learn/HTML/Forms/Validacio_formularis +slug: Learn/Forms/Form_validation translation_of: Learn/Forms/Form_validation +original_slug: Learn/HTML/Forms/Validacio_formularis ---
{{LearnSidebar}}
diff --git a/files/ca/learn/forms/how_to_structure_a_web_form/index.html b/files/ca/learn/forms/how_to_structure_a_web_form/index.html index c0cb1e022c..6ba3fe8f1c 100644 --- a/files/ca/learn/forms/how_to_structure_a_web_form/index.html +++ b/files/ca/learn/forms/how_to_structure_a_web_form/index.html @@ -1,7 +1,8 @@ --- title: Com estructurar un formulari web -slug: Learn/HTML/Forms/Com_estructurar_un_formulari_web +slug: Learn/Forms/How_to_structure_a_web_form translation_of: Learn/Forms/How_to_structure_a_web_form +original_slug: Learn/HTML/Forms/Com_estructurar_un_formulari_web ---
{{LearnSidebar}}
diff --git a/files/ca/learn/forms/index.html b/files/ca/learn/forms/index.html index bfd01dcf91..964d71c754 100644 --- a/files/ca/learn/forms/index.html +++ b/files/ca/learn/forms/index.html @@ -1,6 +1,6 @@ --- title: HTML forms guide -slug: Learn/HTML/Forms +slug: Learn/Forms tags: - Featured - Formularis @@ -8,6 +8,7 @@ tags: - HTML - Web translation_of: Learn/Forms +original_slug: Learn/HTML/Forms ---

Aquesta guia és una sèrie d'articles que l'ajudaran a dominar els formularis HTML. Els formularis HTML són una eina molt potent per interactuar amb els usuaris; No obstant això, per raons històriques i tècniques, no sempre és obvi com usar-los al seu màxim potencial. En aquesta guia, anem a cobrir tots els aspectes dels formularis HTML, des de donar estil a l'estructura, des de la manipulació de dades amb components personalitzats. Aprendràs a gaudir de la gran potència que ofereixen!

diff --git a/files/ca/learn/forms/your_first_form/index.html b/files/ca/learn/forms/your_first_form/index.html index 3f327d4494..95e79c8da4 100644 --- a/files/ca/learn/forms/your_first_form/index.html +++ b/files/ca/learn/forms/your_first_form/index.html @@ -1,7 +1,8 @@ --- title: El teu primer formulari -slug: Learn/HTML/Forms/El_teu_primer_formulari +slug: Learn/Forms/Your_first_form translation_of: Learn/Forms/Your_first_form +original_slug: Learn/HTML/Forms/El_teu_primer_formulari ---
{{LearnSidebar}}{{NextMenu("Learn/Forms/How_to_structure_a_web_form", "Learn/Forms")}}
diff --git a/files/ca/learn/getting_started_with_the_web/css_basics/index.html b/files/ca/learn/getting_started_with_the_web/css_basics/index.html index 991a20ca78..92ab165fad 100644 --- a/files/ca/learn/getting_started_with_the_web/css_basics/index.html +++ b/files/ca/learn/getting_started_with_the_web/css_basics/index.html @@ -1,6 +1,6 @@ --- title: CSS bàsic -slug: Learn/Getting_started_with_the_web/CSS_bàsic +slug: Learn/Getting_started_with_the_web/CSS_basics tags: - Beginner - CSS @@ -8,8 +8,9 @@ tags: - Learn - Styling - Web - - 'l10n:priority' + - l10n:priority translation_of: Learn/Getting_started_with_the_web/CSS_basics +original_slug: Learn/Getting_started_with_the_web/CSS_bàsic ---
{{LearnSidebar}}
diff --git a/files/ca/learn/getting_started_with_the_web/dealing_with_files/index.html b/files/ca/learn/getting_started_with_the_web/dealing_with_files/index.html index 0ba94d3273..491e11badc 100644 --- a/files/ca/learn/getting_started_with_the_web/dealing_with_files/index.html +++ b/files/ca/learn/getting_started_with_the_web/dealing_with_files/index.html @@ -1,16 +1,17 @@ --- title: Tractar amb arxius -slug: Learn/Getting_started_with_the_web/Tractar_amb_arxius +slug: Learn/Getting_started_with_the_web/Dealing_with_files tags: - Beginner - CodingScripting - Files - Guide - HTML - - 'l10n:priority' + - l10n:priority - theory - website translation_of: Learn/Getting_started_with_the_web/Dealing_with_files +original_slug: Learn/Getting_started_with_the_web/Tractar_amb_arxius ---
{{LearnSidebar}}
diff --git a/files/ca/learn/getting_started_with_the_web/how_the_web_works/index.html b/files/ca/learn/getting_started_with_the_web/how_the_web_works/index.html index 4a36fb2bff..27677a7d4f 100644 --- a/files/ca/learn/getting_started_with_the_web/how_the_web_works/index.html +++ b/files/ca/learn/getting_started_with_the_web/how_the_web_works/index.html @@ -1,6 +1,6 @@ --- title: Com funciona la Web -slug: Learn/Getting_started_with_the_web/Com_funciona_Web +slug: Learn/Getting_started_with_the_web/How_the_Web_works tags: - Beginner - Client @@ -11,8 +11,9 @@ tags: - Learn - Server - TCP - - 'l10n:priority' + - l10n:priority translation_of: Learn/Getting_started_with_the_web/How_the_Web_works +original_slug: Learn/Getting_started_with_the_web/Com_funciona_Web ---
{{LearnSidebar}}
diff --git a/files/ca/learn/getting_started_with_the_web/installing_basic_software/index.html b/files/ca/learn/getting_started_with_the_web/installing_basic_software/index.html index aa431f3199..4b52f765ee 100644 --- a/files/ca/learn/getting_started_with_the_web/installing_basic_software/index.html +++ b/files/ca/learn/getting_started_with_the_web/installing_basic_software/index.html @@ -1,6 +1,6 @@ --- title: Instal·lació bàsica del programari -slug: Learn/Getting_started_with_the_web/Instal·lació_bàsica_programari +slug: Learn/Getting_started_with_the_web/Installing_basic_software tags: - Beginner - Browser @@ -8,9 +8,10 @@ tags: - Setup - Tools - WebMechanics - - 'l10n:priority' + - l10n:priority - text editor translation_of: Learn/Getting_started_with_the_web/Installing_basic_software +original_slug: Learn/Getting_started_with_the_web/Instal·lació_bàsica_programari ---
{{LearnSidebar}}
diff --git a/files/ca/learn/getting_started_with_the_web/javascript_basics/index.html b/files/ca/learn/getting_started_with_the_web/javascript_basics/index.html index e9b90830ca..8ba4dacd4b 100644 --- a/files/ca/learn/getting_started_with_the_web/javascript_basics/index.html +++ b/files/ca/learn/getting_started_with_the_web/javascript_basics/index.html @@ -1,14 +1,15 @@ --- title: JavaScript bàsic -slug: Learn/Getting_started_with_the_web/JavaScript_bàsic +slug: Learn/Getting_started_with_the_web/JavaScript_basics tags: - Beginner - CodingScripting - JavaScript - Learn - Web - - 'l10n:priority' + - l10n:priority translation_of: Learn/Getting_started_with_the_web/JavaScript_basics +original_slug: Learn/Getting_started_with_the_web/JavaScript_bàsic ---
{{LearnSidebar}}
diff --git a/files/ca/learn/getting_started_with_the_web/publishing_your_website/index.html b/files/ca/learn/getting_started_with_the_web/publishing_your_website/index.html index 0329bbfcd0..9999acba6b 100644 --- a/files/ca/learn/getting_started_with_the_web/publishing_your_website/index.html +++ b/files/ca/learn/getting_started_with_the_web/publishing_your_website/index.html @@ -1,6 +1,6 @@ --- title: Publicar el nostre lloc web -slug: Learn/Getting_started_with_the_web/Publicar_nostre_lloc_web +slug: Learn/Getting_started_with_the_web/Publishing_your_website tags: - Beginner - CodingScripting @@ -9,10 +9,11 @@ tags: - Google App Engine - Learn - Web - - 'l10n:priority' + - l10n:priority - publishing - web server translation_of: Learn/Getting_started_with_the_web/Publishing_your_website +original_slug: Learn/Getting_started_with_the_web/Publicar_nostre_lloc_web ---
{{LearnSidebar}}
diff --git a/files/ca/learn/getting_started_with_the_web/what_will_your_website_look_like/index.html b/files/ca/learn/getting_started_with_the_web/what_will_your_website_look_like/index.html index a7e5ef4b2c..733e6aec2e 100644 --- a/files/ca/learn/getting_started_with_the_web/what_will_your_website_look_like/index.html +++ b/files/ca/learn/getting_started_with_the_web/what_will_your_website_look_like/index.html @@ -1,6 +1,6 @@ --- title: Quin aspecte tindrà el vostre lloc web? -slug: Learn/Getting_started_with_the_web/Quin_aspecte_tindrà_vostre_lloc_web +slug: Learn/Getting_started_with_the_web/What_will_your_website_look_like tags: - Assets - Beginner @@ -10,8 +10,9 @@ tags: - Fonts - Learn - Plan - - 'l10n:priority' + - l10n:priority translation_of: Learn/Getting_started_with_the_web/What_will_your_website_look_like +original_slug: Learn/Getting_started_with_the_web/Quin_aspecte_tindrà_vostre_lloc_web ---
{{LearnSidebar}}
diff --git a/files/ca/learn/html/howto/author_fast-loading_html_pages/index.html b/files/ca/learn/html/howto/author_fast-loading_html_pages/index.html index 6c683a8156..09e45b6131 100644 --- a/files/ca/learn/html/howto/author_fast-loading_html_pages/index.html +++ b/files/ca/learn/html/howto/author_fast-loading_html_pages/index.html @@ -1,6 +1,6 @@ --- title: Consells per crear pàgines HTML de càrrega ràpida -slug: Web/Guide/HTML/_Consells_per_crear_pàgines_HTML_de_càrrega_ràpida +slug: Learn/HTML/Howto/Author_fast-loading_HTML_pages tags: - Advanced - Guide @@ -9,6 +9,7 @@ tags: - Performance - Web translation_of: Learn/HTML/Howto/Author_fast-loading_HTML_pages +original_slug: Web/Guide/HTML/_Consells_per_crear_pàgines_HTML_de_càrrega_ràpida ---

Aquests consells es basen en el coneixement i l'experimentació comuna.

diff --git a/files/ca/learn/html/introduction_to_html/advanced_text_formatting/index.html b/files/ca/learn/html/introduction_to_html/advanced_text_formatting/index.html index 8163f0b4c3..4e48058397 100644 --- a/files/ca/learn/html/introduction_to_html/advanced_text_formatting/index.html +++ b/files/ca/learn/html/introduction_to_html/advanced_text_formatting/index.html @@ -1,6 +1,6 @@ --- title: Format de text avançat -slug: Learn/HTML/Introducció_al_HTML/Format_de_text_avançat +slug: Learn/HTML/Introduction_to_HTML/Advanced_text_formatting tags: - Beginner - CodingScripting @@ -13,6 +13,7 @@ tags: - quote - semantic translation_of: Learn/HTML/Introduction_to_HTML/Advanced_text_formatting +original_slug: Learn/HTML/Introducció_al_HTML/Format_de_text_avançat ---
{{LearnSidebar}}
diff --git a/files/ca/learn/html/introduction_to_html/creating_hyperlinks/index.html b/files/ca/learn/html/introduction_to_html/creating_hyperlinks/index.html index c2bc2d0b0c..8bbe503472 100644 --- a/files/ca/learn/html/introduction_to_html/creating_hyperlinks/index.html +++ b/files/ca/learn/html/introduction_to_html/creating_hyperlinks/index.html @@ -1,6 +1,6 @@ --- title: Crear hipervincles -slug: Learn/HTML/Introducció_al_HTML/Crear_hipervincles +slug: Learn/HTML/Introduction_to_HTML/Creating_hyperlinks tags: - Beginner - CodingScripting @@ -14,6 +14,7 @@ tags: - relative - urls translation_of: Learn/HTML/Introduction_to_HTML/Creating_hyperlinks +original_slug: Learn/HTML/Introducció_al_HTML/Crear_hipervincles ---
{{LearnSidebar}}
diff --git a/files/ca/learn/html/introduction_to_html/debugging_html/index.html b/files/ca/learn/html/introduction_to_html/debugging_html/index.html index 5d8feaea62..ec95564653 100644 --- a/files/ca/learn/html/introduction_to_html/debugging_html/index.html +++ b/files/ca/learn/html/introduction_to_html/debugging_html/index.html @@ -1,6 +1,6 @@ --- title: Depurar HTML -slug: Learn/HTML/Introducció_al_HTML/Depurar_HTML +slug: Learn/HTML/Introduction_to_HTML/Debugging_HTML tags: - Beginner - CodingScripting @@ -11,6 +11,7 @@ tags: - Validation - validator translation_of: Learn/HTML/Introduction_to_HTML/Debugging_HTML +original_slug: Learn/HTML/Introducció_al_HTML/Depurar_HTML ---
{{LearnSidebar}}
diff --git a/files/ca/learn/html/introduction_to_html/document_and_website_structure/index.html b/files/ca/learn/html/introduction_to_html/document_and_website_structure/index.html index 1088731eea..c072bc7c22 100644 --- a/files/ca/learn/html/introduction_to_html/document_and_website_structure/index.html +++ b/files/ca/learn/html/introduction_to_html/document_and_website_structure/index.html @@ -1,7 +1,8 @@ --- title: Document i estructura del lloc web -slug: Learn/HTML/Introducció_al_HTML/Document_i_estructura_del_lloc_web +slug: Learn/HTML/Introduction_to_HTML/Document_and_website_structure translation_of: Learn/HTML/Introduction_to_HTML/Document_and_website_structure +original_slug: Learn/HTML/Introducció_al_HTML/Document_i_estructura_del_lloc_web ---
{{LearnSidebar}}
diff --git a/files/ca/learn/html/introduction_to_html/getting_started/index.html b/files/ca/learn/html/introduction_to_html/getting_started/index.html index 03b70effc6..aa2074f0bb 100644 --- a/files/ca/learn/html/introduction_to_html/getting_started/index.html +++ b/files/ca/learn/html/introduction_to_html/getting_started/index.html @@ -1,6 +1,6 @@ --- title: Inici en HTML -slug: Learn/HTML/Introducció_al_HTML/Getting_started +slug: Learn/HTML/Introduction_to_HTML/Getting_started tags: - Attribute - Beginner @@ -12,6 +12,7 @@ tags: - entity reference - whitespace translation_of: Learn/HTML/Introduction_to_HTML/Getting_started +original_slug: Learn/HTML/Introducció_al_HTML/Getting_started ---
{{LearnSidebar}}
diff --git a/files/ca/learn/html/introduction_to_html/html_text_fundamentals/index.html b/files/ca/learn/html/introduction_to_html/html_text_fundamentals/index.html index fafc49effe..4e25b7fd7b 100644 --- a/files/ca/learn/html/introduction_to_html/html_text_fundamentals/index.html +++ b/files/ca/learn/html/introduction_to_html/html_text_fundamentals/index.html @@ -1,6 +1,6 @@ --- title: Fonaments de text HTML -slug: Learn/HTML/Introducció_al_HTML/Fonaments_de_text_HTML +slug: Learn/HTML/Introduction_to_HTML/HTML_text_fundamentals tags: - Beginner - CodingScripting @@ -13,6 +13,7 @@ tags: - paragraphs - semantics translation_of: Learn/HTML/Introduction_to_HTML/HTML_text_fundamentals +original_slug: Learn/HTML/Introducció_al_HTML/Fonaments_de_text_HTML ---
{{LearnSidebar}}
diff --git a/files/ca/learn/html/introduction_to_html/index.html b/files/ca/learn/html/introduction_to_html/index.html index 721a2795f5..835f2046b0 100644 --- a/files/ca/learn/html/introduction_to_html/index.html +++ b/files/ca/learn/html/introduction_to_html/index.html @@ -1,6 +1,6 @@ --- title: Introducció a l'HTML -slug: Learn/HTML/Introducció_al_HTML +slug: Learn/HTML/Introduction_to_HTML tags: - CodingScripting - HTML @@ -12,6 +12,7 @@ tags: - head - semantics translation_of: Learn/HTML/Introduction_to_HTML +original_slug: Learn/HTML/Introducció_al_HTML ---
{{LearnSidebar}}
diff --git a/files/ca/learn/html/introduction_to_html/marking_up_a_letter/index.html b/files/ca/learn/html/introduction_to_html/marking_up_a_letter/index.html index 34647eb294..999aabd8bd 100644 --- a/files/ca/learn/html/introduction_to_html/marking_up_a_letter/index.html +++ b/files/ca/learn/html/introduction_to_html/marking_up_a_letter/index.html @@ -1,6 +1,6 @@ --- title: Marcatge d'una carta -slug: Learn/HTML/Introducció_al_HTML/Marcatge_una_carta +slug: Learn/HTML/Introduction_to_HTML/Marking_up_a_letter tags: - Assessment - Beginner @@ -10,6 +10,7 @@ tags: - Text - head translation_of: Learn/HTML/Introduction_to_HTML/Marking_up_a_letter +original_slug: Learn/HTML/Introducció_al_HTML/Marcatge_una_carta ---
{{LearnSidebar}}
diff --git a/files/ca/learn/html/introduction_to_html/structuring_a_page_of_content/index.html b/files/ca/learn/html/introduction_to_html/structuring_a_page_of_content/index.html index e3481bdc15..838a26fe56 100644 --- a/files/ca/learn/html/introduction_to_html/structuring_a_page_of_content/index.html +++ b/files/ca/learn/html/introduction_to_html/structuring_a_page_of_content/index.html @@ -1,6 +1,6 @@ --- title: Estructurar una pàgina de contingut -slug: Learn/HTML/Introducció_al_HTML/Estructurar_una_pàgina_de_contingut +slug: Learn/HTML/Introduction_to_HTML/Structuring_a_page_of_content tags: - Assessment - Beginner @@ -12,6 +12,7 @@ tags: - Structure - semantics translation_of: Learn/HTML/Introduction_to_HTML/Structuring_a_page_of_content +original_slug: Learn/HTML/Introducció_al_HTML/Estructurar_una_pàgina_de_contingut ---
{{LearnSidebar}}
diff --git a/files/ca/learn/html/introduction_to_html/the_head_metadata_in_html/index.html b/files/ca/learn/html/introduction_to_html/the_head_metadata_in_html/index.html index 934377c4ca..85677b1759 100644 --- a/files/ca/learn/html/introduction_to_html/the_head_metadata_in_html/index.html +++ b/files/ca/learn/html/introduction_to_html/the_head_metadata_in_html/index.html @@ -1,6 +1,6 @@ --- title: Què hi ha en el head? Metadades en HTML -slug: Learn/HTML/Introducció_al_HTML/Què_hi_ha_en_el_head_Metadades_en_HTML +slug: Learn/HTML/Introduction_to_HTML/The_head_metadata_in_HTML tags: - Beginner - CodingScripting @@ -12,6 +12,7 @@ tags: - lang - metadata translation_of: Learn/HTML/Introduction_to_HTML/The_head_metadata_in_HTML +original_slug: Learn/HTML/Introducció_al_HTML/Què_hi_ha_en_el_head_Metadades_en_HTML ---
{{LearnSidebar}}
diff --git a/files/ca/learn/html/multimedia_and_embedding/adding_vector_graphics_to_the_web/index.html b/files/ca/learn/html/multimedia_and_embedding/adding_vector_graphics_to_the_web/index.html index feaf09c048..082feae6bf 100644 --- a/files/ca/learn/html/multimedia_and_embedding/adding_vector_graphics_to_the_web/index.html +++ b/files/ca/learn/html/multimedia_and_embedding/adding_vector_graphics_to_the_web/index.html @@ -1,6 +1,6 @@ --- title: Afegir gràfics vectorials a la Web -slug: Learn/HTML/Multimèdia_i_incrustar/Afegir_gràfics_vectorials_a_la_Web +slug: Learn/HTML/Multimedia_and_embedding/Adding_vector_graphics_to_the_Web tags: - Beginner - Graphics @@ -14,6 +14,7 @@ tags: - iframe - img translation_of: Learn/HTML/Multimedia_and_embedding/Adding_vector_graphics_to_the_Web +original_slug: Learn/HTML/Multimèdia_i_incrustar/Afegir_gràfics_vectorials_a_la_Web ---
{{LearnSidebar}}
diff --git a/files/ca/learn/html/multimedia_and_embedding/images_in_html/index.html b/files/ca/learn/html/multimedia_and_embedding/images_in_html/index.html index 839a38b400..74dc1ff697 100644 --- a/files/ca/learn/html/multimedia_and_embedding/images_in_html/index.html +++ b/files/ca/learn/html/multimedia_and_embedding/images_in_html/index.html @@ -1,6 +1,6 @@ --- title: Imatges en HTML -slug: Learn/HTML/Multimèdia_i_incrustar/Images_in_HTML +slug: Learn/HTML/Multimedia_and_embedding/Images_in_HTML tags: - Article - Beginner @@ -13,6 +13,7 @@ tags: - figure - img translation_of: Learn/HTML/Multimedia_and_embedding/Images_in_HTML +original_slug: Learn/HTML/Multimèdia_i_incrustar/Images_in_HTML ---
{{LearnSidebar}}
diff --git a/files/ca/learn/html/multimedia_and_embedding/index.html b/files/ca/learn/html/multimedia_and_embedding/index.html index 43e0e89c91..d4f9d6fef8 100644 --- a/files/ca/learn/html/multimedia_and_embedding/index.html +++ b/files/ca/learn/html/multimedia_and_embedding/index.html @@ -1,6 +1,6 @@ --- title: Multimèdia i incrustar -slug: Learn/HTML/Multimèdia_i_incrustar +slug: Learn/HTML/Multimedia_and_embedding tags: - Assessment - Audio @@ -18,6 +18,7 @@ tags: - imagemaps - responsive translation_of: Learn/HTML/Multimedia_and_embedding +original_slug: Learn/HTML/Multimèdia_i_incrustar ---
Multimèdia i incrustar
diff --git a/files/ca/learn/html/multimedia_and_embedding/mozilla_splash_page/index.html b/files/ca/learn/html/multimedia_and_embedding/mozilla_splash_page/index.html index 71e1d3426e..7f47d7762c 100644 --- a/files/ca/learn/html/multimedia_and_embedding/mozilla_splash_page/index.html +++ b/files/ca/learn/html/multimedia_and_embedding/mozilla_splash_page/index.html @@ -1,6 +1,6 @@ --- title: Mozilla pàgina de benvinguda -slug: Learn/HTML/Multimèdia_i_incrustar/Mozilla_pàgina_de_benvinguda +slug: Learn/HTML/Multimedia_and_embedding/Mozilla_splash_page tags: - Assessment - Beginner @@ -16,6 +16,7 @@ tags: - sizes - srcset translation_of: Learn/HTML/Multimedia_and_embedding/Mozilla_splash_page +original_slug: Learn/HTML/Multimèdia_i_incrustar/Mozilla_pàgina_de_benvinguda ---
{{LearnSidebar}}
diff --git a/files/ca/learn/html/multimedia_and_embedding/other_embedding_technologies/index.html b/files/ca/learn/html/multimedia_and_embedding/other_embedding_technologies/index.html index 0a69bc1d47..caccc6782b 100644 --- a/files/ca/learn/html/multimedia_and_embedding/other_embedding_technologies/index.html +++ b/files/ca/learn/html/multimedia_and_embedding/other_embedding_technologies/index.html @@ -1,7 +1,6 @@ --- title: De objecte a iframe - altres tecnologies d'incrustació -slug: >- - Learn/HTML/Multimèdia_i_incrustar/De_objecte_a_iframe_altres_tecnologies_incrustació +slug: Learn/HTML/Multimedia_and_embedding/Other_embedding_technologies tags: - Article - Beginner @@ -16,6 +15,8 @@ tags: - embed - iframe translation_of: Learn/HTML/Multimedia_and_embedding/Other_embedding_technologies +original_slug: >- + Learn/HTML/Multimèdia_i_incrustar/De_objecte_a_iframe_altres_tecnologies_incrustació ---
{{LearnSidebar}}
diff --git a/files/ca/learn/html/multimedia_and_embedding/responsive_images/index.html b/files/ca/learn/html/multimedia_and_embedding/responsive_images/index.html index 4be56f6248..ddcce139ff 100644 --- a/files/ca/learn/html/multimedia_and_embedding/responsive_images/index.html +++ b/files/ca/learn/html/multimedia_and_embedding/responsive_images/index.html @@ -1,6 +1,6 @@ --- title: Imatges sensibles -slug: Learn/HTML/Multimèdia_i_incrustar/Imatges_sensibles +slug: Learn/HTML/Multimedia_and_embedding/Responsive_images tags: - Article - Beginner @@ -15,6 +15,7 @@ tags: - sizes - srcset translation_of: Learn/HTML/Multimedia_and_embedding/Responsive_images +original_slug: Learn/HTML/Multimèdia_i_incrustar/Imatges_sensibles ---
{{LearnSidebar}}
diff --git a/files/ca/learn/html/multimedia_and_embedding/video_and_audio_content/index.html b/files/ca/learn/html/multimedia_and_embedding/video_and_audio_content/index.html index 5a8855df2b..c37b3ecfd4 100644 --- a/files/ca/learn/html/multimedia_and_embedding/video_and_audio_content/index.html +++ b/files/ca/learn/html/multimedia_and_embedding/video_and_audio_content/index.html @@ -1,6 +1,6 @@ --- title: Contingut de vídeo i àudio -slug: Learn/HTML/Multimèdia_i_incrustar/Contingut_de_vídeo_i_àudio +slug: Learn/HTML/Multimedia_and_embedding/Video_and_audio_content tags: - Article - Audio @@ -12,6 +12,7 @@ tags: - subtitles - track translation_of: Learn/HTML/Multimedia_and_embedding/Video_and_audio_content +original_slug: Learn/HTML/Multimèdia_i_incrustar/Contingut_de_vídeo_i_àudio ---
{{LearnSidebar}}
diff --git a/files/ca/learn/html/tables/advanced/index.html b/files/ca/learn/html/tables/advanced/index.html index 69b7edf725..8ccd08e053 100644 --- a/files/ca/learn/html/tables/advanced/index.html +++ b/files/ca/learn/html/tables/advanced/index.html @@ -1,6 +1,6 @@ --- title: 'Taules HTML: característiques avançades i accessibilitat' -slug: Learn/HTML/Taules_HTML/Taula_HTML_característiques_avançades_i_laccessibilitat +slug: Learn/HTML/Tables/Advanced tags: - Accessibility - Advanced @@ -19,6 +19,7 @@ tags: - tfoot - thead translation_of: Learn/HTML/Tables/Advanced +original_slug: Learn/HTML/Taules_HTML/Taula_HTML_característiques_avançades_i_laccessibilitat ---
{{LearnSidebar}}
diff --git a/files/ca/learn/html/tables/basics/index.html b/files/ca/learn/html/tables/basics/index.html index f21f6fd3ca..fd6156d930 100644 --- a/files/ca/learn/html/tables/basics/index.html +++ b/files/ca/learn/html/tables/basics/index.html @@ -1,6 +1,6 @@ --- title: Fonaments de la taula HTML -slug: Learn/HTML/Taules_HTML/Fonaments_de_la_taula_HTML +slug: Learn/HTML/Tables/Basics tags: - Article - Beginner @@ -17,6 +17,7 @@ tags: - row - rowspan translation_of: Learn/HTML/Tables/Basics +original_slug: Learn/HTML/Taules_HTML/Fonaments_de_la_taula_HTML ---
{{LearnSidebar}}
diff --git a/files/ca/learn/html/tables/index.html b/files/ca/learn/html/tables/index.html index add81f874e..433e905386 100644 --- a/files/ca/learn/html/tables/index.html +++ b/files/ca/learn/html/tables/index.html @@ -1,6 +1,6 @@ --- title: Taules HTML -slug: Learn/HTML/Taules_HTML +slug: Learn/HTML/Tables tags: - Article - Beginner @@ -11,6 +11,7 @@ tags: - Module - Tables translation_of: Learn/HTML/Tables +original_slug: Learn/HTML/Taules_HTML ---
{{LearnSidebar}}
diff --git a/files/ca/learn/html/tables/structuring_planet_data/index.html b/files/ca/learn/html/tables/structuring_planet_data/index.html index 15d583607f..2f49124e01 100644 --- a/files/ca/learn/html/tables/structuring_planet_data/index.html +++ b/files/ca/learn/html/tables/structuring_planet_data/index.html @@ -1,6 +1,6 @@ --- title: 'Avaluació: Estructurar les dades dels planeta' -slug: Learn/HTML/Taules_HTML/Avaluació_Estructurar_les_dades_dels_planeta +slug: Learn/HTML/Tables/Structuring_planet_data tags: - Assessment - Beginner @@ -9,6 +9,7 @@ tags: - Learn - Tables translation_of: Learn/HTML/Tables/Structuring_planet_data +original_slug: Learn/HTML/Taules_HTML/Avaluació_Estructurar_les_dades_dels_planeta ---
{{LearnSidebar}}
diff --git a/files/ca/learn/javascript/client-side_web_apis/manipulating_documents/index.html b/files/ca/learn/javascript/client-side_web_apis/manipulating_documents/index.html index 83a6f18c98..4250d46dea 100644 --- a/files/ca/learn/javascript/client-side_web_apis/manipulating_documents/index.html +++ b/files/ca/learn/javascript/client-side_web_apis/manipulating_documents/index.html @@ -1,9 +1,9 @@ --- title: JavaScript i CSS -slug: Web/Guide/CSS/Inici_en_CSS/JavaScript +slug: Learn/JavaScript/Client-side_web_APIs/Manipulating_documents tags: - CSS - - 'CSS:Getting_Started' + - CSS:Getting_Started - Example - Guide - Intermediate @@ -11,6 +11,7 @@ tags: - Web translation_of: Learn/JavaScript/Client-side_web_APIs/Manipulating_documents translation_of_original: Web/Guide/CSS/Getting_started/JavaScript +original_slug: Web/Guide/CSS/Inici_en_CSS/JavaScript ---

{{ CSSTutorialTOC() }}

diff --git a/files/ca/learn/javascript/objects/index.html b/files/ca/learn/javascript/objects/index.html index 187f7930f4..299d0c2bd3 100644 --- a/files/ca/learn/javascript/objects/index.html +++ b/files/ca/learn/javascript/objects/index.html @@ -1,8 +1,9 @@ --- title: Introducció al Javascript orientat a Objectes -slug: Web/JavaScript/Introducció_al_Javascript_orientat_a_Objectes +slug: Learn/JavaScript/Objects translation_of: Learn/JavaScript/Objects translation_of_original: Web/JavaScript/Introduction_to_Object-Oriented_JavaScript +original_slug: Web/JavaScript/Introducció_al_Javascript_orientat_a_Objectes ---
{{jsSidebar("Introductory")}}
diff --git a/files/ca/mdn/at_ten/index.html b/files/ca/mdn/at_ten/index.html index 5f61d9d876..f71d68bf5e 100644 --- a/files/ca/mdn/at_ten/index.html +++ b/files/ca/mdn/at_ten/index.html @@ -1,7 +1,8 @@ --- title: MDN at 10 -slug: MDN_at_ten +slug: MDN/At_ten translation_of: MDN_at_ten +original_slug: MDN_at_ten --- diff --git a/files/ca/mdn/contribute/processes/index.html b/files/ca/mdn/contribute/processes/index.html index 69faa1d6b5..cce4ff173a 100644 --- a/files/ca/mdn/contribute/processes/index.html +++ b/files/ca/mdn/contribute/processes/index.html @@ -1,11 +1,12 @@ --- title: Processos de documentació -slug: MDN/Contribute/Processos +slug: MDN/Contribute/Processes tags: - Landing - MDN Meta - Processes translation_of: MDN/Contribute/Processes +original_slug: MDN/Contribute/Processos ---
{{MDNSidebar}}
{{IncludeSubnav("/en-US/docs/MDN")}}
diff --git a/files/ca/mdn/yari/index.html b/files/ca/mdn/yari/index.html index b9c1ddc40d..a6c0effed5 100644 --- a/files/ca/mdn/yari/index.html +++ b/files/ca/mdn/yari/index.html @@ -1,11 +1,12 @@ --- title: 'Kuma: plataforma wiki de MDN' -slug: MDN/Kuma +slug: MDN/Yari tags: - Kuma - Landing - MDN Meta translation_of: MDN/Kuma +original_slug: MDN/Kuma ---
{{MDNSidebar}}
diff --git a/files/ca/mozilla/firefox/releases/2/index.html b/files/ca/mozilla/firefox/releases/2/index.html index 911a4004f5..347a056a2f 100644 --- a/files/ca/mozilla/firefox/releases/2/index.html +++ b/files/ca/mozilla/firefox/releases/2/index.html @@ -1,7 +1,8 @@ --- title: Firefox 2 per a desenvolupadors -slug: Firefox_2_per_a_desenvolupadors +slug: Mozilla/Firefox/Releases/2 translation_of: Mozilla/Firefox/Releases/2 +original_slug: Firefox_2_per_a_desenvolupadors ---

Noves característiques de desenvolupament en el Firefox 2

El Firefox 2 introdueix un gran nombre de noves funcionalitats i possibilitats. Aquest article us proporciona tot un seguit d'articles que cobreixen aquestes noves característiques.

diff --git a/files/ca/orphaned/mdn/community/index.html b/files/ca/orphaned/mdn/community/index.html index 26b3c182a8..20d3bb66ee 100644 --- a/files/ca/orphaned/mdn/community/index.html +++ b/files/ca/orphaned/mdn/community/index.html @@ -1,12 +1,13 @@ --- title: Uniu-vos a la comunitat MDN -slug: MDN/Comunitat +slug: orphaned/MDN/Community tags: - Community - Guide - Landing - MDN Meta translation_of: MDN/Community +original_slug: MDN/Comunitat ---
{{MDNSidebar}}
diff --git a/files/ca/orphaned/mdn/contribute/howto/create_an_mdn_account/index.html b/files/ca/orphaned/mdn/contribute/howto/create_an_mdn_account/index.html index fd8ae9355c..25213fa69f 100644 --- a/files/ca/orphaned/mdn/contribute/howto/create_an_mdn_account/index.html +++ b/files/ca/orphaned/mdn/contribute/howto/create_an_mdn_account/index.html @@ -1,7 +1,8 @@ --- title: Com crear un compte MDN -slug: MDN/Contribute/Howto/Crear_un_compte_MDN +slug: orphaned/MDN/Contribute/Howto/Create_an_MDN_account translation_of: MDN/Contribute/Howto/Create_an_MDN_account +original_slug: MDN/Contribute/Howto/Crear_un_compte_MDN ---
{{MDNSidebar}}
diff --git a/files/ca/orphaned/web/html/element/command/index.html b/files/ca/orphaned/web/html/element/command/index.html index 17614b7e4f..bd49e982d2 100644 --- a/files/ca/orphaned/web/html/element/command/index.html +++ b/files/ca/orphaned/web/html/element/command/index.html @@ -1,12 +1,13 @@ --- title: -slug: Web/HTML/Element/command +slug: orphaned/Web/HTML/Element/command tags: - HTML - HTML Element Reference - HTML element - HTML5 translation_of: Web/HTML/Element/command +original_slug: Web/HTML/Element/command ---
{{obsolete_header()}}
diff --git a/files/ca/orphaned/web/html/element/element/index.html b/files/ca/orphaned/web/html/element/element/index.html index 66e51e06e1..d3cb0b7196 100644 --- a/files/ca/orphaned/web/html/element/element/index.html +++ b/files/ca/orphaned/web/html/element/element/index.html @@ -1,7 +1,8 @@ --- title: -slug: Web/HTML/Element/element +slug: orphaned/Web/HTML/Element/element translation_of: Web/HTML/Element/element +original_slug: Web/HTML/Element/element ---

Nota: Aquest element s'ha eliminat de l'especificació. Vegeu això per més informació de l'editor de l'especificació.

diff --git a/files/ca/orphaned/web/html/global_attributes/dropzone/index.html b/files/ca/orphaned/web/html/global_attributes/dropzone/index.html index 9435eb1c68..3870f0f65f 100644 --- a/files/ca/orphaned/web/html/global_attributes/dropzone/index.html +++ b/files/ca/orphaned/web/html/global_attributes/dropzone/index.html @@ -1,12 +1,13 @@ --- title: dropzone -slug: Web/HTML/Global_attributes/dropzone +slug: orphaned/Web/HTML/Global_attributes/dropzone tags: - Experimental - Global attributes - HTML - Reference translation_of: Web/HTML/Global_attributes/dropzone +original_slug: Web/HTML/Global_attributes/dropzone ---

{{HTMLSidebar("Global_attributes")}}{{SeeCompatTable}}

diff --git a/files/ca/orphaned/web/javascript/reference/global_objects/array/prototype/index.html b/files/ca/orphaned/web/javascript/reference/global_objects/array/prototype/index.html index 35ebf53933..ec3d1c29d7 100644 --- a/files/ca/orphaned/web/javascript/reference/global_objects/array/prototype/index.html +++ b/files/ca/orphaned/web/javascript/reference/global_objects/array/prototype/index.html @@ -1,7 +1,8 @@ --- title: Array.prototype -slug: Web/JavaScript/Referencia/Objectes_globals/Array/prototype +slug: orphaned/Web/JavaScript/Reference/Global_Objects/Array/prototype translation_of: Web/JavaScript/Reference/Global_Objects/Array/prototype +original_slug: Web/JavaScript/Referencia/Objectes_globals/Array/prototype ---
{{JSRef}}
diff --git a/files/ca/web/api/canvas_api/tutorial/advanced_animations/index.html b/files/ca/web/api/canvas_api/tutorial/advanced_animations/index.html index 4aebb46529..5b70ecc32b 100644 --- a/files/ca/web/api/canvas_api/tutorial/advanced_animations/index.html +++ b/files/ca/web/api/canvas_api/tutorial/advanced_animations/index.html @@ -1,11 +1,12 @@ --- title: Animacions avançades -slug: Web/API/Canvas_API/Tutorial/Animacions_avançades +slug: Web/API/Canvas_API/Tutorial/Advanced_animations tags: - Canvas - Graphics - Tutorial translation_of: Web/API/Canvas_API/Tutorial/Advanced_animations +original_slug: Web/API/Canvas_API/Tutorial/Animacions_avançades ---
{{CanvasSidebar}} {{PreviousNext("Web/API/Canvas_API/Tutorial/Basic_animations", "Web/API/Canvas_API/Tutorial/Pixel_manipulation_with_canvas")}}
diff --git a/files/ca/web/api/canvas_api/tutorial/applying_styles_and_colors/index.html b/files/ca/web/api/canvas_api/tutorial/applying_styles_and_colors/index.html index 9adcc2d5f4..b0dbadb6a0 100644 --- a/files/ca/web/api/canvas_api/tutorial/applying_styles_and_colors/index.html +++ b/files/ca/web/api/canvas_api/tutorial/applying_styles_and_colors/index.html @@ -1,6 +1,6 @@ --- title: Aplicar estils i colors -slug: Web/API/Canvas_API/Tutorial/Aplicar_estils_i_colors +slug: Web/API/Canvas_API/Tutorial/Applying_styles_and_colors tags: - Canvas - Graphics @@ -9,6 +9,7 @@ tags: - Intermediate - Tutorial translation_of: Web/API/Canvas_API/Tutorial/Applying_styles_and_colors +original_slug: Web/API/Canvas_API/Tutorial/Aplicar_estils_i_colors ---
{{CanvasSidebar}} {{PreviousNext("Web/API/Canvas_API/Tutorial/Drawing_shapes", "Web/API/Canvas_API/Tutorial/Drawing_text")}}
diff --git a/files/ca/web/api/canvas_api/tutorial/basic_animations/index.html b/files/ca/web/api/canvas_api/tutorial/basic_animations/index.html index e4a3751d1e..358c12a3d7 100644 --- a/files/ca/web/api/canvas_api/tutorial/basic_animations/index.html +++ b/files/ca/web/api/canvas_api/tutorial/basic_animations/index.html @@ -1,6 +1,6 @@ --- title: Animacions bàsiques -slug: Web/API/Canvas_API/Tutorial/Animacions_bàsiques +slug: Web/API/Canvas_API/Tutorial/Basic_animations tags: - Canvas - Graphics @@ -9,6 +9,7 @@ tags: - Intermediate - Tutorial translation_of: Web/API/Canvas_API/Tutorial/Basic_animations +original_slug: Web/API/Canvas_API/Tutorial/Animacions_bàsiques ---
{{CanvasSidebar}} {{PreviousNext("Web/API/Canvas_API/Tutorial/Compositing", "Web/API/Canvas_API/Tutorial/Advanced_animations")}}
diff --git a/files/ca/web/api/canvas_api/tutorial/basic_usage/index.html b/files/ca/web/api/canvas_api/tutorial/basic_usage/index.html index fb15a62d81..cd0bfd3634 100644 --- a/files/ca/web/api/canvas_api/tutorial/basic_usage/index.html +++ b/files/ca/web/api/canvas_api/tutorial/basic_usage/index.html @@ -1,6 +1,6 @@ --- title: Ús bàsic de canvas -slug: Web/API/Canvas_API/Tutorial/Ús_bàsic +slug: Web/API/Canvas_API/Tutorial/Basic_usage tags: - Canvas - Graphics @@ -8,6 +8,7 @@ tags: - Intermediate - Tutorial translation_of: Web/API/Canvas_API/Tutorial/Basic_usage +original_slug: Web/API/Canvas_API/Tutorial/Ús_bàsic ---
{{CanvasSidebar}} {{PreviousNext("Web/API/Canvas_API/Tutorial", "Web/API/Canvas_API/Tutorial/Drawing_shapes")}}
diff --git a/files/ca/web/api/canvas_api/tutorial/compositing/index.html b/files/ca/web/api/canvas_api/tutorial/compositing/index.html index e556e911d4..3aae44e059 100644 --- a/files/ca/web/api/canvas_api/tutorial/compositing/index.html +++ b/files/ca/web/api/canvas_api/tutorial/compositing/index.html @@ -1,6 +1,6 @@ --- title: Composició i retall -slug: Web/API/Canvas_API/Tutorial/Composició +slug: Web/API/Canvas_API/Tutorial/Compositing tags: - Canvas - Graphics @@ -9,6 +9,7 @@ tags: - Intermediate - Tutorial translation_of: Web/API/Canvas_API/Tutorial/Compositing +original_slug: Web/API/Canvas_API/Tutorial/Composició ---
{{CanvasSidebar}} {{PreviousNext("Web/API/Canvas_API/Tutorial/Transformations", "Web/API/Canvas_API/Tutorial/Basic_animations")}}
diff --git a/files/ca/web/api/canvas_api/tutorial/drawing_text/index.html b/files/ca/web/api/canvas_api/tutorial/drawing_text/index.html index 37b730176a..b7bd981cd9 100644 --- a/files/ca/web/api/canvas_api/tutorial/drawing_text/index.html +++ b/files/ca/web/api/canvas_api/tutorial/drawing_text/index.html @@ -1,12 +1,13 @@ --- title: Dibuixar text -slug: Web/API/Canvas_API/Tutorial/Dibuixar_text +slug: Web/API/Canvas_API/Tutorial/Drawing_text tags: - Canvas - Graphics - Intermediate - Tutorial translation_of: Web/API/Canvas_API/Tutorial/Drawing_text +original_slug: Web/API/Canvas_API/Tutorial/Dibuixar_text ---
{{CanvasSidebar}} {{PreviousNext("Web/API/Canvas_API/Tutorial/Applying_styles_and_colors", "Web/API/Canvas_API/Tutorial/Using_images")}}
diff --git a/files/ca/web/api/canvas_api/tutorial/pixel_manipulation_with_canvas/index.html b/files/ca/web/api/canvas_api/tutorial/pixel_manipulation_with_canvas/index.html index d792e62ef0..b437cfbb7e 100644 --- a/files/ca/web/api/canvas_api/tutorial/pixel_manipulation_with_canvas/index.html +++ b/files/ca/web/api/canvas_api/tutorial/pixel_manipulation_with_canvas/index.html @@ -1,12 +1,13 @@ --- title: Manipular píxels amb canvas -slug: Web/API/Canvas_API/Tutorial/Manipular_píxels_amb_canvas +slug: Web/API/Canvas_API/Tutorial/Pixel_manipulation_with_canvas tags: - Canvas - Graphics - Intermediate - Tutorial translation_of: Web/API/Canvas_API/Tutorial/Pixel_manipulation_with_canvas +original_slug: Web/API/Canvas_API/Tutorial/Manipular_píxels_amb_canvas ---
{{CanvasSidebar}} {{PreviousNext("Web/API/Canvas_API/Tutorial/Advanced_animations", "Web/API/Canvas_API/Tutorial/Hit_regions_and_accessibility")}}
diff --git a/files/ca/web/api/canvas_api/tutorial/transformations/index.html b/files/ca/web/api/canvas_api/tutorial/transformations/index.html index 2958d40498..ee81746c6d 100644 --- a/files/ca/web/api/canvas_api/tutorial/transformations/index.html +++ b/files/ca/web/api/canvas_api/tutorial/transformations/index.html @@ -1,6 +1,6 @@ --- title: Transformacions -slug: Web/API/Canvas_API/Tutorial/Transformacions +slug: Web/API/Canvas_API/Tutorial/Transformations tags: - Canvas - Graphics @@ -10,6 +10,7 @@ tags: - Intermediate - Web translation_of: Web/API/Canvas_API/Tutorial/Transformations +original_slug: Web/API/Canvas_API/Tutorial/Transformacions ---
{{CanvasSidebar}} {{PreviousNext("Web/API/Canvas_API/Tutorial/Using_images", "Web/API/Canvas_API/Tutorial/Compositing")}}
diff --git a/files/ca/web/css/_colon_is/index.html b/files/ca/web/css/_colon_is/index.html index 6669bc645a..735c5dd92d 100644 --- a/files/ca/web/css/_colon_is/index.html +++ b/files/ca/web/css/_colon_is/index.html @@ -1,13 +1,14 @@ --- title: ':any' -slug: 'Web/CSS/:any' +slug: Web/CSS/:is tags: - CSS - Experimental - Pseudo-class - Reference -translation_of: 'Web/CSS/:is' -translation_of_original: 'Web/CSS/:any' +translation_of: Web/CSS/:is +translation_of_original: Web/CSS/:any +original_slug: Web/CSS/:any ---
{{CSSRef}}{{SeeCompatTable}}
diff --git a/files/ca/web/css/adjacent_sibling_combinator/index.html b/files/ca/web/css/adjacent_sibling_combinator/index.html index 911a395693..4cdeef9759 100644 --- a/files/ca/web/css/adjacent_sibling_combinator/index.html +++ b/files/ca/web/css/adjacent_sibling_combinator/index.html @@ -1,12 +1,13 @@ --- title: Combinador de germans adjacents -slug: Web/CSS/Selectors_de_germans_adjacents +slug: Web/CSS/Adjacent_sibling_combinator tags: - CSS - NeedsMobileBrowserCompatibility - Reference - Selectors translation_of: Web/CSS/Adjacent_sibling_combinator +original_slug: Web/CSS/Selectors_de_germans_adjacents ---
{{CSSRef("Selectors")}}
diff --git a/files/ca/web/css/attribute_selectors/index.html b/files/ca/web/css/attribute_selectors/index.html index 6778a2b3cb..2878bc2507 100644 --- a/files/ca/web/css/attribute_selectors/index.html +++ b/files/ca/web/css/attribute_selectors/index.html @@ -1,12 +1,13 @@ --- title: Selector Atribut -slug: Web/CSS/Selectors_d'Atribut +slug: Web/CSS/Attribute_selectors tags: - Beginner - CSS - Reference - Selectors translation_of: Web/CSS/Attribute_selectors +original_slug: Web/CSS/Selectors_d'Atribut ---
{{CSSRef}}
diff --git a/files/ca/web/css/child_combinator/index.html b/files/ca/web/css/child_combinator/index.html index f5cb8139f9..312ae090d4 100644 --- a/files/ca/web/css/child_combinator/index.html +++ b/files/ca/web/css/child_combinator/index.html @@ -1,12 +1,13 @@ --- title: Combinador de fills -slug: Web/CSS/Selectors_de_fills +slug: Web/CSS/Child_combinator tags: - CSS - NeedsMobileBrowserCompatibility - Reference - Selectors translation_of: Web/CSS/Child_combinator +original_slug: Web/CSS/Selectors_de_fills ---
{{CSSRef("Selectors")}}
diff --git a/files/ca/web/css/class_selectors/index.html b/files/ca/web/css/class_selectors/index.html index 1f8cfdbee4..1756db8394 100644 --- a/files/ca/web/css/class_selectors/index.html +++ b/files/ca/web/css/class_selectors/index.html @@ -1,11 +1,12 @@ --- title: Selector Class -slug: Web/CSS/Selectors_de_Classe +slug: Web/CSS/Class_selectors tags: - CSS - Reference - Selectors translation_of: Web/CSS/Class_selectors +original_slug: Web/CSS/Selectors_de_Classe ---
{{CSSRef}}
diff --git a/files/ca/web/css/css_box_model/introduction_to_the_css_box_model/index.html b/files/ca/web/css/css_box_model/introduction_to_the_css_box_model/index.html index bfb613ed6c..18acde6b02 100644 --- a/files/ca/web/css/css_box_model/introduction_to_the_css_box_model/index.html +++ b/files/ca/web/css/css_box_model/introduction_to_the_css_box_model/index.html @@ -1,12 +1,13 @@ --- title: Introducció al model de caixa CSS -slug: Web/CSS/CSS_Box_Model/Introducció_al_model_de_caixa_CSS +slug: Web/CSS/CSS_Box_Model/Introduction_to_the_CSS_box_model tags: - CSS - CSS Box Model - Guide - Reference translation_of: Web/CSS/CSS_Box_Model/Introduction_to_the_CSS_box_model +original_slug: Web/CSS/CSS_Box_Model/Introducció_al_model_de_caixa_CSS ---
{{CSSRef}}
diff --git a/files/ca/web/css/css_box_model/mastering_margin_collapsing/index.html b/files/ca/web/css/css_box_model/mastering_margin_collapsing/index.html index 9b312fc789..307cd2bbb8 100644 --- a/files/ca/web/css/css_box_model/mastering_margin_collapsing/index.html +++ b/files/ca/web/css/css_box_model/mastering_margin_collapsing/index.html @@ -1,12 +1,13 @@ --- title: Dominar el col.lapse del marge -slug: Web/CSS/CSS_Box_Model/Dominar_el_col.lapse_del_marge +slug: Web/CSS/CSS_Box_Model/Mastering_margin_collapsing tags: - CSS - CSS Box Model - Guide - Reference translation_of: Web/CSS/CSS_Box_Model/Mastering_margin_collapsing +original_slug: Web/CSS/CSS_Box_Model/Dominar_el_col.lapse_del_marge ---
{{CSSRef}}
diff --git a/files/ca/web/css/css_selectors/index.html b/files/ca/web/css/css_selectors/index.html index 9eaf8daffc..b6041847ef 100644 --- a/files/ca/web/css/css_selectors/index.html +++ b/files/ca/web/css/css_selectors/index.html @@ -1,6 +1,6 @@ --- title: Selectors CSS -slug: Web/CSS/Selectors_CSS +slug: Web/CSS/CSS_Selectors tags: - CSS - CSS Selectors @@ -8,6 +8,7 @@ tags: - Reference - Selectors translation_of: Web/CSS/CSS_Selectors +original_slug: Web/CSS/Selectors_CSS ---
{{CSSRef}}
diff --git a/files/ca/web/css/css_selectors/using_the__colon_target_pseudo-class_in_selectors/index.html b/files/ca/web/css/css_selectors/using_the__colon_target_pseudo-class_in_selectors/index.html index 53339b06e5..f3c708ba38 100644 --- a/files/ca/web/css/css_selectors/using_the__colon_target_pseudo-class_in_selectors/index.html +++ b/files/ca/web/css/css_selectors/using_the__colon_target_pseudo-class_in_selectors/index.html @@ -1,13 +1,14 @@ --- -title: 'Ùs de la pseudo-class :target en selectors' -slug: 'Web/CSS/Selectors_CSS/Using_the_:target_pseudo-class_in_selectors' +title: Ùs de la pseudo-class :target en selectors +slug: Web/CSS/CSS_Selectors/Using_the_:target_pseudo-class_in_selectors tags: - ':target' - CSS - Guide - Reference - Selectors -translation_of: 'Web/CSS/CSS_Selectors/Using_the_:target_pseudo-class_in_selectors' +translation_of: Web/CSS/CSS_Selectors/Using_the_:target_pseudo-class_in_selectors +original_slug: Web/CSS/Selectors_CSS/Using_the_:target_pseudo-class_in_selectors ---
{{CSSRef}}
diff --git a/files/ca/web/css/descendant_combinator/index.html b/files/ca/web/css/descendant_combinator/index.html index 1eb4fd57f8..57cfd0f1ef 100644 --- a/files/ca/web/css/descendant_combinator/index.html +++ b/files/ca/web/css/descendant_combinator/index.html @@ -1,11 +1,12 @@ --- title: Selectors de descendents -slug: Web/CSS/Selectors_de_descendents +slug: Web/CSS/Descendant_combinator tags: - CSS - Reference - Selectors translation_of: Web/CSS/Descendant_combinator +original_slug: Web/CSS/Selectors_de_descendents ---
{{CSSRef("Selectors")}}
diff --git a/files/ca/web/css/general_sibling_combinator/index.html b/files/ca/web/css/general_sibling_combinator/index.html index 64429bbaba..dd14105daa 100644 --- a/files/ca/web/css/general_sibling_combinator/index.html +++ b/files/ca/web/css/general_sibling_combinator/index.html @@ -1,12 +1,13 @@ --- title: Combinador general de germans -slug: Web/CSS/Selectors_general_de_germans +slug: Web/CSS/General_sibling_combinator tags: - CSS - NeedsMobileBrowserCompatibility - Reference - Selectors translation_of: Web/CSS/General_sibling_combinator +original_slug: Web/CSS/Selectors_general_de_germans ---
{{CSSRef("Selectors")}}
diff --git a/files/ca/web/css/id_selectors/index.html b/files/ca/web/css/id_selectors/index.html index 1b6f041eb6..2a51db6e69 100644 --- a/files/ca/web/css/id_selectors/index.html +++ b/files/ca/web/css/id_selectors/index.html @@ -1,11 +1,12 @@ --- title: Selector ID -slug: Web/CSS/Selectors_ID +slug: Web/CSS/ID_selectors tags: - CSS - Reference - Selectors translation_of: Web/CSS/ID_selectors +original_slug: Web/CSS/Selectors_ID ---
{{CSSRef}}
diff --git a/files/ca/web/css/reference/index.html b/files/ca/web/css/reference/index.html index 739dcdc9e3..ac8629ce07 100644 --- a/files/ca/web/css/reference/index.html +++ b/files/ca/web/css/reference/index.html @@ -1,11 +1,12 @@ --- title: Referéncia CSS -slug: Web/CSS/Referéncia_CSS +slug: Web/CSS/Reference tags: - CSS - Reference - - 'l10n:priority' + - l10n:priority translation_of: Web/CSS/Reference +original_slug: Web/CSS/Referéncia_CSS ---

Utilitzeu aquesta referència CSS per explorar un índex alfabètic de totes les propietats CSS estàndard , pseudo-classes, pseudo-elements, tipus de dades, i regles-at. També podeu explorar una llista de tots els  selectors CSS organitzats per tipus i una llista de conceptes clau CSS. També s'inclou una breu referència DOM-CSS / CSSOM.

diff --git a/files/ca/web/css/syntax/index.html b/files/ca/web/css/syntax/index.html index 51931c11f0..876bdca751 100644 --- a/files/ca/web/css/syntax/index.html +++ b/files/ca/web/css/syntax/index.html @@ -1,12 +1,13 @@ --- title: Sintaxi -slug: Web/CSS/Sintaxi +slug: Web/CSS/Syntax tags: - CSS - Guide - Reference - Web translation_of: Web/CSS/Syntax +original_slug: Web/CSS/Sintaxi ---
{{cssref}}
diff --git a/files/ca/web/css/type_selectors/index.html b/files/ca/web/css/type_selectors/index.html index d87b102ac3..78553af969 100644 --- a/files/ca/web/css/type_selectors/index.html +++ b/files/ca/web/css/type_selectors/index.html @@ -1,6 +1,6 @@ --- title: Selector Type -slug: Web/CSS/Selectors_de_Tipus +slug: Web/CSS/Type_selectors tags: - CSS - HTML @@ -9,6 +9,7 @@ tags: - Reference - Selectors translation_of: Web/CSS/Type_selectors +original_slug: Web/CSS/Selectors_de_Tipus ---
{{CSSRef}}
diff --git a/files/ca/web/css/universal_selectors/index.html b/files/ca/web/css/universal_selectors/index.html index 6aa7931ef9..f625d3d9d9 100644 --- a/files/ca/web/css/universal_selectors/index.html +++ b/files/ca/web/css/universal_selectors/index.html @@ -1,6 +1,6 @@ --- title: Selector Universal -slug: Web/CSS/Selectors_Universal +slug: Web/CSS/Universal_selectors tags: - CSS - NeedsBrowserCompatibility @@ -8,6 +8,7 @@ tags: - Reference - Selectors translation_of: Web/CSS/Universal_selectors +original_slug: Web/CSS/Selectors_Universal ---
{{CSSRef}}
diff --git a/files/ca/web/guide/ajax/getting_started/index.html b/files/ca/web/guide/ajax/getting_started/index.html index ea59270ae8..d93348c916 100644 --- a/files/ca/web/guide/ajax/getting_started/index.html +++ b/files/ca/web/guide/ajax/getting_started/index.html @@ -1,10 +1,11 @@ --- title: Primers passos -slug: Web/Guide/AJAX/Primers_passos +slug: Web/Guide/AJAX/Getting_Started tags: - AJAX - Totes_les_categories translation_of: Web/Guide/AJAX/Getting_Started +original_slug: Web/Guide/AJAX/Primers_passos ---

Aquest article us guiarà a través dels principis bàsics d'AJAX i amb dos pràctics exemples per a anar per feina. diff --git a/files/ca/web/guide/graphics/index.html b/files/ca/web/guide/graphics/index.html index a65c99ec66..26a3d02437 100644 --- a/files/ca/web/guide/graphics/index.html +++ b/files/ca/web/guide/graphics/index.html @@ -1,6 +1,6 @@ --- title: Gràfics en la Web -slug: Web/Guide/Gràfics +slug: Web/Guide/Graphics tags: - 2D - 3D @@ -12,6 +12,7 @@ tags: - WebGL - WebRTC translation_of: Web/Guide/Graphics +original_slug: Web/Guide/Gràfics ---

Els llocs web i les aplicacions sovint necessiten presentar gràfics. Les imatges estàtiques poden visualitzar-se fàcilment usant l'element {{HTMLElement("img")}} o configurant el fons dels elements HTML  utilitzant la propietat {{cssxref("background-image")}}. També podeu construir gràfics sobre la marxa o manipular imatges després de fetes. Aquests articles proporcionen informació sobre com podeu aconseguir-ho.

diff --git a/files/ca/web/guide/html/using_html_sections_and_outlines/index.html b/files/ca/web/guide/html/using_html_sections_and_outlines/index.html index 5da074b341..afe591b845 100644 --- a/files/ca/web/guide/html/using_html_sections_and_outlines/index.html +++ b/files/ca/web/guide/html/using_html_sections_and_outlines/index.html @@ -1,6 +1,6 @@ --- title: Us de seccions i esquemes en HTML 5 -slug: Web/Guide/HTML/Us_de_seccions_i_esquemes_en_HTML +slug: Web/Guide/HTML/Using_HTML_sections_and_outlines tags: - Advanced - Example @@ -12,6 +12,7 @@ tags: - Sections - Web translation_of: Web/Guide/HTML/Using_HTML_sections_and_outlines +original_slug: Web/Guide/HTML/Us_de_seccions_i_esquemes_en_HTML ---

Important: Actualment no existeixen implementacions de l'algorisme d'esquema en els navegadors gràfics o agents d'usuari de tecnologia d'assistència, encara que l'algorisme s'executa a un altre programari, com comprobadors de conformitat. Per tant, l'algorisme d'esquema no pot ser invocat per transmetre l'estructura dels documents als usuaris. Es recomana als autors a utilitzar les capçaleres de rang (h1-h6) per transmetre l'estructura.

diff --git a/files/ca/web/guide/mobile/a_hybrid_approach/index.html b/files/ca/web/guide/mobile/a_hybrid_approach/index.html index da2ee0a625..64c76899c9 100644 --- a/files/ca/web/guide/mobile/a_hybrid_approach/index.html +++ b/files/ca/web/guide/mobile/a_hybrid_approach/index.html @@ -1,7 +1,8 @@ --- title: Una solució híbrida -slug: Web_Development/Mobile/A_hybrid_approach +slug: Web/Guide/Mobile/A_hybrid_approach translation_of: Web/Guide/Mobile/A_hybrid_approach +original_slug: Web_Development/Mobile/A_hybrid_approach ---

Les bales de plata costen de trobar en el desenvolupament web — és molt més probable que empris estratègies que fan ús de vàries tècniques segons les circumstàncies. I això ens du a la nostra tercera solució pel desenvolupament web amigable amb el mòbil, que tracta d'evitar les deficiències de les altres dues solucions (diferents webs i única web amb disseny sensible), combinant-les.

Aquest enfoc híbrid se centra en atacar per separat cada un dels tres objectius del desenvolupament web per als mòbils, i aplicar les millors solucions tècniques disponibles a cada un d'ells. Aquest article presenta aquí una potencial combinació de tècniques, però en altres circumstàncies pot convenir una combinació diferent. El concepte clau que cal recordar i entendre és que per resoldre les teves necesitats concretes pots combinar les tècniques que calgui de banda del servidor amb les aplicades al navegador.

diff --git a/files/ca/web/guide/mobile/index.html b/files/ca/web/guide/mobile/index.html index 84a810eb1c..8d98081f36 100644 --- a/files/ca/web/guide/mobile/index.html +++ b/files/ca/web/guide/mobile/index.html @@ -1,6 +1,6 @@ --- title: Desenvolupament de webs per a mòbils -slug: Web_Development/Mobile +slug: Web/Guide/Mobile tags: - Mobile - NeedsTranslation @@ -8,6 +8,7 @@ tags: - Web Development translation_of: Web/Guide/Mobile translation_of_original: Web_Development/Mobile +original_slug: Web_Development/Mobile ---

Construir webs per ser vistes en dispositius mòbils requereix prendre solucions que assegurin que la web funcioni igual de bé en dispositius mòbils com ho fa en navegadors d'escriptori. Els següents articles descriuen algunes d'aquestes solucions:

    diff --git a/files/ca/web/guide/mobile/mobile-friendliness/index.html b/files/ca/web/guide/mobile/mobile-friendliness/index.html index b5ed1bbdb4..b521896f7e 100644 --- a/files/ca/web/guide/mobile/mobile-friendliness/index.html +++ b/files/ca/web/guide/mobile/mobile-friendliness/index.html @@ -1,7 +1,8 @@ --- title: Webs amigables amb els mòbils -slug: Web_Development/Mobile/Mobile-friendliness +slug: Web/Guide/Mobile/Mobile-friendliness translation_of: Web/Guide/Mobile/Mobile-friendliness +original_slug: Web_Development/Mobile/Mobile-friendliness ---

    Què és una web amigable amb els mòbils?

    Vol dir multitud de coses segons amb qui parlis. Lo millor és veure aquest assumpte prenent com a referent els 3 objectius per a millorar l'experiència dels teus usuaris: presentació, contingut, i rendiment.

    diff --git a/files/ca/web/guide/mobile/separate_sites/index.html b/files/ca/web/guide/mobile/separate_sites/index.html index ceb9160b38..1f290e1f84 100644 --- a/files/ca/web/guide/mobile/separate_sites/index.html +++ b/files/ca/web/guide/mobile/separate_sites/index.html @@ -1,7 +1,8 @@ --- title: Diferents webs per a mòbil i PC -slug: Web_Development/Mobile/Separate_sites +slug: Web/Guide/Mobile/Separate_sites translation_of: Web/Guide/Mobile/Separate_sites +original_slug: Web_Development/Mobile/Separate_sites ---

    La solucio de "webs diferents" per a la construcció de webs accesibles des del mòbil implica crear realment dos webs diferents (de contingut i forma) per als usuaris mòbils i pels que ens visiten des de l'escriptori de l'ordinador/portàtil. Aquesta solució -com les altres- té els seus avantatges però també els seus inconvenients.

    Avantatges

    diff --git a/files/ca/web/html/inline_elements/index.html b/files/ca/web/html/inline_elements/index.html index 0ec8db2c0d..76c2f70120 100644 --- a/files/ca/web/html/inline_elements/index.html +++ b/files/ca/web/html/inline_elements/index.html @@ -1,11 +1,12 @@ --- title: Elements en línia -slug: Web/HTML/Elements_en_línia +slug: Web/HTML/Inline_elements tags: - Beginner - HTML - - 'HTML:Element Reference' + - HTML:Element Reference translation_of: Web/HTML/Inline_elements +original_slug: Web/HTML/Elements_en_línia ---

    Sumari

    diff --git a/files/ca/web/javascript/about_javascript/index.html b/files/ca/web/javascript/about_javascript/index.html index f581aa7021..ab68a22088 100644 --- a/files/ca/web/javascript/about_javascript/index.html +++ b/files/ca/web/javascript/about_javascript/index.html @@ -1,7 +1,8 @@ --- title: Sobre JavaScript -slug: Web/JavaScript/quant_a_JavaScript +slug: Web/JavaScript/About_JavaScript translation_of: Web/JavaScript/About_JavaScript +original_slug: Web/JavaScript/quant_a_JavaScript ---
    {{JsSidebar()}}
    diff --git a/files/ca/web/javascript/guide/expressions_and_operators/index.html b/files/ca/web/javascript/guide/expressions_and_operators/index.html index 9985daa497..7aff311543 100644 --- a/files/ca/web/javascript/guide/expressions_and_operators/index.html +++ b/files/ca/web/javascript/guide/expressions_and_operators/index.html @@ -1,7 +1,8 @@ --- title: Expressions i operadors -slug: Web/JavaScript/Guide/Expressions_i_Operadors +slug: Web/JavaScript/Guide/Expressions_and_Operators translation_of: Web/JavaScript/Guide/Expressions_and_Operators +original_slug: Web/JavaScript/Guide/Expressions_i_Operadors ---
    {{jsSidebar("JavaScript Guide")}} {{PreviousNext("Web/JavaScript/Guide/Functions", "Web/JavaScript/Guide/Numbers_and_dates")}}
    diff --git a/files/ca/web/javascript/guide/introduction/index.html b/files/ca/web/javascript/guide/introduction/index.html index 1b598dad9b..540696aa35 100644 --- a/files/ca/web/javascript/guide/introduction/index.html +++ b/files/ca/web/javascript/guide/introduction/index.html @@ -1,7 +1,8 @@ --- title: Introducció -slug: Web/JavaScript/Guide/Introducció +slug: Web/JavaScript/Guide/Introduction translation_of: Web/JavaScript/Guide/Introduction +original_slug: Web/JavaScript/Guide/Introducció ---
    {{jsSidebar("JavaScript Guide")}} {{PreviousNext("Web/JavaScript/Guide", "Web/JavaScript/Guide/Grammar_and_types")}}
    diff --git a/files/ca/web/javascript/reference/about/index.html b/files/ca/web/javascript/reference/about/index.html index b1fa0734b3..0da88b4776 100644 --- a/files/ca/web/javascript/reference/about/index.html +++ b/files/ca/web/javascript/reference/about/index.html @@ -1,7 +1,8 @@ --- title: Sobre aquesta referència -slug: Web/JavaScript/Referencia/Sobre +slug: Web/JavaScript/Reference/About translation_of: Web/JavaScript/Reference/About +original_slug: Web/JavaScript/Referencia/Sobre ---

    {{JsSidebar}}

    diff --git a/files/ca/web/javascript/reference/classes/constructor/index.html b/files/ca/web/javascript/reference/classes/constructor/index.html index a0bd6b966f..1dc8379405 100644 --- a/files/ca/web/javascript/reference/classes/constructor/index.html +++ b/files/ca/web/javascript/reference/classes/constructor/index.html @@ -1,7 +1,8 @@ --- title: constructor -slug: Web/JavaScript/Referencia/Classes/constructor +slug: Web/JavaScript/Reference/Classes/constructor translation_of: Web/JavaScript/Reference/Classes/constructor +original_slug: Web/JavaScript/Referencia/Classes/constructor ---
    {{jsSidebar("Classes")}}
    diff --git a/files/ca/web/javascript/reference/classes/index.html b/files/ca/web/javascript/reference/classes/index.html index 23daf7e1ff..080c845943 100644 --- a/files/ca/web/javascript/reference/classes/index.html +++ b/files/ca/web/javascript/reference/classes/index.html @@ -1,6 +1,6 @@ --- title: Classes -slug: Web/JavaScript/Referencia/Classes +slug: Web/JavaScript/Reference/Classes tags: - Classes - ECMAScript 2015 @@ -13,6 +13,7 @@ tags: - Référence(2) - TopicStub translation_of: Web/JavaScript/Reference/Classes +original_slug: Web/JavaScript/Referencia/Classes ---
    {{JsSidebar("Classes")}}
    diff --git a/files/ca/web/javascript/reference/classes/static/index.html b/files/ca/web/javascript/reference/classes/static/index.html index 3255dc1552..c8c015d731 100644 --- a/files/ca/web/javascript/reference/classes/static/index.html +++ b/files/ca/web/javascript/reference/classes/static/index.html @@ -1,7 +1,8 @@ --- title: static -slug: Web/JavaScript/Referencia/Classes/static +slug: Web/JavaScript/Reference/Classes/static translation_of: Web/JavaScript/Reference/Classes/static +original_slug: Web/JavaScript/Referencia/Classes/static ---
    {{jsSidebar("Classes")}}
    diff --git a/files/ca/web/javascript/reference/errors/read-only/index.html b/files/ca/web/javascript/reference/errors/read-only/index.html index 30c70c40dd..ac7a574b86 100644 --- a/files/ca/web/javascript/reference/errors/read-only/index.html +++ b/files/ca/web/javascript/reference/errors/read-only/index.html @@ -1,11 +1,12 @@ --- title: 'TipusError: "x" es només de lectura' -slug: Web/JavaScript/Reference/Errors/Nomes-Lectura +slug: Web/JavaScript/Reference/Errors/Read-only tags: - Errors - JavaScript - TypeError translation_of: Web/JavaScript/Reference/Errors/Read-only +original_slug: Web/JavaScript/Reference/Errors/Nomes-Lectura ---
    {{jsSidebar("Errors")}}
    diff --git a/files/ca/web/javascript/reference/functions/rest_parameters/index.html b/files/ca/web/javascript/reference/functions/rest_parameters/index.html index 68fc5f0bba..2a0a2370e7 100644 --- a/files/ca/web/javascript/reference/functions/rest_parameters/index.html +++ b/files/ca/web/javascript/reference/functions/rest_parameters/index.html @@ -1,7 +1,8 @@ --- title: Paràmetres rest -slug: Web/JavaScript/Reference/Functions/parameters_rest +slug: Web/JavaScript/Reference/Functions/rest_parameters translation_of: Web/JavaScript/Reference/Functions/rest_parameters +original_slug: Web/JavaScript/Reference/Functions/parameters_rest ---
    {{jsSidebar("Functions")}}
    diff --git a/files/ca/web/javascript/reference/global_objects/array/entries/index.html b/files/ca/web/javascript/reference/global_objects/array/entries/index.html index 8b67c06038..d378295247 100644 --- a/files/ca/web/javascript/reference/global_objects/array/entries/index.html +++ b/files/ca/web/javascript/reference/global_objects/array/entries/index.html @@ -1,7 +1,8 @@ --- title: Array.prototype.entries() -slug: Web/JavaScript/Referencia/Objectes_globals/Array/entries +slug: Web/JavaScript/Reference/Global_Objects/Array/entries translation_of: Web/JavaScript/Reference/Global_Objects/Array/entries +original_slug: Web/JavaScript/Referencia/Objectes_globals/Array/entries ---
    {{JSRef}}
    diff --git a/files/ca/web/javascript/reference/global_objects/array/every/index.html b/files/ca/web/javascript/reference/global_objects/array/every/index.html index ad707b4990..cff136ba75 100644 --- a/files/ca/web/javascript/reference/global_objects/array/every/index.html +++ b/files/ca/web/javascript/reference/global_objects/array/every/index.html @@ -1,7 +1,8 @@ --- title: Array.prototype.every() -slug: Web/JavaScript/Referencia/Objectes_globals/Array/every +slug: Web/JavaScript/Reference/Global_Objects/Array/every translation_of: Web/JavaScript/Reference/Global_Objects/Array/every +original_slug: Web/JavaScript/Referencia/Objectes_globals/Array/every ---
    {{JSRef}}
    diff --git a/files/ca/web/javascript/reference/global_objects/array/fill/index.html b/files/ca/web/javascript/reference/global_objects/array/fill/index.html index e1952a8407..67ad6677cf 100644 --- a/files/ca/web/javascript/reference/global_objects/array/fill/index.html +++ b/files/ca/web/javascript/reference/global_objects/array/fill/index.html @@ -1,7 +1,8 @@ --- title: Array.prototype.fill() -slug: Web/JavaScript/Referencia/Objectes_globals/Array/fill +slug: Web/JavaScript/Reference/Global_Objects/Array/fill translation_of: Web/JavaScript/Reference/Global_Objects/Array/fill +original_slug: Web/JavaScript/Referencia/Objectes_globals/Array/fill ---
    {{JSRef}}
    diff --git a/files/ca/web/javascript/reference/global_objects/array/filter/index.html b/files/ca/web/javascript/reference/global_objects/array/filter/index.html index c1bfec77f3..778102284b 100644 --- a/files/ca/web/javascript/reference/global_objects/array/filter/index.html +++ b/files/ca/web/javascript/reference/global_objects/array/filter/index.html @@ -1,7 +1,8 @@ --- title: Array.prototype.filter() -slug: Web/JavaScript/Referencia/Objectes_globals/Array/filter +slug: Web/JavaScript/Reference/Global_Objects/Array/filter translation_of: Web/JavaScript/Reference/Global_Objects/Array/filter +original_slug: Web/JavaScript/Referencia/Objectes_globals/Array/filter ---
    {{JSRef}}
    diff --git a/files/ca/web/javascript/reference/global_objects/array/find/index.html b/files/ca/web/javascript/reference/global_objects/array/find/index.html index 8ee7742c09..ee78fa7de2 100644 --- a/files/ca/web/javascript/reference/global_objects/array/find/index.html +++ b/files/ca/web/javascript/reference/global_objects/array/find/index.html @@ -1,7 +1,8 @@ --- title: Array.prototype.find() -slug: Web/JavaScript/Referencia/Objectes_globals/Array/find +slug: Web/JavaScript/Reference/Global_Objects/Array/find translation_of: Web/JavaScript/Reference/Global_Objects/Array/find +original_slug: Web/JavaScript/Referencia/Objectes_globals/Array/find ---
    {{JSRef}}
    diff --git a/files/ca/web/javascript/reference/global_objects/array/findindex/index.html b/files/ca/web/javascript/reference/global_objects/array/findindex/index.html index 5b089bdb98..4fdca8cbbf 100644 --- a/files/ca/web/javascript/reference/global_objects/array/findindex/index.html +++ b/files/ca/web/javascript/reference/global_objects/array/findindex/index.html @@ -1,7 +1,8 @@ --- title: Array.prototype.findIndex() -slug: Web/JavaScript/Referencia/Objectes_globals/Array/findIndex +slug: Web/JavaScript/Reference/Global_Objects/Array/findIndex translation_of: Web/JavaScript/Reference/Global_Objects/Array/findIndex +original_slug: Web/JavaScript/Referencia/Objectes_globals/Array/findIndex ---
    {{JSRef}}
    diff --git a/files/ca/web/javascript/reference/global_objects/array/foreach/index.html b/files/ca/web/javascript/reference/global_objects/array/foreach/index.html index 4d391346eb..8af3bee901 100644 --- a/files/ca/web/javascript/reference/global_objects/array/foreach/index.html +++ b/files/ca/web/javascript/reference/global_objects/array/foreach/index.html @@ -1,7 +1,8 @@ --- title: Array.prototype.forEach() -slug: Web/JavaScript/Referencia/Objectes_globals/Array/forEach +slug: Web/JavaScript/Reference/Global_Objects/Array/forEach translation_of: Web/JavaScript/Reference/Global_Objects/Array/forEach +original_slug: Web/JavaScript/Referencia/Objectes_globals/Array/forEach ---
    {{JSRef}}
    diff --git a/files/ca/web/javascript/reference/global_objects/array/includes/index.html b/files/ca/web/javascript/reference/global_objects/array/includes/index.html index 9f64b0e117..b788348abb 100644 --- a/files/ca/web/javascript/reference/global_objects/array/includes/index.html +++ b/files/ca/web/javascript/reference/global_objects/array/includes/index.html @@ -1,7 +1,8 @@ --- title: Array.prototype.includes() -slug: Web/JavaScript/Referencia/Objectes_globals/Array/includes +slug: Web/JavaScript/Reference/Global_Objects/Array/includes translation_of: Web/JavaScript/Reference/Global_Objects/Array/includes +original_slug: Web/JavaScript/Referencia/Objectes_globals/Array/includes ---
    {{JSRef}}
    diff --git a/files/ca/web/javascript/reference/global_objects/array/index.html b/files/ca/web/javascript/reference/global_objects/array/index.html index da7c400799..0ef89dabaa 100644 --- a/files/ca/web/javascript/reference/global_objects/array/index.html +++ b/files/ca/web/javascript/reference/global_objects/array/index.html @@ -1,7 +1,8 @@ --- title: Array -slug: Web/JavaScript/Referencia/Objectes_globals/Array +slug: Web/JavaScript/Reference/Global_Objects/Array translation_of: Web/JavaScript/Reference/Global_Objects/Array +original_slug: Web/JavaScript/Referencia/Objectes_globals/Array ---
    {{JSRef}}
    diff --git a/files/ca/web/javascript/reference/global_objects/array/indexof/index.html b/files/ca/web/javascript/reference/global_objects/array/indexof/index.html index 939571a0c8..ad8d5df1a9 100644 --- a/files/ca/web/javascript/reference/global_objects/array/indexof/index.html +++ b/files/ca/web/javascript/reference/global_objects/array/indexof/index.html @@ -1,7 +1,8 @@ --- title: Array.prototype.indexOf() -slug: Web/JavaScript/Referencia/Objectes_globals/Array/indexOf +slug: Web/JavaScript/Reference/Global_Objects/Array/indexOf translation_of: Web/JavaScript/Reference/Global_Objects/Array/indexOf +original_slug: Web/JavaScript/Referencia/Objectes_globals/Array/indexOf ---
    {{JSRef}}
    diff --git a/files/ca/web/javascript/reference/global_objects/array/isarray/index.html b/files/ca/web/javascript/reference/global_objects/array/isarray/index.html index 6393dde86f..1b2d93532e 100644 --- a/files/ca/web/javascript/reference/global_objects/array/isarray/index.html +++ b/files/ca/web/javascript/reference/global_objects/array/isarray/index.html @@ -1,7 +1,8 @@ --- title: Array.isArray() -slug: Web/JavaScript/Referencia/Objectes_globals/Array/isArray +slug: Web/JavaScript/Reference/Global_Objects/Array/isArray translation_of: Web/JavaScript/Reference/Global_Objects/Array/isArray +original_slug: Web/JavaScript/Referencia/Objectes_globals/Array/isArray ---
    {{JSRef}}
    diff --git a/files/ca/web/javascript/reference/global_objects/array/join/index.html b/files/ca/web/javascript/reference/global_objects/array/join/index.html index 8d76b4474a..5f844f89db 100644 --- a/files/ca/web/javascript/reference/global_objects/array/join/index.html +++ b/files/ca/web/javascript/reference/global_objects/array/join/index.html @@ -1,7 +1,8 @@ --- title: Array.prototype.join() -slug: Web/JavaScript/Referencia/Objectes_globals/Array/join +slug: Web/JavaScript/Reference/Global_Objects/Array/join translation_of: Web/JavaScript/Reference/Global_Objects/Array/join +original_slug: Web/JavaScript/Referencia/Objectes_globals/Array/join ---
    {{JSRef}}
    diff --git a/files/ca/web/javascript/reference/global_objects/array/keys/index.html b/files/ca/web/javascript/reference/global_objects/array/keys/index.html index 7d9df8e1f5..a03db832c5 100644 --- a/files/ca/web/javascript/reference/global_objects/array/keys/index.html +++ b/files/ca/web/javascript/reference/global_objects/array/keys/index.html @@ -1,7 +1,8 @@ --- title: Array.prototype.keys() -slug: Web/JavaScript/Referencia/Objectes_globals/Array/keys +slug: Web/JavaScript/Reference/Global_Objects/Array/keys translation_of: Web/JavaScript/Reference/Global_Objects/Array/keys +original_slug: Web/JavaScript/Referencia/Objectes_globals/Array/keys ---
    {{JSRef}}
    diff --git a/files/ca/web/javascript/reference/global_objects/array/lastindexof/index.html b/files/ca/web/javascript/reference/global_objects/array/lastindexof/index.html index 038aa614e5..2f8cd34a5f 100644 --- a/files/ca/web/javascript/reference/global_objects/array/lastindexof/index.html +++ b/files/ca/web/javascript/reference/global_objects/array/lastindexof/index.html @@ -1,7 +1,8 @@ --- title: Array.prototype.lastIndexOf() -slug: Web/JavaScript/Referencia/Objectes_globals/Array/lastIndexOf +slug: Web/JavaScript/Reference/Global_Objects/Array/lastIndexOf translation_of: Web/JavaScript/Reference/Global_Objects/Array/lastIndexOf +original_slug: Web/JavaScript/Referencia/Objectes_globals/Array/lastIndexOf ---
    {{JSRef}}
    diff --git a/files/ca/web/javascript/reference/global_objects/array/length/index.html b/files/ca/web/javascript/reference/global_objects/array/length/index.html index a4954565ff..48d1e75e3f 100644 --- a/files/ca/web/javascript/reference/global_objects/array/length/index.html +++ b/files/ca/web/javascript/reference/global_objects/array/length/index.html @@ -1,7 +1,8 @@ --- title: Array.prototype.length -slug: Web/JavaScript/Referencia/Objectes_globals/Array/length +slug: Web/JavaScript/Reference/Global_Objects/Array/length translation_of: Web/JavaScript/Reference/Global_Objects/Array/length +original_slug: Web/JavaScript/Referencia/Objectes_globals/Array/length ---
    {{JSRef}}
    diff --git a/files/ca/web/javascript/reference/global_objects/array/map/index.html b/files/ca/web/javascript/reference/global_objects/array/map/index.html index 6f0dc1a0d4..930623a2fb 100644 --- a/files/ca/web/javascript/reference/global_objects/array/map/index.html +++ b/files/ca/web/javascript/reference/global_objects/array/map/index.html @@ -1,7 +1,8 @@ --- title: Array.prototype.map() -slug: Web/JavaScript/Referencia/Objectes_globals/Array/map +slug: Web/JavaScript/Reference/Global_Objects/Array/map translation_of: Web/JavaScript/Reference/Global_Objects/Array/map +original_slug: Web/JavaScript/Referencia/Objectes_globals/Array/map ---
    {{JSRef("Global_Objects", "Array")}}
    diff --git a/files/ca/web/javascript/reference/global_objects/array/of/index.html b/files/ca/web/javascript/reference/global_objects/array/of/index.html index efe2d96abd..d6eee05728 100644 --- a/files/ca/web/javascript/reference/global_objects/array/of/index.html +++ b/files/ca/web/javascript/reference/global_objects/array/of/index.html @@ -1,7 +1,8 @@ --- title: Array.of() -slug: Web/JavaScript/Referencia/Objectes_globals/Array/of +slug: Web/JavaScript/Reference/Global_Objects/Array/of translation_of: Web/JavaScript/Reference/Global_Objects/Array/of +original_slug: Web/JavaScript/Referencia/Objectes_globals/Array/of ---
    {{JSRef}}
    diff --git a/files/ca/web/javascript/reference/global_objects/array/pop/index.html b/files/ca/web/javascript/reference/global_objects/array/pop/index.html index 7d2ee3189f..0cc77f2b8a 100644 --- a/files/ca/web/javascript/reference/global_objects/array/pop/index.html +++ b/files/ca/web/javascript/reference/global_objects/array/pop/index.html @@ -1,7 +1,8 @@ --- title: Array.prototype.pop() -slug: Web/JavaScript/Referencia/Objectes_globals/Array/pop +slug: Web/JavaScript/Reference/Global_Objects/Array/pop translation_of: Web/JavaScript/Reference/Global_Objects/Array/pop +original_slug: Web/JavaScript/Referencia/Objectes_globals/Array/pop ---
    {{JSRef}}
    diff --git a/files/ca/web/javascript/reference/global_objects/array/push/index.html b/files/ca/web/javascript/reference/global_objects/array/push/index.html index 5770e5a10c..ff50bb46e4 100644 --- a/files/ca/web/javascript/reference/global_objects/array/push/index.html +++ b/files/ca/web/javascript/reference/global_objects/array/push/index.html @@ -1,7 +1,8 @@ --- title: Array.prototype.push() -slug: Web/JavaScript/Referencia/Objectes_globals/Array/push +slug: Web/JavaScript/Reference/Global_Objects/Array/push translation_of: Web/JavaScript/Reference/Global_Objects/Array/push +original_slug: Web/JavaScript/Referencia/Objectes_globals/Array/push ---
    {{JSRef}}
    diff --git a/files/ca/web/javascript/reference/global_objects/array/reduce/index.html b/files/ca/web/javascript/reference/global_objects/array/reduce/index.html index fa6253fd0c..e755078556 100644 --- a/files/ca/web/javascript/reference/global_objects/array/reduce/index.html +++ b/files/ca/web/javascript/reference/global_objects/array/reduce/index.html @@ -1,7 +1,8 @@ --- title: Array.prototype.reduce() -slug: Web/JavaScript/Referencia/Objectes_globals/Array/Reduce +slug: Web/JavaScript/Reference/Global_Objects/Array/Reduce translation_of: Web/JavaScript/Reference/Global_Objects/Array/Reduce +original_slug: Web/JavaScript/Referencia/Objectes_globals/Array/Reduce ---
    {{JSRef}}
    diff --git a/files/ca/web/javascript/reference/global_objects/array/reverse/index.html b/files/ca/web/javascript/reference/global_objects/array/reverse/index.html index 2528cabdc5..a5e8e63544 100644 --- a/files/ca/web/javascript/reference/global_objects/array/reverse/index.html +++ b/files/ca/web/javascript/reference/global_objects/array/reverse/index.html @@ -1,7 +1,8 @@ --- title: Array.prototype.reverse() -slug: Web/JavaScript/Referencia/Objectes_globals/Array/reverse +slug: Web/JavaScript/Reference/Global_Objects/Array/reverse translation_of: Web/JavaScript/Reference/Global_Objects/Array/reverse +original_slug: Web/JavaScript/Referencia/Objectes_globals/Array/reverse ---
    {{JSRef}}
    diff --git a/files/ca/web/javascript/reference/global_objects/array/shift/index.html b/files/ca/web/javascript/reference/global_objects/array/shift/index.html index 7b5fa1b330..b02863aa85 100644 --- a/files/ca/web/javascript/reference/global_objects/array/shift/index.html +++ b/files/ca/web/javascript/reference/global_objects/array/shift/index.html @@ -1,7 +1,8 @@ --- title: Array.prototype.shift() -slug: Web/JavaScript/Referencia/Objectes_globals/Array/shift +slug: Web/JavaScript/Reference/Global_Objects/Array/shift translation_of: Web/JavaScript/Reference/Global_Objects/Array/shift +original_slug: Web/JavaScript/Referencia/Objectes_globals/Array/shift ---
    {{JSRef}}
    diff --git a/files/ca/web/javascript/reference/global_objects/array/slice/index.html b/files/ca/web/javascript/reference/global_objects/array/slice/index.html index d181f94a65..1b5f5e812d 100644 --- a/files/ca/web/javascript/reference/global_objects/array/slice/index.html +++ b/files/ca/web/javascript/reference/global_objects/array/slice/index.html @@ -1,7 +1,8 @@ --- title: Array.prototype.slice() -slug: Web/JavaScript/Referencia/Objectes_globals/Array/slice +slug: Web/JavaScript/Reference/Global_Objects/Array/slice translation_of: Web/JavaScript/Reference/Global_Objects/Array/slice +original_slug: Web/JavaScript/Referencia/Objectes_globals/Array/slice ---
    {{JSRef}}
    diff --git a/files/ca/web/javascript/reference/global_objects/array/some/index.html b/files/ca/web/javascript/reference/global_objects/array/some/index.html index 7abc1ed76d..cd908daa39 100644 --- a/files/ca/web/javascript/reference/global_objects/array/some/index.html +++ b/files/ca/web/javascript/reference/global_objects/array/some/index.html @@ -1,7 +1,8 @@ --- title: Array.prototype.some() -slug: Web/JavaScript/Referencia/Objectes_globals/Array/some +slug: Web/JavaScript/Reference/Global_Objects/Array/some translation_of: Web/JavaScript/Reference/Global_Objects/Array/some +original_slug: Web/JavaScript/Referencia/Objectes_globals/Array/some ---
    {{JSRef}}
    diff --git a/files/ca/web/javascript/reference/global_objects/array/splice/index.html b/files/ca/web/javascript/reference/global_objects/array/splice/index.html index c1abada8d9..c47f9df482 100644 --- a/files/ca/web/javascript/reference/global_objects/array/splice/index.html +++ b/files/ca/web/javascript/reference/global_objects/array/splice/index.html @@ -1,7 +1,8 @@ --- title: Array.prototype.splice() -slug: Web/JavaScript/Referencia/Objectes_globals/Array/splice +slug: Web/JavaScript/Reference/Global_Objects/Array/splice translation_of: Web/JavaScript/Reference/Global_Objects/Array/splice +original_slug: Web/JavaScript/Referencia/Objectes_globals/Array/splice ---
    {{JSRef}}
    diff --git a/files/ca/web/javascript/reference/global_objects/boolean/index.html b/files/ca/web/javascript/reference/global_objects/boolean/index.html index 83f2597df9..d0a6d6eef7 100644 --- a/files/ca/web/javascript/reference/global_objects/boolean/index.html +++ b/files/ca/web/javascript/reference/global_objects/boolean/index.html @@ -1,7 +1,8 @@ --- title: Boolean -slug: Web/JavaScript/Referencia/Objectes_globals/Boolean +slug: Web/JavaScript/Reference/Global_Objects/Boolean translation_of: Web/JavaScript/Reference/Global_Objects/Boolean +original_slug: Web/JavaScript/Referencia/Objectes_globals/Boolean ---
    {{JSRef("Global_Objects", "Boolean")}}
    diff --git a/files/ca/web/javascript/reference/global_objects/boolean/tosource/index.html b/files/ca/web/javascript/reference/global_objects/boolean/tosource/index.html index 6b6a1b8b2b..265643c1da 100644 --- a/files/ca/web/javascript/reference/global_objects/boolean/tosource/index.html +++ b/files/ca/web/javascript/reference/global_objects/boolean/tosource/index.html @@ -1,7 +1,8 @@ --- title: Boolean.prototype.toSource() -slug: Web/JavaScript/Referencia/Objectes_globals/Boolean/toSource +slug: Web/JavaScript/Reference/Global_Objects/Boolean/toSource translation_of: Web/JavaScript/Reference/Global_Objects/Boolean/toSource +original_slug: Web/JavaScript/Referencia/Objectes_globals/Boolean/toSource ---
    {{JSRef("Objectes_standard", "Boolean")}} {{non-standard_header}}
    diff --git a/files/ca/web/javascript/reference/global_objects/boolean/tostring/index.html b/files/ca/web/javascript/reference/global_objects/boolean/tostring/index.html index 90da6cba3a..1a7aedf3da 100644 --- a/files/ca/web/javascript/reference/global_objects/boolean/tostring/index.html +++ b/files/ca/web/javascript/reference/global_objects/boolean/tostring/index.html @@ -1,7 +1,8 @@ --- title: Boolean.prototype.toString() -slug: Web/JavaScript/Referencia/Objectes_globals/Boolean/toString +slug: Web/JavaScript/Reference/Global_Objects/Boolean/toString translation_of: Web/JavaScript/Reference/Global_Objects/Boolean/toString +original_slug: Web/JavaScript/Referencia/Objectes_globals/Boolean/toString ---
    {{JSRef("Global_Objects", "Boolean")}}
    diff --git a/files/ca/web/javascript/reference/global_objects/boolean/valueof/index.html b/files/ca/web/javascript/reference/global_objects/boolean/valueof/index.html index f99fd3c6c0..100f22e3b0 100644 --- a/files/ca/web/javascript/reference/global_objects/boolean/valueof/index.html +++ b/files/ca/web/javascript/reference/global_objects/boolean/valueof/index.html @@ -1,7 +1,8 @@ --- title: Boolean.prototype.valueOf() -slug: Web/JavaScript/Referencia/Objectes_globals/Boolean/valueOf +slug: Web/JavaScript/Reference/Global_Objects/Boolean/valueOf translation_of: Web/JavaScript/Reference/Global_Objects/Boolean/valueOf +original_slug: Web/JavaScript/Referencia/Objectes_globals/Boolean/valueOf ---
    {{JSRef("Global_Objects", "Boolean")}}
    diff --git a/files/ca/web/javascript/reference/global_objects/date/getdate/index.html b/files/ca/web/javascript/reference/global_objects/date/getdate/index.html index 16808aaae0..e9ba71eaa3 100644 --- a/files/ca/web/javascript/reference/global_objects/date/getdate/index.html +++ b/files/ca/web/javascript/reference/global_objects/date/getdate/index.html @@ -1,7 +1,8 @@ --- title: Date.prototype.getDate() -slug: Web/JavaScript/Referencia/Objectes_globals/Date/getDate +slug: Web/JavaScript/Reference/Global_Objects/Date/getDate translation_of: Web/JavaScript/Reference/Global_Objects/Date/getDate +original_slug: Web/JavaScript/Referencia/Objectes_globals/Date/getDate ---
    {{JSRef}}
    diff --git a/files/ca/web/javascript/reference/global_objects/date/getday/index.html b/files/ca/web/javascript/reference/global_objects/date/getday/index.html index 244562c167..6a620028bc 100644 --- a/files/ca/web/javascript/reference/global_objects/date/getday/index.html +++ b/files/ca/web/javascript/reference/global_objects/date/getday/index.html @@ -1,7 +1,8 @@ --- title: Date.prototype.getDay() -slug: Web/JavaScript/Referencia/Objectes_globals/Date/getDay +slug: Web/JavaScript/Reference/Global_Objects/Date/getDay translation_of: Web/JavaScript/Reference/Global_Objects/Date/getDay +original_slug: Web/JavaScript/Referencia/Objectes_globals/Date/getDay ---
    {{JSRef("Global_Objects", "Date")}}
    diff --git a/files/ca/web/javascript/reference/global_objects/date/getfullyear/index.html b/files/ca/web/javascript/reference/global_objects/date/getfullyear/index.html index 94f14f4332..6e467808fa 100644 --- a/files/ca/web/javascript/reference/global_objects/date/getfullyear/index.html +++ b/files/ca/web/javascript/reference/global_objects/date/getfullyear/index.html @@ -1,7 +1,8 @@ --- title: Date.prototype.getFullYear() -slug: Web/JavaScript/Referencia/Objectes_globals/Date/getFullYear +slug: Web/JavaScript/Reference/Global_Objects/Date/getFullYear translation_of: Web/JavaScript/Reference/Global_Objects/Date/getFullYear +original_slug: Web/JavaScript/Referencia/Objectes_globals/Date/getFullYear ---
    {{JSRef("Global_Objects", "Date")}}
    diff --git a/files/ca/web/javascript/reference/global_objects/date/gethours/index.html b/files/ca/web/javascript/reference/global_objects/date/gethours/index.html index 3848e96339..ea34821f17 100644 --- a/files/ca/web/javascript/reference/global_objects/date/gethours/index.html +++ b/files/ca/web/javascript/reference/global_objects/date/gethours/index.html @@ -1,7 +1,8 @@ --- title: Date.prototype.getHours() -slug: Web/JavaScript/Referencia/Objectes_globals/Date/getHours +slug: Web/JavaScript/Reference/Global_Objects/Date/getHours translation_of: Web/JavaScript/Reference/Global_Objects/Date/getHours +original_slug: Web/JavaScript/Referencia/Objectes_globals/Date/getHours ---
    {{JSRef("Global_Objects", "Date")}}
    diff --git a/files/ca/web/javascript/reference/global_objects/date/getmilliseconds/index.html b/files/ca/web/javascript/reference/global_objects/date/getmilliseconds/index.html index d438cf8cad..380e186bd7 100644 --- a/files/ca/web/javascript/reference/global_objects/date/getmilliseconds/index.html +++ b/files/ca/web/javascript/reference/global_objects/date/getmilliseconds/index.html @@ -1,7 +1,8 @@ --- title: Date.prototype.getMilliseconds() -slug: Web/JavaScript/Referencia/Objectes_globals/Date/getMilliseconds +slug: Web/JavaScript/Reference/Global_Objects/Date/getMilliseconds translation_of: Web/JavaScript/Reference/Global_Objects/Date/getMilliseconds +original_slug: Web/JavaScript/Referencia/Objectes_globals/Date/getMilliseconds ---
    {{JSRef("Global_Objects", "Date")}}
    diff --git a/files/ca/web/javascript/reference/global_objects/date/getminutes/index.html b/files/ca/web/javascript/reference/global_objects/date/getminutes/index.html index 3ae466d56d..61f178907f 100644 --- a/files/ca/web/javascript/reference/global_objects/date/getminutes/index.html +++ b/files/ca/web/javascript/reference/global_objects/date/getminutes/index.html @@ -1,7 +1,8 @@ --- title: Date.prototype.getMinutes() -slug: Web/JavaScript/Referencia/Objectes_globals/Date/getMinutes +slug: Web/JavaScript/Reference/Global_Objects/Date/getMinutes translation_of: Web/JavaScript/Reference/Global_Objects/Date/getMinutes +original_slug: Web/JavaScript/Referencia/Objectes_globals/Date/getMinutes ---
    {{JSRef("Global_Objects", "Date")}}
    diff --git a/files/ca/web/javascript/reference/global_objects/date/getmonth/index.html b/files/ca/web/javascript/reference/global_objects/date/getmonth/index.html index 2631ebef9a..116c4dfea9 100644 --- a/files/ca/web/javascript/reference/global_objects/date/getmonth/index.html +++ b/files/ca/web/javascript/reference/global_objects/date/getmonth/index.html @@ -1,7 +1,8 @@ --- title: Date.prototype.getMonth() -slug: Web/JavaScript/Referencia/Objectes_globals/Date/getMonth +slug: Web/JavaScript/Reference/Global_Objects/Date/getMonth translation_of: Web/JavaScript/Reference/Global_Objects/Date/getMonth +original_slug: Web/JavaScript/Referencia/Objectes_globals/Date/getMonth ---
    {{JSRef("Global_Objects", "Date")}}
    diff --git a/files/ca/web/javascript/reference/global_objects/date/getseconds/index.html b/files/ca/web/javascript/reference/global_objects/date/getseconds/index.html index 790c62e3e9..45c8e5f80d 100644 --- a/files/ca/web/javascript/reference/global_objects/date/getseconds/index.html +++ b/files/ca/web/javascript/reference/global_objects/date/getseconds/index.html @@ -1,7 +1,8 @@ --- title: Date.prototype.getSeconds() -slug: Web/JavaScript/Referencia/Objectes_globals/Date/getSeconds +slug: Web/JavaScript/Reference/Global_Objects/Date/getSeconds translation_of: Web/JavaScript/Reference/Global_Objects/Date/getSeconds +original_slug: Web/JavaScript/Referencia/Objectes_globals/Date/getSeconds ---
    {{JSRef("Global_Objects", "Date")}}
    diff --git a/files/ca/web/javascript/reference/global_objects/date/gettime/index.html b/files/ca/web/javascript/reference/global_objects/date/gettime/index.html index 20c45f31c5..5c85239ec4 100644 --- a/files/ca/web/javascript/reference/global_objects/date/gettime/index.html +++ b/files/ca/web/javascript/reference/global_objects/date/gettime/index.html @@ -1,7 +1,8 @@ --- title: Date.prototype.getTime() -slug: Web/JavaScript/Referencia/Objectes_globals/Date/getTime +slug: Web/JavaScript/Reference/Global_Objects/Date/getTime translation_of: Web/JavaScript/Reference/Global_Objects/Date/getTime +original_slug: Web/JavaScript/Referencia/Objectes_globals/Date/getTime ---
    {{JSRef}}
    diff --git a/files/ca/web/javascript/reference/global_objects/date/gettimezoneoffset/index.html b/files/ca/web/javascript/reference/global_objects/date/gettimezoneoffset/index.html index 8af4d6e9e8..9f67664c59 100644 --- a/files/ca/web/javascript/reference/global_objects/date/gettimezoneoffset/index.html +++ b/files/ca/web/javascript/reference/global_objects/date/gettimezoneoffset/index.html @@ -1,7 +1,8 @@ --- title: Date.prototype.getTimezoneOffset() -slug: Web/JavaScript/Referencia/Objectes_globals/Date/getTimezoneOffset +slug: Web/JavaScript/Reference/Global_Objects/Date/getTimezoneOffset translation_of: Web/JavaScript/Reference/Global_Objects/Date/getTimezoneOffset +original_slug: Web/JavaScript/Referencia/Objectes_globals/Date/getTimezoneOffset ---
    {{JSRef("Global_Objects", "Date")}}
    diff --git a/files/ca/web/javascript/reference/global_objects/date/getutcdate/index.html b/files/ca/web/javascript/reference/global_objects/date/getutcdate/index.html index ee3a8b881f..178c8cad0e 100644 --- a/files/ca/web/javascript/reference/global_objects/date/getutcdate/index.html +++ b/files/ca/web/javascript/reference/global_objects/date/getutcdate/index.html @@ -1,7 +1,8 @@ --- title: Date.prototype.getUTCDate() -slug: Web/JavaScript/Referencia/Objectes_globals/Date/getUTCDate +slug: Web/JavaScript/Reference/Global_Objects/Date/getUTCDate translation_of: Web/JavaScript/Reference/Global_Objects/Date/getUTCDate +original_slug: Web/JavaScript/Referencia/Objectes_globals/Date/getUTCDate ---
    {{JSRef("Global_Objects", "Date")}}
    diff --git a/files/ca/web/javascript/reference/global_objects/date/getutcday/index.html b/files/ca/web/javascript/reference/global_objects/date/getutcday/index.html index b6f992f9a1..038c5af825 100644 --- a/files/ca/web/javascript/reference/global_objects/date/getutcday/index.html +++ b/files/ca/web/javascript/reference/global_objects/date/getutcday/index.html @@ -1,7 +1,8 @@ --- title: Date.prototype.getUTCDay() -slug: Web/JavaScript/Referencia/Objectes_globals/Date/getUTCDay +slug: Web/JavaScript/Reference/Global_Objects/Date/getUTCDay translation_of: Web/JavaScript/Reference/Global_Objects/Date/getUTCDay +original_slug: Web/JavaScript/Referencia/Objectes_globals/Date/getUTCDay ---
    {{JSRef("Global_Objects", "Date")}}
    diff --git a/files/ca/web/javascript/reference/global_objects/date/getutcfullyear/index.html b/files/ca/web/javascript/reference/global_objects/date/getutcfullyear/index.html index 3ca1526e28..f3a86468da 100644 --- a/files/ca/web/javascript/reference/global_objects/date/getutcfullyear/index.html +++ b/files/ca/web/javascript/reference/global_objects/date/getutcfullyear/index.html @@ -1,7 +1,8 @@ --- title: Date.prototype.getUTCFullYear() -slug: Web/JavaScript/Referencia/Objectes_globals/Date/getUTCFullYear +slug: Web/JavaScript/Reference/Global_Objects/Date/getUTCFullYear translation_of: Web/JavaScript/Reference/Global_Objects/Date/getUTCFullYear +original_slug: Web/JavaScript/Referencia/Objectes_globals/Date/getUTCFullYear ---
    {{JSRef("Global_Objects", "Date")}}
    diff --git a/files/ca/web/javascript/reference/global_objects/date/getutchours/index.html b/files/ca/web/javascript/reference/global_objects/date/getutchours/index.html index f575df92a1..2943f226e1 100644 --- a/files/ca/web/javascript/reference/global_objects/date/getutchours/index.html +++ b/files/ca/web/javascript/reference/global_objects/date/getutchours/index.html @@ -1,7 +1,8 @@ --- title: Date.prototype.getUTCHours() -slug: Web/JavaScript/Referencia/Objectes_globals/Date/getUTCHours +slug: Web/JavaScript/Reference/Global_Objects/Date/getUTCHours translation_of: Web/JavaScript/Reference/Global_Objects/Date/getUTCHours +original_slug: Web/JavaScript/Referencia/Objectes_globals/Date/getUTCHours ---
    {{JSRef("Global_Objects", "Date")}}
    diff --git a/files/ca/web/javascript/reference/global_objects/date/getutcmilliseconds/index.html b/files/ca/web/javascript/reference/global_objects/date/getutcmilliseconds/index.html index d09ac5bded..093b9c3157 100644 --- a/files/ca/web/javascript/reference/global_objects/date/getutcmilliseconds/index.html +++ b/files/ca/web/javascript/reference/global_objects/date/getutcmilliseconds/index.html @@ -1,7 +1,8 @@ --- title: Date.prototype.getUTCMilliseconds() -slug: Web/JavaScript/Referencia/Objectes_globals/Date/getUTCMilliseconds +slug: Web/JavaScript/Reference/Global_Objects/Date/getUTCMilliseconds translation_of: Web/JavaScript/Reference/Global_Objects/Date/getUTCMilliseconds +original_slug: Web/JavaScript/Referencia/Objectes_globals/Date/getUTCMilliseconds ---
    {{JSRef}}
    diff --git a/files/ca/web/javascript/reference/global_objects/date/getutcminutes/index.html b/files/ca/web/javascript/reference/global_objects/date/getutcminutes/index.html index e18a13c52f..32d2c61830 100644 --- a/files/ca/web/javascript/reference/global_objects/date/getutcminutes/index.html +++ b/files/ca/web/javascript/reference/global_objects/date/getutcminutes/index.html @@ -1,7 +1,8 @@ --- title: Date.prototype.getUTCMinutes() -slug: Web/JavaScript/Referencia/Objectes_globals/Date/getUTCMinutes +slug: Web/JavaScript/Reference/Global_Objects/Date/getUTCMinutes translation_of: Web/JavaScript/Reference/Global_Objects/Date/getUTCMinutes +original_slug: Web/JavaScript/Referencia/Objectes_globals/Date/getUTCMinutes ---
    {{JSRef}}
    diff --git a/files/ca/web/javascript/reference/global_objects/date/getutcmonth/index.html b/files/ca/web/javascript/reference/global_objects/date/getutcmonth/index.html index 48ba78349b..7c7556e416 100644 --- a/files/ca/web/javascript/reference/global_objects/date/getutcmonth/index.html +++ b/files/ca/web/javascript/reference/global_objects/date/getutcmonth/index.html @@ -1,7 +1,8 @@ --- title: Date.prototype.getUTCMonth() -slug: Web/JavaScript/Referencia/Objectes_globals/Date/getUTCMonth +slug: Web/JavaScript/Reference/Global_Objects/Date/getUTCMonth translation_of: Web/JavaScript/Reference/Global_Objects/Date/getUTCMonth +original_slug: Web/JavaScript/Referencia/Objectes_globals/Date/getUTCMonth ---
    {{JSRef}}
    diff --git a/files/ca/web/javascript/reference/global_objects/date/getutcseconds/index.html b/files/ca/web/javascript/reference/global_objects/date/getutcseconds/index.html index 1f69ca8199..187652befe 100644 --- a/files/ca/web/javascript/reference/global_objects/date/getutcseconds/index.html +++ b/files/ca/web/javascript/reference/global_objects/date/getutcseconds/index.html @@ -1,7 +1,8 @@ --- title: Date.prototype.getUTCSeconds() -slug: Web/JavaScript/Referencia/Objectes_globals/Date/getUTCSeconds +slug: Web/JavaScript/Reference/Global_Objects/Date/getUTCSeconds translation_of: Web/JavaScript/Reference/Global_Objects/Date/getUTCSeconds +original_slug: Web/JavaScript/Referencia/Objectes_globals/Date/getUTCSeconds ---
    {{JSRef("Global_Objects", "Date")}}
    diff --git a/files/ca/web/javascript/reference/global_objects/date/getyear/index.html b/files/ca/web/javascript/reference/global_objects/date/getyear/index.html index 8724b2e03b..6e7a3ccfd0 100644 --- a/files/ca/web/javascript/reference/global_objects/date/getyear/index.html +++ b/files/ca/web/javascript/reference/global_objects/date/getyear/index.html @@ -1,7 +1,8 @@ --- title: Date.prototype.getYear() -slug: Web/JavaScript/Referencia/Objectes_globals/Date/getYear +slug: Web/JavaScript/Reference/Global_Objects/Date/getYear translation_of: Web/JavaScript/Reference/Global_Objects/Date/getYear +original_slug: Web/JavaScript/Referencia/Objectes_globals/Date/getYear ---
    {{JSRef("Global_Objects", "Date")}} {{deprecated_header}}
    diff --git a/files/ca/web/javascript/reference/global_objects/date/index.html b/files/ca/web/javascript/reference/global_objects/date/index.html index 3fb5a9368d..734d90ce59 100644 --- a/files/ca/web/javascript/reference/global_objects/date/index.html +++ b/files/ca/web/javascript/reference/global_objects/date/index.html @@ -1,7 +1,8 @@ --- title: Date -slug: Web/JavaScript/Referencia/Objectes_globals/Date +slug: Web/JavaScript/Reference/Global_Objects/Date translation_of: Web/JavaScript/Reference/Global_Objects/Date +original_slug: Web/JavaScript/Referencia/Objectes_globals/Date ---
    {{JSRef("Global_Objects", "Date")}}
    diff --git a/files/ca/web/javascript/reference/global_objects/date/now/index.html b/files/ca/web/javascript/reference/global_objects/date/now/index.html index c3ef05fa86..35da70bdaf 100644 --- a/files/ca/web/javascript/reference/global_objects/date/now/index.html +++ b/files/ca/web/javascript/reference/global_objects/date/now/index.html @@ -1,7 +1,8 @@ --- title: Date.now() -slug: Web/JavaScript/Referencia/Objectes_globals/Date/now +slug: Web/JavaScript/Reference/Global_Objects/Date/now translation_of: Web/JavaScript/Reference/Global_Objects/Date/now +original_slug: Web/JavaScript/Referencia/Objectes_globals/Date/now ---
    {{JSRef("Global_Objects", "Date")}}
    diff --git a/files/ca/web/javascript/reference/global_objects/date/setdate/index.html b/files/ca/web/javascript/reference/global_objects/date/setdate/index.html index 746de134fe..3fcf353338 100644 --- a/files/ca/web/javascript/reference/global_objects/date/setdate/index.html +++ b/files/ca/web/javascript/reference/global_objects/date/setdate/index.html @@ -1,7 +1,8 @@ --- title: Date.prototype.setDate() -slug: Web/JavaScript/Referencia/Objectes_globals/Date/setDate +slug: Web/JavaScript/Reference/Global_Objects/Date/setDate translation_of: Web/JavaScript/Reference/Global_Objects/Date/setDate +original_slug: Web/JavaScript/Referencia/Objectes_globals/Date/setDate ---
    {{JSRef}}
    diff --git a/files/ca/web/javascript/reference/global_objects/date/setfullyear/index.html b/files/ca/web/javascript/reference/global_objects/date/setfullyear/index.html index c29d56ca4e..551d128142 100644 --- a/files/ca/web/javascript/reference/global_objects/date/setfullyear/index.html +++ b/files/ca/web/javascript/reference/global_objects/date/setfullyear/index.html @@ -1,7 +1,8 @@ --- title: Date.prototype.setFullYear() -slug: Web/JavaScript/Referencia/Objectes_globals/Date/setFullYear +slug: Web/JavaScript/Reference/Global_Objects/Date/setFullYear translation_of: Web/JavaScript/Reference/Global_Objects/Date/setFullYear +original_slug: Web/JavaScript/Referencia/Objectes_globals/Date/setFullYear ---
    {{JSRef}}
    diff --git a/files/ca/web/javascript/reference/global_objects/date/sethours/index.html b/files/ca/web/javascript/reference/global_objects/date/sethours/index.html index 7f660ba344..acfde50c87 100644 --- a/files/ca/web/javascript/reference/global_objects/date/sethours/index.html +++ b/files/ca/web/javascript/reference/global_objects/date/sethours/index.html @@ -1,7 +1,8 @@ --- title: Date.prototype.setHours() -slug: Web/JavaScript/Referencia/Objectes_globals/Date/setHours +slug: Web/JavaScript/Reference/Global_Objects/Date/setHours translation_of: Web/JavaScript/Reference/Global_Objects/Date/setHours +original_slug: Web/JavaScript/Referencia/Objectes_globals/Date/setHours ---
    {{JSRef}}
    diff --git a/files/ca/web/javascript/reference/global_objects/date/setmilliseconds/index.html b/files/ca/web/javascript/reference/global_objects/date/setmilliseconds/index.html index 53dc451ad4..a7f121a2a9 100644 --- a/files/ca/web/javascript/reference/global_objects/date/setmilliseconds/index.html +++ b/files/ca/web/javascript/reference/global_objects/date/setmilliseconds/index.html @@ -1,7 +1,8 @@ --- title: Date.prototype.setMilliseconds() -slug: Web/JavaScript/Referencia/Objectes_globals/Date/setMilliseconds +slug: Web/JavaScript/Reference/Global_Objects/Date/setMilliseconds translation_of: Web/JavaScript/Reference/Global_Objects/Date/setMilliseconds +original_slug: Web/JavaScript/Referencia/Objectes_globals/Date/setMilliseconds ---
    {{JSRef}}
    diff --git a/files/ca/web/javascript/reference/global_objects/date/setminutes/index.html b/files/ca/web/javascript/reference/global_objects/date/setminutes/index.html index 7dba61cade..45067d7eaf 100644 --- a/files/ca/web/javascript/reference/global_objects/date/setminutes/index.html +++ b/files/ca/web/javascript/reference/global_objects/date/setminutes/index.html @@ -1,7 +1,8 @@ --- title: Date.prototype.setMinutes() -slug: Web/JavaScript/Referencia/Objectes_globals/Date/setMinutes +slug: Web/JavaScript/Reference/Global_Objects/Date/setMinutes translation_of: Web/JavaScript/Reference/Global_Objects/Date/setMinutes +original_slug: Web/JavaScript/Referencia/Objectes_globals/Date/setMinutes ---
    {{JSRef}}
    diff --git a/files/ca/web/javascript/reference/global_objects/date/setmonth/index.html b/files/ca/web/javascript/reference/global_objects/date/setmonth/index.html index a84f51df7c..b48ad8de43 100644 --- a/files/ca/web/javascript/reference/global_objects/date/setmonth/index.html +++ b/files/ca/web/javascript/reference/global_objects/date/setmonth/index.html @@ -1,7 +1,8 @@ --- title: Date.prototype.setMonth() -slug: Web/JavaScript/Referencia/Objectes_globals/Date/setMonth +slug: Web/JavaScript/Reference/Global_Objects/Date/setMonth translation_of: Web/JavaScript/Reference/Global_Objects/Date/setMonth +original_slug: Web/JavaScript/Referencia/Objectes_globals/Date/setMonth ---
    {{JSRef}}
    diff --git a/files/ca/web/javascript/reference/global_objects/date/setseconds/index.html b/files/ca/web/javascript/reference/global_objects/date/setseconds/index.html index 60ea2c0ae3..fb9e9a7ac7 100644 --- a/files/ca/web/javascript/reference/global_objects/date/setseconds/index.html +++ b/files/ca/web/javascript/reference/global_objects/date/setseconds/index.html @@ -1,7 +1,8 @@ --- title: Date.prototype.setSeconds() -slug: Web/JavaScript/Referencia/Objectes_globals/Date/setSeconds +slug: Web/JavaScript/Reference/Global_Objects/Date/setSeconds translation_of: Web/JavaScript/Reference/Global_Objects/Date/setSeconds +original_slug: Web/JavaScript/Referencia/Objectes_globals/Date/setSeconds ---
    {{JSRef}}
    diff --git a/files/ca/web/javascript/reference/global_objects/date/settime/index.html b/files/ca/web/javascript/reference/global_objects/date/settime/index.html index 9774f3ee4c..a05e9a3b9d 100644 --- a/files/ca/web/javascript/reference/global_objects/date/settime/index.html +++ b/files/ca/web/javascript/reference/global_objects/date/settime/index.html @@ -1,7 +1,8 @@ --- title: Date.prototype.setTime() -slug: Web/JavaScript/Referencia/Objectes_globals/Date/setTime +slug: Web/JavaScript/Reference/Global_Objects/Date/setTime translation_of: Web/JavaScript/Reference/Global_Objects/Date/setTime +original_slug: Web/JavaScript/Referencia/Objectes_globals/Date/setTime ---
    {{JSRef}}
    diff --git a/files/ca/web/javascript/reference/global_objects/date/setutcdate/index.html b/files/ca/web/javascript/reference/global_objects/date/setutcdate/index.html index 109178f66a..8c30510fd9 100644 --- a/files/ca/web/javascript/reference/global_objects/date/setutcdate/index.html +++ b/files/ca/web/javascript/reference/global_objects/date/setutcdate/index.html @@ -1,7 +1,8 @@ --- title: Date.prototype.setUTCDate() -slug: Web/JavaScript/Referencia/Objectes_globals/Date/setUTCDate +slug: Web/JavaScript/Reference/Global_Objects/Date/setUTCDate translation_of: Web/JavaScript/Reference/Global_Objects/Date/setUTCDate +original_slug: Web/JavaScript/Referencia/Objectes_globals/Date/setUTCDate ---
    {{JSRef}}
    diff --git a/files/ca/web/javascript/reference/global_objects/date/setutcfullyear/index.html b/files/ca/web/javascript/reference/global_objects/date/setutcfullyear/index.html index 55185a431b..3a3d274c1d 100644 --- a/files/ca/web/javascript/reference/global_objects/date/setutcfullyear/index.html +++ b/files/ca/web/javascript/reference/global_objects/date/setutcfullyear/index.html @@ -1,7 +1,8 @@ --- title: Date.prototype.setUTCFullYear() -slug: Web/JavaScript/Referencia/Objectes_globals/Date/setUTCFullYear +slug: Web/JavaScript/Reference/Global_Objects/Date/setUTCFullYear translation_of: Web/JavaScript/Reference/Global_Objects/Date/setUTCFullYear +original_slug: Web/JavaScript/Referencia/Objectes_globals/Date/setUTCFullYear ---
    {{JSRef}}
    diff --git a/files/ca/web/javascript/reference/global_objects/date/setutchours/index.html b/files/ca/web/javascript/reference/global_objects/date/setutchours/index.html index 3c75ea903c..e2c4deecb2 100644 --- a/files/ca/web/javascript/reference/global_objects/date/setutchours/index.html +++ b/files/ca/web/javascript/reference/global_objects/date/setutchours/index.html @@ -1,7 +1,8 @@ --- title: Date.prototype.setUTCHours() -slug: Web/JavaScript/Referencia/Objectes_globals/Date/setUTCHours +slug: Web/JavaScript/Reference/Global_Objects/Date/setUTCHours translation_of: Web/JavaScript/Reference/Global_Objects/Date/setUTCHours +original_slug: Web/JavaScript/Referencia/Objectes_globals/Date/setUTCHours ---
    {{JSRef}}
    diff --git a/files/ca/web/javascript/reference/global_objects/date/setutcmilliseconds/index.html b/files/ca/web/javascript/reference/global_objects/date/setutcmilliseconds/index.html index e3265e247f..14385ca42d 100644 --- a/files/ca/web/javascript/reference/global_objects/date/setutcmilliseconds/index.html +++ b/files/ca/web/javascript/reference/global_objects/date/setutcmilliseconds/index.html @@ -1,7 +1,8 @@ --- title: Date.prototype.setUTCMilliseconds() -slug: Web/JavaScript/Referencia/Objectes_globals/Date/setUTCMilliseconds +slug: Web/JavaScript/Reference/Global_Objects/Date/setUTCMilliseconds translation_of: Web/JavaScript/Reference/Global_Objects/Date/setUTCMilliseconds +original_slug: Web/JavaScript/Referencia/Objectes_globals/Date/setUTCMilliseconds ---
    {{JSRef}}
    diff --git a/files/ca/web/javascript/reference/global_objects/date/setutcminutes/index.html b/files/ca/web/javascript/reference/global_objects/date/setutcminutes/index.html index 5551364e52..50d71e72a8 100644 --- a/files/ca/web/javascript/reference/global_objects/date/setutcminutes/index.html +++ b/files/ca/web/javascript/reference/global_objects/date/setutcminutes/index.html @@ -1,7 +1,8 @@ --- title: Date.prototype.setUTCMinutes() -slug: Web/JavaScript/Referencia/Objectes_globals/Date/setUTCMinutes +slug: Web/JavaScript/Reference/Global_Objects/Date/setUTCMinutes translation_of: Web/JavaScript/Reference/Global_Objects/Date/setUTCMinutes +original_slug: Web/JavaScript/Referencia/Objectes_globals/Date/setUTCMinutes ---
    {{JSRef}}
    diff --git a/files/ca/web/javascript/reference/global_objects/date/setutcmonth/index.html b/files/ca/web/javascript/reference/global_objects/date/setutcmonth/index.html index e06f0fba64..da453f5a89 100644 --- a/files/ca/web/javascript/reference/global_objects/date/setutcmonth/index.html +++ b/files/ca/web/javascript/reference/global_objects/date/setutcmonth/index.html @@ -1,7 +1,8 @@ --- title: Date.prototype.setUTCMonth() -slug: Web/JavaScript/Referencia/Objectes_globals/Date/setUTCMonth +slug: Web/JavaScript/Reference/Global_Objects/Date/setUTCMonth translation_of: Web/JavaScript/Reference/Global_Objects/Date/setUTCMonth +original_slug: Web/JavaScript/Referencia/Objectes_globals/Date/setUTCMonth ---
    {{JSRef}}
    diff --git a/files/ca/web/javascript/reference/global_objects/date/setutcseconds/index.html b/files/ca/web/javascript/reference/global_objects/date/setutcseconds/index.html index 66f33a9e1b..f0f61fb1fe 100644 --- a/files/ca/web/javascript/reference/global_objects/date/setutcseconds/index.html +++ b/files/ca/web/javascript/reference/global_objects/date/setutcseconds/index.html @@ -1,7 +1,8 @@ --- title: Date.prototype.setUTCSeconds() -slug: Web/JavaScript/Referencia/Objectes_globals/Date/setUTCSeconds +slug: Web/JavaScript/Reference/Global_Objects/Date/setUTCSeconds translation_of: Web/JavaScript/Reference/Global_Objects/Date/setUTCSeconds +original_slug: Web/JavaScript/Referencia/Objectes_globals/Date/setUTCSeconds ---
    {{JSRef}}
    diff --git a/files/ca/web/javascript/reference/global_objects/date/setyear/index.html b/files/ca/web/javascript/reference/global_objects/date/setyear/index.html index ead16f2d21..f2e0a31ad2 100644 --- a/files/ca/web/javascript/reference/global_objects/date/setyear/index.html +++ b/files/ca/web/javascript/reference/global_objects/date/setyear/index.html @@ -1,7 +1,8 @@ --- title: Date.prototype.setYear() -slug: Web/JavaScript/Referencia/Objectes_globals/Date/setYear +slug: Web/JavaScript/Reference/Global_Objects/Date/setYear translation_of: Web/JavaScript/Reference/Global_Objects/Date/setYear +original_slug: Web/JavaScript/Referencia/Objectes_globals/Date/setYear ---
    {{JSRef}} {{deprecated_header}}
    diff --git a/files/ca/web/javascript/reference/global_objects/date/todatestring/index.html b/files/ca/web/javascript/reference/global_objects/date/todatestring/index.html index 9548215179..8be13b94d5 100644 --- a/files/ca/web/javascript/reference/global_objects/date/todatestring/index.html +++ b/files/ca/web/javascript/reference/global_objects/date/todatestring/index.html @@ -1,7 +1,8 @@ --- title: Date.prototype.toDateString() -slug: Web/JavaScript/Referencia/Objectes_globals/Date/toDateString +slug: Web/JavaScript/Reference/Global_Objects/Date/toDateString translation_of: Web/JavaScript/Reference/Global_Objects/Date/toDateString +original_slug: Web/JavaScript/Referencia/Objectes_globals/Date/toDateString ---
    {{JSRef}}
    diff --git a/files/ca/web/javascript/reference/global_objects/date/togmtstring/index.html b/files/ca/web/javascript/reference/global_objects/date/togmtstring/index.html index 08e63be739..785829624b 100644 --- a/files/ca/web/javascript/reference/global_objects/date/togmtstring/index.html +++ b/files/ca/web/javascript/reference/global_objects/date/togmtstring/index.html @@ -1,7 +1,8 @@ --- title: Date.prototype.toGMTString() -slug: Web/JavaScript/Referencia/Objectes_globals/Date/toGMTString +slug: Web/JavaScript/Reference/Global_Objects/Date/toGMTString translation_of: Web/JavaScript/Reference/Global_Objects/Date/toGMTString +original_slug: Web/JavaScript/Referencia/Objectes_globals/Date/toGMTString ---
    {{JSRef}} {{deprecated_header}}
    diff --git a/files/ca/web/javascript/reference/global_objects/date/toisostring/index.html b/files/ca/web/javascript/reference/global_objects/date/toisostring/index.html index 759e53225c..527230fe35 100644 --- a/files/ca/web/javascript/reference/global_objects/date/toisostring/index.html +++ b/files/ca/web/javascript/reference/global_objects/date/toisostring/index.html @@ -1,7 +1,8 @@ --- title: Date.prototype.toISOString() -slug: Web/JavaScript/Referencia/Objectes_globals/Date/toISOString +slug: Web/JavaScript/Reference/Global_Objects/Date/toISOString translation_of: Web/JavaScript/Reference/Global_Objects/Date/toISOString +original_slug: Web/JavaScript/Referencia/Objectes_globals/Date/toISOString ---
    {{JSRef}}
    diff --git a/files/ca/web/javascript/reference/global_objects/date/tojson/index.html b/files/ca/web/javascript/reference/global_objects/date/tojson/index.html index 8b583470bf..e4b6f3c38f 100644 --- a/files/ca/web/javascript/reference/global_objects/date/tojson/index.html +++ b/files/ca/web/javascript/reference/global_objects/date/tojson/index.html @@ -1,7 +1,8 @@ --- title: Date.prototype.toJSON() -slug: Web/JavaScript/Referencia/Objectes_globals/Date/toJSON +slug: Web/JavaScript/Reference/Global_Objects/Date/toJSON translation_of: Web/JavaScript/Reference/Global_Objects/Date/toJSON +original_slug: Web/JavaScript/Referencia/Objectes_globals/Date/toJSON ---
    {{JSRef}}
    diff --git a/files/ca/web/javascript/reference/global_objects/date/tostring/index.html b/files/ca/web/javascript/reference/global_objects/date/tostring/index.html index 8482fe5298..1dd3ae75ca 100644 --- a/files/ca/web/javascript/reference/global_objects/date/tostring/index.html +++ b/files/ca/web/javascript/reference/global_objects/date/tostring/index.html @@ -1,7 +1,8 @@ --- title: Date.prototype.toString() -slug: Web/JavaScript/Referencia/Objectes_globals/Date/toString +slug: Web/JavaScript/Reference/Global_Objects/Date/toString translation_of: Web/JavaScript/Reference/Global_Objects/Date/toString +original_slug: Web/JavaScript/Referencia/Objectes_globals/Date/toString ---
    {{JSRef}}
    diff --git a/files/ca/web/javascript/reference/global_objects/date/totimestring/index.html b/files/ca/web/javascript/reference/global_objects/date/totimestring/index.html index aac8de7a85..b3c48ca1a5 100644 --- a/files/ca/web/javascript/reference/global_objects/date/totimestring/index.html +++ b/files/ca/web/javascript/reference/global_objects/date/totimestring/index.html @@ -1,7 +1,8 @@ --- title: Date.prototype.toTimeString() -slug: Web/JavaScript/Referencia/Objectes_globals/Date/toTimeString +slug: Web/JavaScript/Reference/Global_Objects/Date/toTimeString translation_of: Web/JavaScript/Reference/Global_Objects/Date/toTimeString +original_slug: Web/JavaScript/Referencia/Objectes_globals/Date/toTimeString ---
    {{JSRef}}
    diff --git a/files/ca/web/javascript/reference/global_objects/date/utc/index.html b/files/ca/web/javascript/reference/global_objects/date/utc/index.html index 37bb2bc369..905ef685a6 100644 --- a/files/ca/web/javascript/reference/global_objects/date/utc/index.html +++ b/files/ca/web/javascript/reference/global_objects/date/utc/index.html @@ -1,7 +1,8 @@ --- title: Date.UTC() -slug: Web/JavaScript/Referencia/Objectes_globals/Date/UTC +slug: Web/JavaScript/Reference/Global_Objects/Date/UTC translation_of: Web/JavaScript/Reference/Global_Objects/Date/UTC +original_slug: Web/JavaScript/Referencia/Objectes_globals/Date/UTC ---
    {{JSRef}}
    diff --git a/files/ca/web/javascript/reference/global_objects/date/valueof/index.html b/files/ca/web/javascript/reference/global_objects/date/valueof/index.html index 6c5f810ead..9ff6159f68 100644 --- a/files/ca/web/javascript/reference/global_objects/date/valueof/index.html +++ b/files/ca/web/javascript/reference/global_objects/date/valueof/index.html @@ -1,7 +1,8 @@ --- title: Date.prototype.valueOf() -slug: Web/JavaScript/Referencia/Objectes_globals/Date/valueOf +slug: Web/JavaScript/Reference/Global_Objects/Date/valueOf translation_of: Web/JavaScript/Reference/Global_Objects/Date/valueOf +original_slug: Web/JavaScript/Referencia/Objectes_globals/Date/valueOf ---
    {{JSRef}}
    diff --git a/files/ca/web/javascript/reference/global_objects/error/columnnumber/index.html b/files/ca/web/javascript/reference/global_objects/error/columnnumber/index.html index 377c797cd3..cfa72cb182 100644 --- a/files/ca/web/javascript/reference/global_objects/error/columnnumber/index.html +++ b/files/ca/web/javascript/reference/global_objects/error/columnnumber/index.html @@ -1,7 +1,8 @@ --- title: Error.prototype.columnNumber -slug: Web/JavaScript/Referencia/Objectes_globals/Error/columnNumber +slug: Web/JavaScript/Reference/Global_Objects/Error/columnNumber translation_of: Web/JavaScript/Reference/Global_Objects/Error/columnNumber +original_slug: Web/JavaScript/Referencia/Objectes_globals/Error/columnNumber ---
    {{JSRef("Global_Objects", "Error", "EvalError,InternalError,RangeError,ReferenceError,SyntaxError,TypeError,URIError")}} {{non-standard_header}}
    diff --git a/files/ca/web/javascript/reference/global_objects/error/filename/index.html b/files/ca/web/javascript/reference/global_objects/error/filename/index.html index dcca532f86..9d38712cf4 100644 --- a/files/ca/web/javascript/reference/global_objects/error/filename/index.html +++ b/files/ca/web/javascript/reference/global_objects/error/filename/index.html @@ -1,7 +1,8 @@ --- title: Error.prototype.fileName -slug: Web/JavaScript/Referencia/Objectes_globals/Error/fileName +slug: Web/JavaScript/Reference/Global_Objects/Error/fileName translation_of: Web/JavaScript/Reference/Global_Objects/Error/fileName +original_slug: Web/JavaScript/Referencia/Objectes_globals/Error/fileName ---
    {{JSRef("Global_Objects", "Error", "EvalError,InternalError,RangeError,ReferenceError,SyntaxError,TypeError,URIError")}} {{non-standard_header}}
    diff --git a/files/ca/web/javascript/reference/global_objects/error/index.html b/files/ca/web/javascript/reference/global_objects/error/index.html index 2e1592edc5..5351f96793 100644 --- a/files/ca/web/javascript/reference/global_objects/error/index.html +++ b/files/ca/web/javascript/reference/global_objects/error/index.html @@ -1,7 +1,8 @@ --- title: Error -slug: Web/JavaScript/Referencia/Objectes_globals/Error +slug: Web/JavaScript/Reference/Global_Objects/Error translation_of: Web/JavaScript/Reference/Global_Objects/Error +original_slug: Web/JavaScript/Referencia/Objectes_globals/Error ---
    {{JSRef}}
    diff --git a/files/ca/web/javascript/reference/global_objects/error/linenumber/index.html b/files/ca/web/javascript/reference/global_objects/error/linenumber/index.html index 7b85f29c19..a474c0abf0 100644 --- a/files/ca/web/javascript/reference/global_objects/error/linenumber/index.html +++ b/files/ca/web/javascript/reference/global_objects/error/linenumber/index.html @@ -1,7 +1,8 @@ --- title: Error.prototype.lineNumber -slug: Web/JavaScript/Referencia/Objectes_globals/Error/lineNumber +slug: Web/JavaScript/Reference/Global_Objects/Error/lineNumber translation_of: Web/JavaScript/Reference/Global_Objects/Error/lineNumber +original_slug: Web/JavaScript/Referencia/Objectes_globals/Error/lineNumber ---
    {{JSRef("Global_Objects", "Error", "EvalError,InternalError,RangeError,ReferenceError,SyntaxError,TypeError,URIError")}} {{non-standard_header}}
    diff --git a/files/ca/web/javascript/reference/global_objects/error/message/index.html b/files/ca/web/javascript/reference/global_objects/error/message/index.html index 4aa07268fa..5d477ef064 100644 --- a/files/ca/web/javascript/reference/global_objects/error/message/index.html +++ b/files/ca/web/javascript/reference/global_objects/error/message/index.html @@ -1,7 +1,8 @@ --- title: Error.prototype.message -slug: Web/JavaScript/Referencia/Objectes_globals/Error/message +slug: Web/JavaScript/Reference/Global_Objects/Error/message translation_of: Web/JavaScript/Reference/Global_Objects/Error/message +original_slug: Web/JavaScript/Referencia/Objectes_globals/Error/message ---
    {{JSRef("Global_Objects", "Error", "EvalError,InternalError,RangeError,ReferenceError,SyntaxError,TypeError,URIError")}}
    diff --git a/files/ca/web/javascript/reference/global_objects/error/name/index.html b/files/ca/web/javascript/reference/global_objects/error/name/index.html index 995ecafd5f..8e25f4be5f 100644 --- a/files/ca/web/javascript/reference/global_objects/error/name/index.html +++ b/files/ca/web/javascript/reference/global_objects/error/name/index.html @@ -1,7 +1,8 @@ --- title: Error.prototype.name -slug: Web/JavaScript/Referencia/Objectes_globals/Error/name +slug: Web/JavaScript/Reference/Global_Objects/Error/name translation_of: Web/JavaScript/Reference/Global_Objects/Error/name +original_slug: Web/JavaScript/Referencia/Objectes_globals/Error/name ---
    {{JSRef("Global_Objects", "Error", "EvalError,InternalError,RangeError,ReferenceError,SyntaxError,TypeError,URIError")}}
    diff --git a/files/ca/web/javascript/reference/global_objects/error/stack/index.html b/files/ca/web/javascript/reference/global_objects/error/stack/index.html index aa41949423..b49247b301 100644 --- a/files/ca/web/javascript/reference/global_objects/error/stack/index.html +++ b/files/ca/web/javascript/reference/global_objects/error/stack/index.html @@ -1,7 +1,8 @@ --- title: Error.prototype.stack -slug: Web/JavaScript/Referencia/Objectes_globals/Error/Stack +slug: Web/JavaScript/Reference/Global_Objects/Error/Stack translation_of: Web/JavaScript/Reference/Global_Objects/Error/Stack +original_slug: Web/JavaScript/Referencia/Objectes_globals/Error/Stack ---
    {{JSRef("Global_Objects", "Error", "EvalError,InternalError,RangeError,ReferenceError,SyntaxError,TypeError,URIError")}} {{non-standard_header}}
    diff --git a/files/ca/web/javascript/reference/global_objects/error/tosource/index.html b/files/ca/web/javascript/reference/global_objects/error/tosource/index.html index c766aa312b..e68daf137e 100644 --- a/files/ca/web/javascript/reference/global_objects/error/tosource/index.html +++ b/files/ca/web/javascript/reference/global_objects/error/tosource/index.html @@ -1,7 +1,8 @@ --- title: Error.prototype.toSource() -slug: Web/JavaScript/Referencia/Objectes_globals/Error/toSource +slug: Web/JavaScript/Reference/Global_Objects/Error/toSource translation_of: Web/JavaScript/Reference/Global_Objects/Error/toSource +original_slug: Web/JavaScript/Referencia/Objectes_globals/Error/toSource ---
    {{JSRef}} {{non-standard_header}}
    diff --git a/files/ca/web/javascript/reference/global_objects/error/tostring/index.html b/files/ca/web/javascript/reference/global_objects/error/tostring/index.html index 79fd20f77f..64ce986a83 100644 --- a/files/ca/web/javascript/reference/global_objects/error/tostring/index.html +++ b/files/ca/web/javascript/reference/global_objects/error/tostring/index.html @@ -1,7 +1,8 @@ --- title: Error.prototype.toString() -slug: Web/JavaScript/Referencia/Objectes_globals/Error/toString +slug: Web/JavaScript/Reference/Global_Objects/Error/toString translation_of: Web/JavaScript/Reference/Global_Objects/Error/toString +original_slug: Web/JavaScript/Referencia/Objectes_globals/Error/toString ---
    {{JSRef("Global_Objects", "Error", "EvalError,InternalError,RangeError,ReferenceError,SyntaxError,TypeError,URIError")}}
    diff --git a/files/ca/web/javascript/reference/global_objects/index.html b/files/ca/web/javascript/reference/global_objects/index.html index 60bd0333f7..93bf7ad9bc 100644 --- a/files/ca/web/javascript/reference/global_objects/index.html +++ b/files/ca/web/javascript/reference/global_objects/index.html @@ -1,7 +1,8 @@ --- title: Objectes Standard -slug: Web/JavaScript/Referencia/Objectes_globals +slug: Web/JavaScript/Reference/Global_Objects translation_of: Web/JavaScript/Reference/Global_Objects +original_slug: Web/JavaScript/Referencia/Objectes_globals ---
    {{jsSidebar("Objects")}}
    diff --git a/files/ca/web/javascript/reference/global_objects/infinity/index.html b/files/ca/web/javascript/reference/global_objects/infinity/index.html index 409609bfd2..bb06d6e1fa 100644 --- a/files/ca/web/javascript/reference/global_objects/infinity/index.html +++ b/files/ca/web/javascript/reference/global_objects/infinity/index.html @@ -1,7 +1,8 @@ --- title: Infinity -slug: Web/JavaScript/Referencia/Objectes_globals/Infinity +slug: Web/JavaScript/Reference/Global_Objects/Infinity translation_of: Web/JavaScript/Reference/Global_Objects/Infinity +original_slug: Web/JavaScript/Referencia/Objectes_globals/Infinity ---
    diff --git a/files/ca/web/javascript/reference/global_objects/json/index.html b/files/ca/web/javascript/reference/global_objects/json/index.html index efc86409e6..95c3af9636 100644 --- a/files/ca/web/javascript/reference/global_objects/json/index.html +++ b/files/ca/web/javascript/reference/global_objects/json/index.html @@ -1,7 +1,8 @@ --- title: JSON -slug: Web/JavaScript/Referencia/Objectes_globals/JSON +slug: Web/JavaScript/Reference/Global_Objects/JSON translation_of: Web/JavaScript/Reference/Global_Objects/JSON +original_slug: Web/JavaScript/Referencia/Objectes_globals/JSON ---
    {{JSRef("Global_Objects", "JSON")}}
    diff --git a/files/ca/web/javascript/reference/global_objects/map/clear/index.html b/files/ca/web/javascript/reference/global_objects/map/clear/index.html index f29cc93eef..098655f667 100644 --- a/files/ca/web/javascript/reference/global_objects/map/clear/index.html +++ b/files/ca/web/javascript/reference/global_objects/map/clear/index.html @@ -1,7 +1,8 @@ --- title: Map.prototype.clear() -slug: Web/JavaScript/Referencia/Objectes_globals/Map/clear +slug: Web/JavaScript/Reference/Global_Objects/Map/clear translation_of: Web/JavaScript/Reference/Global_Objects/Map/clear +original_slug: Web/JavaScript/Referencia/Objectes_globals/Map/clear ---
    {{JSRef}}
    diff --git a/files/ca/web/javascript/reference/global_objects/map/delete/index.html b/files/ca/web/javascript/reference/global_objects/map/delete/index.html index 01c1b2cf28..ee22dcbd0d 100644 --- a/files/ca/web/javascript/reference/global_objects/map/delete/index.html +++ b/files/ca/web/javascript/reference/global_objects/map/delete/index.html @@ -1,7 +1,8 @@ --- title: Map.prototype.delete() -slug: Web/JavaScript/Referencia/Objectes_globals/Map/delete +slug: Web/JavaScript/Reference/Global_Objects/Map/delete translation_of: Web/JavaScript/Reference/Global_Objects/Map/delete +original_slug: Web/JavaScript/Referencia/Objectes_globals/Map/delete ---
    {{JSRef}}
    diff --git a/files/ca/web/javascript/reference/global_objects/map/entries/index.html b/files/ca/web/javascript/reference/global_objects/map/entries/index.html index d5f6942695..ed83a8d946 100644 --- a/files/ca/web/javascript/reference/global_objects/map/entries/index.html +++ b/files/ca/web/javascript/reference/global_objects/map/entries/index.html @@ -1,7 +1,8 @@ --- title: Map.prototype.entries() -slug: Web/JavaScript/Referencia/Objectes_globals/Map/entries +slug: Web/JavaScript/Reference/Global_Objects/Map/entries translation_of: Web/JavaScript/Reference/Global_Objects/Map/entries +original_slug: Web/JavaScript/Referencia/Objectes_globals/Map/entries ---
    {{JSRef}}
    diff --git a/files/ca/web/javascript/reference/global_objects/map/foreach/index.html b/files/ca/web/javascript/reference/global_objects/map/foreach/index.html index 7097bbee3d..16a6625eb6 100644 --- a/files/ca/web/javascript/reference/global_objects/map/foreach/index.html +++ b/files/ca/web/javascript/reference/global_objects/map/foreach/index.html @@ -1,7 +1,8 @@ --- title: Map.prototype.forEach() -slug: Web/JavaScript/Referencia/Objectes_globals/Map/forEach +slug: Web/JavaScript/Reference/Global_Objects/Map/forEach translation_of: Web/JavaScript/Reference/Global_Objects/Map/forEach +original_slug: Web/JavaScript/Referencia/Objectes_globals/Map/forEach ---
    {{JSRef}}
    diff --git a/files/ca/web/javascript/reference/global_objects/map/get/index.html b/files/ca/web/javascript/reference/global_objects/map/get/index.html index ec345df059..c1dcf95533 100644 --- a/files/ca/web/javascript/reference/global_objects/map/get/index.html +++ b/files/ca/web/javascript/reference/global_objects/map/get/index.html @@ -1,7 +1,8 @@ --- title: Map.prototype.get() -slug: Web/JavaScript/Referencia/Objectes_globals/Map/get +slug: Web/JavaScript/Reference/Global_Objects/Map/get translation_of: Web/JavaScript/Reference/Global_Objects/Map/get +original_slug: Web/JavaScript/Referencia/Objectes_globals/Map/get ---
    {{JSRef}}
    diff --git a/files/ca/web/javascript/reference/global_objects/map/has/index.html b/files/ca/web/javascript/reference/global_objects/map/has/index.html index d0ce1bec54..6e7a02d543 100644 --- a/files/ca/web/javascript/reference/global_objects/map/has/index.html +++ b/files/ca/web/javascript/reference/global_objects/map/has/index.html @@ -1,7 +1,8 @@ --- title: Map.prototype.has() -slug: Web/JavaScript/Referencia/Objectes_globals/Map/has +slug: Web/JavaScript/Reference/Global_Objects/Map/has translation_of: Web/JavaScript/Reference/Global_Objects/Map/has +original_slug: Web/JavaScript/Referencia/Objectes_globals/Map/has ---
    {{JSRef}}
    diff --git a/files/ca/web/javascript/reference/global_objects/map/index.html b/files/ca/web/javascript/reference/global_objects/map/index.html index 8e2bb647bd..678d5120fa 100644 --- a/files/ca/web/javascript/reference/global_objects/map/index.html +++ b/files/ca/web/javascript/reference/global_objects/map/index.html @@ -1,7 +1,8 @@ --- title: Map -slug: Web/JavaScript/Referencia/Objectes_globals/Map +slug: Web/JavaScript/Reference/Global_Objects/Map translation_of: Web/JavaScript/Reference/Global_Objects/Map +original_slug: Web/JavaScript/Referencia/Objectes_globals/Map ---
    {{JSRef("Global_Objects", "Map")}}
    diff --git a/files/ca/web/javascript/reference/global_objects/map/keys/index.html b/files/ca/web/javascript/reference/global_objects/map/keys/index.html index 47c975a891..1717cb8285 100644 --- a/files/ca/web/javascript/reference/global_objects/map/keys/index.html +++ b/files/ca/web/javascript/reference/global_objects/map/keys/index.html @@ -1,7 +1,8 @@ --- title: Map.prototype.keys() -slug: Web/JavaScript/Referencia/Objectes_globals/Map/keys +slug: Web/JavaScript/Reference/Global_Objects/Map/keys translation_of: Web/JavaScript/Reference/Global_Objects/Map/keys +original_slug: Web/JavaScript/Referencia/Objectes_globals/Map/keys ---
    {{JSRef}}
    diff --git a/files/ca/web/javascript/reference/global_objects/map/set/index.html b/files/ca/web/javascript/reference/global_objects/map/set/index.html index 3b77060831..b27969e706 100644 --- a/files/ca/web/javascript/reference/global_objects/map/set/index.html +++ b/files/ca/web/javascript/reference/global_objects/map/set/index.html @@ -1,7 +1,8 @@ --- title: Map.prototype.set() -slug: Web/JavaScript/Referencia/Objectes_globals/Map/set +slug: Web/JavaScript/Reference/Global_Objects/Map/set translation_of: Web/JavaScript/Reference/Global_Objects/Map/set +original_slug: Web/JavaScript/Referencia/Objectes_globals/Map/set ---
    {{JSRef}}
    diff --git a/files/ca/web/javascript/reference/global_objects/map/size/index.html b/files/ca/web/javascript/reference/global_objects/map/size/index.html index aa70c7d84b..c88b497993 100644 --- a/files/ca/web/javascript/reference/global_objects/map/size/index.html +++ b/files/ca/web/javascript/reference/global_objects/map/size/index.html @@ -1,7 +1,8 @@ --- title: Map.prototype.size -slug: Web/JavaScript/Referencia/Objectes_globals/Map/size +slug: Web/JavaScript/Reference/Global_Objects/Map/size translation_of: Web/JavaScript/Reference/Global_Objects/Map/size +original_slug: Web/JavaScript/Referencia/Objectes_globals/Map/size ---
    {{JSRef}}
    diff --git a/files/ca/web/javascript/reference/global_objects/map/values/index.html b/files/ca/web/javascript/reference/global_objects/map/values/index.html index f1b23be7e7..fc1a14a417 100644 --- a/files/ca/web/javascript/reference/global_objects/map/values/index.html +++ b/files/ca/web/javascript/reference/global_objects/map/values/index.html @@ -1,7 +1,8 @@ --- title: Map.prototype.values() -slug: Web/JavaScript/Referencia/Objectes_globals/Map/values +slug: Web/JavaScript/Reference/Global_Objects/Map/values translation_of: Web/JavaScript/Reference/Global_Objects/Map/values +original_slug: Web/JavaScript/Referencia/Objectes_globals/Map/values ---
    {{JSRef}}
    diff --git a/files/ca/web/javascript/reference/global_objects/math/abs/index.html b/files/ca/web/javascript/reference/global_objects/math/abs/index.html index 34d3e5beb9..db78802c1f 100644 --- a/files/ca/web/javascript/reference/global_objects/math/abs/index.html +++ b/files/ca/web/javascript/reference/global_objects/math/abs/index.html @@ -1,7 +1,8 @@ --- title: Math.abs() -slug: Web/JavaScript/Referencia/Objectes_globals/Math/abs +slug: Web/JavaScript/Reference/Global_Objects/Math/abs translation_of: Web/JavaScript/Reference/Global_Objects/Math/abs +original_slug: Web/JavaScript/Referencia/Objectes_globals/Math/abs ---
    {{JSRef("Global_Objects", "Math")}}
    diff --git a/files/ca/web/javascript/reference/global_objects/math/acos/index.html b/files/ca/web/javascript/reference/global_objects/math/acos/index.html index fdf781a4e2..0adb3c11e4 100644 --- a/files/ca/web/javascript/reference/global_objects/math/acos/index.html +++ b/files/ca/web/javascript/reference/global_objects/math/acos/index.html @@ -1,7 +1,8 @@ --- title: Math.acos() -slug: Web/JavaScript/Referencia/Objectes_globals/Math/acos +slug: Web/JavaScript/Reference/Global_Objects/Math/acos translation_of: Web/JavaScript/Reference/Global_Objects/Math/acos +original_slug: Web/JavaScript/Referencia/Objectes_globals/Math/acos ---
    {{JSRef("Global_Objects", "Math")}}
    diff --git a/files/ca/web/javascript/reference/global_objects/math/acosh/index.html b/files/ca/web/javascript/reference/global_objects/math/acosh/index.html index edfe1dd8c0..08561aeed1 100644 --- a/files/ca/web/javascript/reference/global_objects/math/acosh/index.html +++ b/files/ca/web/javascript/reference/global_objects/math/acosh/index.html @@ -1,7 +1,8 @@ --- title: Math.acosh() -slug: Web/JavaScript/Referencia/Objectes_globals/Math/acosh +slug: Web/JavaScript/Reference/Global_Objects/Math/acosh translation_of: Web/JavaScript/Reference/Global_Objects/Math/acosh +original_slug: Web/JavaScript/Referencia/Objectes_globals/Math/acosh ---
    {{JSRef}}
    diff --git a/files/ca/web/javascript/reference/global_objects/math/asin/index.html b/files/ca/web/javascript/reference/global_objects/math/asin/index.html index 81288af5b6..5174ee4643 100644 --- a/files/ca/web/javascript/reference/global_objects/math/asin/index.html +++ b/files/ca/web/javascript/reference/global_objects/math/asin/index.html @@ -1,7 +1,8 @@ --- title: Math.asin() -slug: Web/JavaScript/Referencia/Objectes_globals/Math/asin +slug: Web/JavaScript/Reference/Global_Objects/Math/asin translation_of: Web/JavaScript/Reference/Global_Objects/Math/asin +original_slug: Web/JavaScript/Referencia/Objectes_globals/Math/asin ---
    {{JSRef("Global_Objects", "Math")}}
    diff --git a/files/ca/web/javascript/reference/global_objects/math/asinh/index.html b/files/ca/web/javascript/reference/global_objects/math/asinh/index.html index 9a249bb202..52c70da63f 100644 --- a/files/ca/web/javascript/reference/global_objects/math/asinh/index.html +++ b/files/ca/web/javascript/reference/global_objects/math/asinh/index.html @@ -1,7 +1,8 @@ --- title: Math.asinh() -slug: Web/JavaScript/Referencia/Objectes_globals/Math/asinh +slug: Web/JavaScript/Reference/Global_Objects/Math/asinh translation_of: Web/JavaScript/Reference/Global_Objects/Math/asinh +original_slug: Web/JavaScript/Referencia/Objectes_globals/Math/asinh ---
    {{JSRef}}
    diff --git a/files/ca/web/javascript/reference/global_objects/math/atan/index.html b/files/ca/web/javascript/reference/global_objects/math/atan/index.html index 034578fd54..01832ac269 100644 --- a/files/ca/web/javascript/reference/global_objects/math/atan/index.html +++ b/files/ca/web/javascript/reference/global_objects/math/atan/index.html @@ -1,7 +1,8 @@ --- title: Math.atan() -slug: Web/JavaScript/Referencia/Objectes_globals/Math/atan +slug: Web/JavaScript/Reference/Global_Objects/Math/atan translation_of: Web/JavaScript/Reference/Global_Objects/Math/atan +original_slug: Web/JavaScript/Referencia/Objectes_globals/Math/atan ---
    {{JSRef("Global_Objects", "Math")}}
    diff --git a/files/ca/web/javascript/reference/global_objects/math/atan2/index.html b/files/ca/web/javascript/reference/global_objects/math/atan2/index.html index 2816bb40b8..6cd84d1004 100644 --- a/files/ca/web/javascript/reference/global_objects/math/atan2/index.html +++ b/files/ca/web/javascript/reference/global_objects/math/atan2/index.html @@ -1,7 +1,8 @@ --- title: Math.atan2() -slug: Web/JavaScript/Referencia/Objectes_globals/Math/atan2 +slug: Web/JavaScript/Reference/Global_Objects/Math/atan2 translation_of: Web/JavaScript/Reference/Global_Objects/Math/atan2 +original_slug: Web/JavaScript/Referencia/Objectes_globals/Math/atan2 ---
    {{JSRef}}
    diff --git a/files/ca/web/javascript/reference/global_objects/math/atanh/index.html b/files/ca/web/javascript/reference/global_objects/math/atanh/index.html index 8a6b7cc2c8..2b492dbdcc 100644 --- a/files/ca/web/javascript/reference/global_objects/math/atanh/index.html +++ b/files/ca/web/javascript/reference/global_objects/math/atanh/index.html @@ -1,7 +1,8 @@ --- title: Math.atanh() -slug: Web/JavaScript/Referencia/Objectes_globals/Math/atanh +slug: Web/JavaScript/Reference/Global_Objects/Math/atanh translation_of: Web/JavaScript/Reference/Global_Objects/Math/atanh +original_slug: Web/JavaScript/Referencia/Objectes_globals/Math/atanh ---
    {{JSRef}}
    diff --git a/files/ca/web/javascript/reference/global_objects/math/cbrt/index.html b/files/ca/web/javascript/reference/global_objects/math/cbrt/index.html index 70d6767183..a973b5e724 100644 --- a/files/ca/web/javascript/reference/global_objects/math/cbrt/index.html +++ b/files/ca/web/javascript/reference/global_objects/math/cbrt/index.html @@ -1,7 +1,8 @@ --- title: Math.cbrt() -slug: Web/JavaScript/Referencia/Objectes_globals/Math/cbrt +slug: Web/JavaScript/Reference/Global_Objects/Math/cbrt translation_of: Web/JavaScript/Reference/Global_Objects/Math/cbrt +original_slug: Web/JavaScript/Referencia/Objectes_globals/Math/cbrt ---
    {{JSRef}}
    diff --git a/files/ca/web/javascript/reference/global_objects/math/ceil/index.html b/files/ca/web/javascript/reference/global_objects/math/ceil/index.html index a96880eecd..5495818286 100644 --- a/files/ca/web/javascript/reference/global_objects/math/ceil/index.html +++ b/files/ca/web/javascript/reference/global_objects/math/ceil/index.html @@ -1,7 +1,8 @@ --- title: Math.ceil() -slug: Web/JavaScript/Referencia/Objectes_globals/Math/ceil +slug: Web/JavaScript/Reference/Global_Objects/Math/ceil translation_of: Web/JavaScript/Reference/Global_Objects/Math/ceil +original_slug: Web/JavaScript/Referencia/Objectes_globals/Math/ceil ---
    {{JSRef("Global_Objects", "Math")}}
    diff --git a/files/ca/web/javascript/reference/global_objects/math/clz32/index.html b/files/ca/web/javascript/reference/global_objects/math/clz32/index.html index 5cde08c7a8..74c1cecef7 100644 --- a/files/ca/web/javascript/reference/global_objects/math/clz32/index.html +++ b/files/ca/web/javascript/reference/global_objects/math/clz32/index.html @@ -1,7 +1,8 @@ --- title: Math.clz32() -slug: Web/JavaScript/Referencia/Objectes_globals/Math/clz32 +slug: Web/JavaScript/Reference/Global_Objects/Math/clz32 translation_of: Web/JavaScript/Reference/Global_Objects/Math/clz32 +original_slug: Web/JavaScript/Referencia/Objectes_globals/Math/clz32 ---
    {{JSRef}}
    diff --git a/files/ca/web/javascript/reference/global_objects/math/cos/index.html b/files/ca/web/javascript/reference/global_objects/math/cos/index.html index 0236b38c9c..00d090ed20 100644 --- a/files/ca/web/javascript/reference/global_objects/math/cos/index.html +++ b/files/ca/web/javascript/reference/global_objects/math/cos/index.html @@ -1,7 +1,8 @@ --- title: Math.cos() -slug: Web/JavaScript/Referencia/Objectes_globals/Math/cos +slug: Web/JavaScript/Reference/Global_Objects/Math/cos translation_of: Web/JavaScript/Reference/Global_Objects/Math/cos +original_slug: Web/JavaScript/Referencia/Objectes_globals/Math/cos ---
    {{JSRef("Global_Objects", "Math")}}
    diff --git a/files/ca/web/javascript/reference/global_objects/math/cosh/index.html b/files/ca/web/javascript/reference/global_objects/math/cosh/index.html index 00ebc259b9..f3d4dffb1b 100644 --- a/files/ca/web/javascript/reference/global_objects/math/cosh/index.html +++ b/files/ca/web/javascript/reference/global_objects/math/cosh/index.html @@ -1,7 +1,8 @@ --- title: Math.cosh() -slug: Web/JavaScript/Referencia/Objectes_globals/Math/cosh +slug: Web/JavaScript/Reference/Global_Objects/Math/cosh translation_of: Web/JavaScript/Reference/Global_Objects/Math/cosh +original_slug: Web/JavaScript/Referencia/Objectes_globals/Math/cosh ---
    {{JSRef}}
    diff --git a/files/ca/web/javascript/reference/global_objects/math/e/index.html b/files/ca/web/javascript/reference/global_objects/math/e/index.html index efe7476396..90dba24a0d 100644 --- a/files/ca/web/javascript/reference/global_objects/math/e/index.html +++ b/files/ca/web/javascript/reference/global_objects/math/e/index.html @@ -1,7 +1,8 @@ --- title: Math.E -slug: Web/JavaScript/Referencia/Objectes_globals/Math/E +slug: Web/JavaScript/Reference/Global_Objects/Math/E translation_of: Web/JavaScript/Reference/Global_Objects/Math/E +original_slug: Web/JavaScript/Referencia/Objectes_globals/Math/E ---
    {{JSRef("Global_Objects", "Math")}}
    diff --git a/files/ca/web/javascript/reference/global_objects/math/exp/index.html b/files/ca/web/javascript/reference/global_objects/math/exp/index.html index c6d6c6c098..2b1b92004f 100644 --- a/files/ca/web/javascript/reference/global_objects/math/exp/index.html +++ b/files/ca/web/javascript/reference/global_objects/math/exp/index.html @@ -1,7 +1,8 @@ --- title: Math.exp() -slug: Web/JavaScript/Referencia/Objectes_globals/Math/exp +slug: Web/JavaScript/Reference/Global_Objects/Math/exp translation_of: Web/JavaScript/Reference/Global_Objects/Math/exp +original_slug: Web/JavaScript/Referencia/Objectes_globals/Math/exp ---
    {{JSRef}}
    diff --git a/files/ca/web/javascript/reference/global_objects/math/expm1/index.html b/files/ca/web/javascript/reference/global_objects/math/expm1/index.html index b8055fba45..017cdc895a 100644 --- a/files/ca/web/javascript/reference/global_objects/math/expm1/index.html +++ b/files/ca/web/javascript/reference/global_objects/math/expm1/index.html @@ -1,7 +1,8 @@ --- title: Math.expm1() -slug: Web/JavaScript/Referencia/Objectes_globals/Math/expm1 +slug: Web/JavaScript/Reference/Global_Objects/Math/expm1 translation_of: Web/JavaScript/Reference/Global_Objects/Math/expm1 +original_slug: Web/JavaScript/Referencia/Objectes_globals/Math/expm1 ---
    {{JSRef}}
    diff --git a/files/ca/web/javascript/reference/global_objects/math/floor/index.html b/files/ca/web/javascript/reference/global_objects/math/floor/index.html index 4a83b8d0e8..f86e9d6ed8 100644 --- a/files/ca/web/javascript/reference/global_objects/math/floor/index.html +++ b/files/ca/web/javascript/reference/global_objects/math/floor/index.html @@ -1,7 +1,8 @@ --- title: Math.floor() -slug: Web/JavaScript/Referencia/Objectes_globals/Math/floor +slug: Web/JavaScript/Reference/Global_Objects/Math/floor translation_of: Web/JavaScript/Reference/Global_Objects/Math/floor +original_slug: Web/JavaScript/Referencia/Objectes_globals/Math/floor ---
    {{JSRef("Global_Objects", "Math")}}
    diff --git a/files/ca/web/javascript/reference/global_objects/math/fround/index.html b/files/ca/web/javascript/reference/global_objects/math/fround/index.html index 7411993dbc..dd4cd2c762 100644 --- a/files/ca/web/javascript/reference/global_objects/math/fround/index.html +++ b/files/ca/web/javascript/reference/global_objects/math/fround/index.html @@ -1,7 +1,8 @@ --- title: Math.fround() -slug: Web/JavaScript/Referencia/Objectes_globals/Math/fround +slug: Web/JavaScript/Reference/Global_Objects/Math/fround translation_of: Web/JavaScript/Reference/Global_Objects/Math/fround +original_slug: Web/JavaScript/Referencia/Objectes_globals/Math/fround ---
    {{JSRef}}
    diff --git a/files/ca/web/javascript/reference/global_objects/math/hypot/index.html b/files/ca/web/javascript/reference/global_objects/math/hypot/index.html index e29bb754f1..c7a8994995 100644 --- a/files/ca/web/javascript/reference/global_objects/math/hypot/index.html +++ b/files/ca/web/javascript/reference/global_objects/math/hypot/index.html @@ -1,7 +1,8 @@ --- title: Math.hypot() -slug: Web/JavaScript/Referencia/Objectes_globals/Math/hypot +slug: Web/JavaScript/Reference/Global_Objects/Math/hypot translation_of: Web/JavaScript/Reference/Global_Objects/Math/hypot +original_slug: Web/JavaScript/Referencia/Objectes_globals/Math/hypot ---
    {{JSRef}}
    diff --git a/files/ca/web/javascript/reference/global_objects/math/imul/index.html b/files/ca/web/javascript/reference/global_objects/math/imul/index.html index 53050a9cd6..a82ab70eb5 100644 --- a/files/ca/web/javascript/reference/global_objects/math/imul/index.html +++ b/files/ca/web/javascript/reference/global_objects/math/imul/index.html @@ -1,7 +1,8 @@ --- title: Math.imul() -slug: Web/JavaScript/Referencia/Objectes_globals/Math/imul +slug: Web/JavaScript/Reference/Global_Objects/Math/imul translation_of: Web/JavaScript/Reference/Global_Objects/Math/imul +original_slug: Web/JavaScript/Referencia/Objectes_globals/Math/imul ---
    {{JSRef}}
    diff --git a/files/ca/web/javascript/reference/global_objects/math/index.html b/files/ca/web/javascript/reference/global_objects/math/index.html index d493f51b40..aaaf1f008c 100644 --- a/files/ca/web/javascript/reference/global_objects/math/index.html +++ b/files/ca/web/javascript/reference/global_objects/math/index.html @@ -1,7 +1,8 @@ --- title: Math -slug: Web/JavaScript/Referencia/Objectes_globals/Math +slug: Web/JavaScript/Reference/Global_Objects/Math translation_of: Web/JavaScript/Reference/Global_Objects/Math +original_slug: Web/JavaScript/Referencia/Objectes_globals/Math ---
    {{JSRef("Global_Objects", "Math")}}
    diff --git a/files/ca/web/javascript/reference/global_objects/math/ln10/index.html b/files/ca/web/javascript/reference/global_objects/math/ln10/index.html index 42107c85f5..49c3f52a1a 100644 --- a/files/ca/web/javascript/reference/global_objects/math/ln10/index.html +++ b/files/ca/web/javascript/reference/global_objects/math/ln10/index.html @@ -1,7 +1,8 @@ --- title: Math.LN10 -slug: Web/JavaScript/Referencia/Objectes_globals/Math/LN10 +slug: Web/JavaScript/Reference/Global_Objects/Math/LN10 translation_of: Web/JavaScript/Reference/Global_Objects/Math/LN10 +original_slug: Web/JavaScript/Referencia/Objectes_globals/Math/LN10 ---
    {{JSRef("Global_Objects", "Math")}}
    diff --git a/files/ca/web/javascript/reference/global_objects/math/ln2/index.html b/files/ca/web/javascript/reference/global_objects/math/ln2/index.html index 92cf2693f2..1bd054bec6 100644 --- a/files/ca/web/javascript/reference/global_objects/math/ln2/index.html +++ b/files/ca/web/javascript/reference/global_objects/math/ln2/index.html @@ -1,7 +1,8 @@ --- title: Math.LN2 -slug: Web/JavaScript/Referencia/Objectes_globals/Math/LN2 +slug: Web/JavaScript/Reference/Global_Objects/Math/LN2 translation_of: Web/JavaScript/Reference/Global_Objects/Math/LN2 +original_slug: Web/JavaScript/Referencia/Objectes_globals/Math/LN2 ---
    {{JSRef("Global_Objects", "Math")}}
    diff --git a/files/ca/web/javascript/reference/global_objects/math/log/index.html b/files/ca/web/javascript/reference/global_objects/math/log/index.html index a3d8467ae5..e92c8c05d2 100644 --- a/files/ca/web/javascript/reference/global_objects/math/log/index.html +++ b/files/ca/web/javascript/reference/global_objects/math/log/index.html @@ -1,7 +1,8 @@ --- title: Math.log() -slug: Web/JavaScript/Referencia/Objectes_globals/Math/log +slug: Web/JavaScript/Reference/Global_Objects/Math/log translation_of: Web/JavaScript/Reference/Global_Objects/Math/log +original_slug: Web/JavaScript/Referencia/Objectes_globals/Math/log ---
    {{JSRef}}
    diff --git a/files/ca/web/javascript/reference/global_objects/math/log10/index.html b/files/ca/web/javascript/reference/global_objects/math/log10/index.html index 1a82f34848..b752401732 100644 --- a/files/ca/web/javascript/reference/global_objects/math/log10/index.html +++ b/files/ca/web/javascript/reference/global_objects/math/log10/index.html @@ -1,7 +1,8 @@ --- title: Math.log10() -slug: Web/JavaScript/Referencia/Objectes_globals/Math/log10 +slug: Web/JavaScript/Reference/Global_Objects/Math/log10 translation_of: Web/JavaScript/Reference/Global_Objects/Math/log10 +original_slug: Web/JavaScript/Referencia/Objectes_globals/Math/log10 ---
    {{JSRef}}
    diff --git a/files/ca/web/javascript/reference/global_objects/math/log10e/index.html b/files/ca/web/javascript/reference/global_objects/math/log10e/index.html index 299c8d12ed..865c5d2748 100644 --- a/files/ca/web/javascript/reference/global_objects/math/log10e/index.html +++ b/files/ca/web/javascript/reference/global_objects/math/log10e/index.html @@ -1,7 +1,8 @@ --- title: Math.LOG10E -slug: Web/JavaScript/Referencia/Objectes_globals/Math/LOG10E +slug: Web/JavaScript/Reference/Global_Objects/Math/LOG10E translation_of: Web/JavaScript/Reference/Global_Objects/Math/LOG10E +original_slug: Web/JavaScript/Referencia/Objectes_globals/Math/LOG10E ---
    {{JSRef("Global_Objects", "Math")}}
    diff --git a/files/ca/web/javascript/reference/global_objects/math/log1p/index.html b/files/ca/web/javascript/reference/global_objects/math/log1p/index.html index 1a0eb32cd5..d2d3694a0c 100644 --- a/files/ca/web/javascript/reference/global_objects/math/log1p/index.html +++ b/files/ca/web/javascript/reference/global_objects/math/log1p/index.html @@ -1,7 +1,8 @@ --- title: Math.log1p() -slug: Web/JavaScript/Referencia/Objectes_globals/Math/log1p +slug: Web/JavaScript/Reference/Global_Objects/Math/log1p translation_of: Web/JavaScript/Reference/Global_Objects/Math/log1p +original_slug: Web/JavaScript/Referencia/Objectes_globals/Math/log1p ---
    {{JSRef}}
    diff --git a/files/ca/web/javascript/reference/global_objects/math/log2/index.html b/files/ca/web/javascript/reference/global_objects/math/log2/index.html index 0806bd75ff..9877f863b8 100644 --- a/files/ca/web/javascript/reference/global_objects/math/log2/index.html +++ b/files/ca/web/javascript/reference/global_objects/math/log2/index.html @@ -1,7 +1,8 @@ --- title: Math.log2() -slug: Web/JavaScript/Referencia/Objectes_globals/Math/log2 +slug: Web/JavaScript/Reference/Global_Objects/Math/log2 translation_of: Web/JavaScript/Reference/Global_Objects/Math/log2 +original_slug: Web/JavaScript/Referencia/Objectes_globals/Math/log2 ---
    {{JSRef}}
    diff --git a/files/ca/web/javascript/reference/global_objects/math/log2e/index.html b/files/ca/web/javascript/reference/global_objects/math/log2e/index.html index 2f37ae44c1..a8483c97e4 100644 --- a/files/ca/web/javascript/reference/global_objects/math/log2e/index.html +++ b/files/ca/web/javascript/reference/global_objects/math/log2e/index.html @@ -1,7 +1,8 @@ --- title: Math.LOG2E -slug: Web/JavaScript/Referencia/Objectes_globals/Math/LOG2E +slug: Web/JavaScript/Reference/Global_Objects/Math/LOG2E translation_of: Web/JavaScript/Reference/Global_Objects/Math/LOG2E +original_slug: Web/JavaScript/Referencia/Objectes_globals/Math/LOG2E ---
    {{JSRef("Global_Objects", "Math")}}
    diff --git a/files/ca/web/javascript/reference/global_objects/math/max/index.html b/files/ca/web/javascript/reference/global_objects/math/max/index.html index 791b5dfdfe..1b556be585 100644 --- a/files/ca/web/javascript/reference/global_objects/math/max/index.html +++ b/files/ca/web/javascript/reference/global_objects/math/max/index.html @@ -1,7 +1,8 @@ --- title: Math.max() -slug: Web/JavaScript/Referencia/Objectes_globals/Math/max +slug: Web/JavaScript/Reference/Global_Objects/Math/max translation_of: Web/JavaScript/Reference/Global_Objects/Math/max +original_slug: Web/JavaScript/Referencia/Objectes_globals/Math/max ---
    {{JSRef}}
    diff --git a/files/ca/web/javascript/reference/global_objects/math/min/index.html b/files/ca/web/javascript/reference/global_objects/math/min/index.html index 909e6ff2ee..68cb1ee2fd 100644 --- a/files/ca/web/javascript/reference/global_objects/math/min/index.html +++ b/files/ca/web/javascript/reference/global_objects/math/min/index.html @@ -1,7 +1,8 @@ --- title: Math.min() -slug: Web/JavaScript/Referencia/Objectes_globals/Math/min +slug: Web/JavaScript/Reference/Global_Objects/Math/min translation_of: Web/JavaScript/Reference/Global_Objects/Math/min +original_slug: Web/JavaScript/Referencia/Objectes_globals/Math/min ---
    {{JSRef}}
    diff --git a/files/ca/web/javascript/reference/global_objects/math/pi/index.html b/files/ca/web/javascript/reference/global_objects/math/pi/index.html index b867c953df..11a95acb94 100644 --- a/files/ca/web/javascript/reference/global_objects/math/pi/index.html +++ b/files/ca/web/javascript/reference/global_objects/math/pi/index.html @@ -1,7 +1,8 @@ --- title: Math.PI -slug: Web/JavaScript/Referencia/Objectes_globals/Math/PI +slug: Web/JavaScript/Reference/Global_Objects/Math/PI translation_of: Web/JavaScript/Reference/Global_Objects/Math/PI +original_slug: Web/JavaScript/Referencia/Objectes_globals/Math/PI ---
    {{JSRef("Global_Objects", "Math")}}
    diff --git a/files/ca/web/javascript/reference/global_objects/math/pow/index.html b/files/ca/web/javascript/reference/global_objects/math/pow/index.html index efe89000e9..9f86311dda 100644 --- a/files/ca/web/javascript/reference/global_objects/math/pow/index.html +++ b/files/ca/web/javascript/reference/global_objects/math/pow/index.html @@ -1,7 +1,8 @@ --- title: Math.pow() -slug: Web/JavaScript/Referencia/Objectes_globals/Math/pow +slug: Web/JavaScript/Reference/Global_Objects/Math/pow translation_of: Web/JavaScript/Reference/Global_Objects/Math/pow +original_slug: Web/JavaScript/Referencia/Objectes_globals/Math/pow ---
    {{JSRef}}
    diff --git a/files/ca/web/javascript/reference/global_objects/math/random/index.html b/files/ca/web/javascript/reference/global_objects/math/random/index.html index d70169efd4..5018a5c59d 100644 --- a/files/ca/web/javascript/reference/global_objects/math/random/index.html +++ b/files/ca/web/javascript/reference/global_objects/math/random/index.html @@ -1,7 +1,8 @@ --- title: Math.random() -slug: Web/JavaScript/Referencia/Objectes_globals/Math/random +slug: Web/JavaScript/Reference/Global_Objects/Math/random translation_of: Web/JavaScript/Reference/Global_Objects/Math/random +original_slug: Web/JavaScript/Referencia/Objectes_globals/Math/random ---
    {{JSRef}}
    diff --git a/files/ca/web/javascript/reference/global_objects/math/round/index.html b/files/ca/web/javascript/reference/global_objects/math/round/index.html index 2510799381..fcc2d46bf9 100644 --- a/files/ca/web/javascript/reference/global_objects/math/round/index.html +++ b/files/ca/web/javascript/reference/global_objects/math/round/index.html @@ -1,7 +1,8 @@ --- title: Math.round() -slug: Web/JavaScript/Referencia/Objectes_globals/Math/round +slug: Web/JavaScript/Reference/Global_Objects/Math/round translation_of: Web/JavaScript/Reference/Global_Objects/Math/round +original_slug: Web/JavaScript/Referencia/Objectes_globals/Math/round ---
    {{JSRef}}
    diff --git a/files/ca/web/javascript/reference/global_objects/math/sign/index.html b/files/ca/web/javascript/reference/global_objects/math/sign/index.html index 520ff27dc4..a3a1df277e 100644 --- a/files/ca/web/javascript/reference/global_objects/math/sign/index.html +++ b/files/ca/web/javascript/reference/global_objects/math/sign/index.html @@ -1,7 +1,8 @@ --- title: Math.sign() -slug: Web/JavaScript/Referencia/Objectes_globals/Math/sign +slug: Web/JavaScript/Reference/Global_Objects/Math/sign translation_of: Web/JavaScript/Reference/Global_Objects/Math/sign +original_slug: Web/JavaScript/Referencia/Objectes_globals/Math/sign ---
    {{JSRef}}
    diff --git a/files/ca/web/javascript/reference/global_objects/math/sin/index.html b/files/ca/web/javascript/reference/global_objects/math/sin/index.html index 7f1faf9a98..e880f9ac74 100644 --- a/files/ca/web/javascript/reference/global_objects/math/sin/index.html +++ b/files/ca/web/javascript/reference/global_objects/math/sin/index.html @@ -1,7 +1,8 @@ --- title: Math.sin() -slug: Web/JavaScript/Referencia/Objectes_globals/Math/sin +slug: Web/JavaScript/Reference/Global_Objects/Math/sin translation_of: Web/JavaScript/Reference/Global_Objects/Math/sin +original_slug: Web/JavaScript/Referencia/Objectes_globals/Math/sin ---
    {{JSRef("Global_Objects", "Math")}}
    diff --git a/files/ca/web/javascript/reference/global_objects/math/sinh/index.html b/files/ca/web/javascript/reference/global_objects/math/sinh/index.html index a1cc1f446a..9622b9a00d 100644 --- a/files/ca/web/javascript/reference/global_objects/math/sinh/index.html +++ b/files/ca/web/javascript/reference/global_objects/math/sinh/index.html @@ -1,7 +1,8 @@ --- title: Math.sinh() -slug: Web/JavaScript/Referencia/Objectes_globals/Math/sinh +slug: Web/JavaScript/Reference/Global_Objects/Math/sinh translation_of: Web/JavaScript/Reference/Global_Objects/Math/sinh +original_slug: Web/JavaScript/Referencia/Objectes_globals/Math/sinh ---
    {{JSRef}}
    diff --git a/files/ca/web/javascript/reference/global_objects/math/sqrt/index.html b/files/ca/web/javascript/reference/global_objects/math/sqrt/index.html index b726db8a31..a9cdc465a3 100644 --- a/files/ca/web/javascript/reference/global_objects/math/sqrt/index.html +++ b/files/ca/web/javascript/reference/global_objects/math/sqrt/index.html @@ -1,7 +1,8 @@ --- title: Math.sqrt() -slug: Web/JavaScript/Referencia/Objectes_globals/Math/sqrt +slug: Web/JavaScript/Reference/Global_Objects/Math/sqrt translation_of: Web/JavaScript/Reference/Global_Objects/Math/sqrt +original_slug: Web/JavaScript/Referencia/Objectes_globals/Math/sqrt ---
    {{JSRef}}
    diff --git a/files/ca/web/javascript/reference/global_objects/math/sqrt1_2/index.html b/files/ca/web/javascript/reference/global_objects/math/sqrt1_2/index.html index 3d7d3a1370..a837b7515d 100644 --- a/files/ca/web/javascript/reference/global_objects/math/sqrt1_2/index.html +++ b/files/ca/web/javascript/reference/global_objects/math/sqrt1_2/index.html @@ -1,7 +1,8 @@ --- title: Math.SQRT1_2 -slug: Web/JavaScript/Referencia/Objectes_globals/Math/SQRT1_2 +slug: Web/JavaScript/Reference/Global_Objects/Math/SQRT1_2 translation_of: Web/JavaScript/Reference/Global_Objects/Math/SQRT1_2 +original_slug: Web/JavaScript/Referencia/Objectes_globals/Math/SQRT1_2 ---
    {{JSRef("Global_Objects", "Math")}}
    diff --git a/files/ca/web/javascript/reference/global_objects/math/sqrt2/index.html b/files/ca/web/javascript/reference/global_objects/math/sqrt2/index.html index 3d049f228c..fa49b09c47 100644 --- a/files/ca/web/javascript/reference/global_objects/math/sqrt2/index.html +++ b/files/ca/web/javascript/reference/global_objects/math/sqrt2/index.html @@ -1,7 +1,8 @@ --- title: Math.SQRT2 -slug: Web/JavaScript/Referencia/Objectes_globals/Math/SQRT2 +slug: Web/JavaScript/Reference/Global_Objects/Math/SQRT2 translation_of: Web/JavaScript/Reference/Global_Objects/Math/SQRT2 +original_slug: Web/JavaScript/Referencia/Objectes_globals/Math/SQRT2 ---
    {{JSRef("Global_Objects", "Math")}}
    diff --git a/files/ca/web/javascript/reference/global_objects/math/tan/index.html b/files/ca/web/javascript/reference/global_objects/math/tan/index.html index 590e1f5fc8..a48a08a947 100644 --- a/files/ca/web/javascript/reference/global_objects/math/tan/index.html +++ b/files/ca/web/javascript/reference/global_objects/math/tan/index.html @@ -1,7 +1,8 @@ --- title: Math.tan() -slug: Web/JavaScript/Referencia/Objectes_globals/Math/tan +slug: Web/JavaScript/Reference/Global_Objects/Math/tan translation_of: Web/JavaScript/Reference/Global_Objects/Math/tan +original_slug: Web/JavaScript/Referencia/Objectes_globals/Math/tan ---
    {{JSRef("Global_Objects", "Math")}}
    diff --git a/files/ca/web/javascript/reference/global_objects/math/tanh/index.html b/files/ca/web/javascript/reference/global_objects/math/tanh/index.html index ada19d17e0..63c08ddf1c 100644 --- a/files/ca/web/javascript/reference/global_objects/math/tanh/index.html +++ b/files/ca/web/javascript/reference/global_objects/math/tanh/index.html @@ -1,7 +1,8 @@ --- title: Math.tanh() -slug: Web/JavaScript/Referencia/Objectes_globals/Math/tanh +slug: Web/JavaScript/Reference/Global_Objects/Math/tanh translation_of: Web/JavaScript/Reference/Global_Objects/Math/tanh +original_slug: Web/JavaScript/Referencia/Objectes_globals/Math/tanh ---
    {{JSRef}}
    diff --git a/files/ca/web/javascript/reference/global_objects/math/trunc/index.html b/files/ca/web/javascript/reference/global_objects/math/trunc/index.html index 4f76502d69..5fb0229700 100644 --- a/files/ca/web/javascript/reference/global_objects/math/trunc/index.html +++ b/files/ca/web/javascript/reference/global_objects/math/trunc/index.html @@ -1,7 +1,8 @@ --- title: Math.trunc() -slug: Web/JavaScript/Referencia/Objectes_globals/Math/trunc +slug: Web/JavaScript/Reference/Global_Objects/Math/trunc translation_of: Web/JavaScript/Reference/Global_Objects/Math/trunc +original_slug: Web/JavaScript/Referencia/Objectes_globals/Math/trunc ---
    {{JSRef}}
    diff --git a/files/ca/web/javascript/reference/global_objects/nan/index.html b/files/ca/web/javascript/reference/global_objects/nan/index.html index 1d6f4a4dc8..ea6d203f0d 100644 --- a/files/ca/web/javascript/reference/global_objects/nan/index.html +++ b/files/ca/web/javascript/reference/global_objects/nan/index.html @@ -1,7 +1,8 @@ --- title: NaN -slug: Web/JavaScript/Referencia/Objectes_globals/NaN +slug: Web/JavaScript/Reference/Global_Objects/NaN translation_of: Web/JavaScript/Reference/Global_Objects/NaN +original_slug: Web/JavaScript/Referencia/Objectes_globals/NaN ---
    diff --git a/files/ca/web/javascript/reference/global_objects/null/index.html b/files/ca/web/javascript/reference/global_objects/null/index.html index 97506ddeb5..6519c2f522 100644 --- a/files/ca/web/javascript/reference/global_objects/null/index.html +++ b/files/ca/web/javascript/reference/global_objects/null/index.html @@ -1,7 +1,8 @@ --- title: 'null' -slug: Web/JavaScript/Referencia/Objectes_globals/null +slug: Web/JavaScript/Reference/Global_Objects/null translation_of: Web/JavaScript/Reference/Global_Objects/null +original_slug: Web/JavaScript/Referencia/Objectes_globals/null ---
    diff --git a/files/ca/web/javascript/reference/global_objects/number/epsilon/index.html b/files/ca/web/javascript/reference/global_objects/number/epsilon/index.html index 5e3f602703..20036f41ed 100644 --- a/files/ca/web/javascript/reference/global_objects/number/epsilon/index.html +++ b/files/ca/web/javascript/reference/global_objects/number/epsilon/index.html @@ -1,7 +1,8 @@ --- title: Number.EPSILON -slug: Web/JavaScript/Referencia/Objectes_globals/Number/EPSILON +slug: Web/JavaScript/Reference/Global_Objects/Number/EPSILON translation_of: Web/JavaScript/Reference/Global_Objects/Number/EPSILON +original_slug: Web/JavaScript/Referencia/Objectes_globals/Number/EPSILON ---
    {{JSRef("Global_Objects", "Number")}}
    diff --git a/files/ca/web/javascript/reference/global_objects/number/index.html b/files/ca/web/javascript/reference/global_objects/number/index.html index 5f4b7a0bb2..f6ef461a15 100644 --- a/files/ca/web/javascript/reference/global_objects/number/index.html +++ b/files/ca/web/javascript/reference/global_objects/number/index.html @@ -1,7 +1,8 @@ --- title: Number -slug: Web/JavaScript/Referencia/Objectes_globals/Number +slug: Web/JavaScript/Reference/Global_Objects/Number translation_of: Web/JavaScript/Reference/Global_Objects/Number +original_slug: Web/JavaScript/Referencia/Objectes_globals/Number ---
    {{JSRef("Global_Objects", "Number")}}
    diff --git a/files/ca/web/javascript/reference/global_objects/number/isfinite/index.html b/files/ca/web/javascript/reference/global_objects/number/isfinite/index.html index 21d9493bf8..aed53d28a2 100644 --- a/files/ca/web/javascript/reference/global_objects/number/isfinite/index.html +++ b/files/ca/web/javascript/reference/global_objects/number/isfinite/index.html @@ -1,7 +1,8 @@ --- title: Number.isFinite() -slug: Web/JavaScript/Referencia/Objectes_globals/Number/isFinite +slug: Web/JavaScript/Reference/Global_Objects/Number/isFinite translation_of: Web/JavaScript/Reference/Global_Objects/Number/isFinite +original_slug: Web/JavaScript/Referencia/Objectes_globals/Number/isFinite ---
    {{JSRef}}
    diff --git a/files/ca/web/javascript/reference/global_objects/number/isinteger/index.html b/files/ca/web/javascript/reference/global_objects/number/isinteger/index.html index ee524e91c2..cbc6613bea 100644 --- a/files/ca/web/javascript/reference/global_objects/number/isinteger/index.html +++ b/files/ca/web/javascript/reference/global_objects/number/isinteger/index.html @@ -1,7 +1,8 @@ --- title: Number.isInteger() -slug: Web/JavaScript/Referencia/Objectes_globals/Number/isInteger +slug: Web/JavaScript/Reference/Global_Objects/Number/isInteger translation_of: Web/JavaScript/Reference/Global_Objects/Number/isInteger +original_slug: Web/JavaScript/Referencia/Objectes_globals/Number/isInteger ---
    {{JSRef}}
    diff --git a/files/ca/web/javascript/reference/global_objects/number/isnan/index.html b/files/ca/web/javascript/reference/global_objects/number/isnan/index.html index f6ba247306..9c4776c5f3 100644 --- a/files/ca/web/javascript/reference/global_objects/number/isnan/index.html +++ b/files/ca/web/javascript/reference/global_objects/number/isnan/index.html @@ -1,7 +1,8 @@ --- title: Number.isNaN() -slug: Web/JavaScript/Referencia/Objectes_globals/Number/isNaN +slug: Web/JavaScript/Reference/Global_Objects/Number/isNaN translation_of: Web/JavaScript/Reference/Global_Objects/Number/isNaN +original_slug: Web/JavaScript/Referencia/Objectes_globals/Number/isNaN ---
    {{JSRef}}
    diff --git a/files/ca/web/javascript/reference/global_objects/number/issafeinteger/index.html b/files/ca/web/javascript/reference/global_objects/number/issafeinteger/index.html index 7570e7289d..079d7f990f 100644 --- a/files/ca/web/javascript/reference/global_objects/number/issafeinteger/index.html +++ b/files/ca/web/javascript/reference/global_objects/number/issafeinteger/index.html @@ -1,7 +1,8 @@ --- title: Number.isSafeInteger() -slug: Web/JavaScript/Referencia/Objectes_globals/Number/isSafeInteger +slug: Web/JavaScript/Reference/Global_Objects/Number/isSafeInteger translation_of: Web/JavaScript/Reference/Global_Objects/Number/isSafeInteger +original_slug: Web/JavaScript/Referencia/Objectes_globals/Number/isSafeInteger ---
    {{JSRef}}
    diff --git a/files/ca/web/javascript/reference/global_objects/number/max_safe_integer/index.html b/files/ca/web/javascript/reference/global_objects/number/max_safe_integer/index.html index 02483b41ac..af4eceb183 100644 --- a/files/ca/web/javascript/reference/global_objects/number/max_safe_integer/index.html +++ b/files/ca/web/javascript/reference/global_objects/number/max_safe_integer/index.html @@ -1,7 +1,8 @@ --- title: Number.MAX_SAFE_INTEGER -slug: Web/JavaScript/Referencia/Objectes_globals/Number/MAX_SAFE_INTEGER +slug: Web/JavaScript/Reference/Global_Objects/Number/MAX_SAFE_INTEGER translation_of: Web/JavaScript/Reference/Global_Objects/Number/MAX_SAFE_INTEGER +original_slug: Web/JavaScript/Referencia/Objectes_globals/Number/MAX_SAFE_INTEGER ---
    {{JSRef("Global_Objects", "Number")}}
    diff --git a/files/ca/web/javascript/reference/global_objects/number/max_value/index.html b/files/ca/web/javascript/reference/global_objects/number/max_value/index.html index 453ad01c23..7b325dde61 100644 --- a/files/ca/web/javascript/reference/global_objects/number/max_value/index.html +++ b/files/ca/web/javascript/reference/global_objects/number/max_value/index.html @@ -1,7 +1,8 @@ --- title: Number.MAX_VALUE -slug: Web/JavaScript/Referencia/Objectes_globals/Number/MAX_VALUE +slug: Web/JavaScript/Reference/Global_Objects/Number/MAX_VALUE translation_of: Web/JavaScript/Reference/Global_Objects/Number/MAX_VALUE +original_slug: Web/JavaScript/Referencia/Objectes_globals/Number/MAX_VALUE ---
    {{JSRef("Global_Objects", "Number")}}
    diff --git a/files/ca/web/javascript/reference/global_objects/number/min_safe_integer/index.html b/files/ca/web/javascript/reference/global_objects/number/min_safe_integer/index.html index 861ec666ec..b6f7843eba 100644 --- a/files/ca/web/javascript/reference/global_objects/number/min_safe_integer/index.html +++ b/files/ca/web/javascript/reference/global_objects/number/min_safe_integer/index.html @@ -1,7 +1,8 @@ --- title: Number.MIN_SAFE_INTEGER -slug: Web/JavaScript/Referencia/Objectes_globals/Number/MIN_SAFE_INTEGER +slug: Web/JavaScript/Reference/Global_Objects/Number/MIN_SAFE_INTEGER translation_of: Web/JavaScript/Reference/Global_Objects/Number/MIN_SAFE_INTEGER +original_slug: Web/JavaScript/Referencia/Objectes_globals/Number/MIN_SAFE_INTEGER ---
    {{JSRef("Global_Objects", "Number")}}
    diff --git a/files/ca/web/javascript/reference/global_objects/number/min_value/index.html b/files/ca/web/javascript/reference/global_objects/number/min_value/index.html index 42af185360..39c1411150 100644 --- a/files/ca/web/javascript/reference/global_objects/number/min_value/index.html +++ b/files/ca/web/javascript/reference/global_objects/number/min_value/index.html @@ -1,7 +1,8 @@ --- title: Number.MIN_VALUE -slug: Web/JavaScript/Referencia/Objectes_globals/Number/MIN_VALUE +slug: Web/JavaScript/Reference/Global_Objects/Number/MIN_VALUE translation_of: Web/JavaScript/Reference/Global_Objects/Number/MIN_VALUE +original_slug: Web/JavaScript/Referencia/Objectes_globals/Number/MIN_VALUE ---
    {{JSRef("Global_Objects", "Number")}}
    diff --git a/files/ca/web/javascript/reference/global_objects/number/nan/index.html b/files/ca/web/javascript/reference/global_objects/number/nan/index.html index 7c6f3f1440..0d94244290 100644 --- a/files/ca/web/javascript/reference/global_objects/number/nan/index.html +++ b/files/ca/web/javascript/reference/global_objects/number/nan/index.html @@ -1,7 +1,8 @@ --- title: Number.NaN -slug: Web/JavaScript/Referencia/Objectes_globals/Number/NaN +slug: Web/JavaScript/Reference/Global_Objects/Number/NaN translation_of: Web/JavaScript/Reference/Global_Objects/Number/NaN +original_slug: Web/JavaScript/Referencia/Objectes_globals/Number/NaN ---
    {{JSRef("Global_Objects", "Number")}}
    diff --git a/files/ca/web/javascript/reference/global_objects/number/negative_infinity/index.html b/files/ca/web/javascript/reference/global_objects/number/negative_infinity/index.html index 3fb4c1d150..6bec8b6825 100644 --- a/files/ca/web/javascript/reference/global_objects/number/negative_infinity/index.html +++ b/files/ca/web/javascript/reference/global_objects/number/negative_infinity/index.html @@ -1,7 +1,8 @@ --- title: Number.NEGATIVE_INFINITY -slug: Web/JavaScript/Referencia/Objectes_globals/Number/NEGATIVE_INFINITY +slug: Web/JavaScript/Reference/Global_Objects/Number/NEGATIVE_INFINITY translation_of: Web/JavaScript/Reference/Global_Objects/Number/NEGATIVE_INFINITY +original_slug: Web/JavaScript/Referencia/Objectes_globals/Number/NEGATIVE_INFINITY ---
    {{JSRef("Global_Objects", "Number")}}
    diff --git a/files/ca/web/javascript/reference/global_objects/number/parsefloat/index.html b/files/ca/web/javascript/reference/global_objects/number/parsefloat/index.html index cd3494b7ac..f260845735 100644 --- a/files/ca/web/javascript/reference/global_objects/number/parsefloat/index.html +++ b/files/ca/web/javascript/reference/global_objects/number/parsefloat/index.html @@ -1,7 +1,8 @@ --- title: Number.parseFloat() -slug: Web/JavaScript/Referencia/Objectes_globals/Number/parseFloat +slug: Web/JavaScript/Reference/Global_Objects/Number/parseFloat translation_of: Web/JavaScript/Reference/Global_Objects/Number/parseFloat +original_slug: Web/JavaScript/Referencia/Objectes_globals/Number/parseFloat ---
    {{JSRef}}
    diff --git a/files/ca/web/javascript/reference/global_objects/number/parseint/index.html b/files/ca/web/javascript/reference/global_objects/number/parseint/index.html index 2ef9597d11..3d64535f5b 100644 --- a/files/ca/web/javascript/reference/global_objects/number/parseint/index.html +++ b/files/ca/web/javascript/reference/global_objects/number/parseint/index.html @@ -1,7 +1,8 @@ --- title: Number.parseInt() -slug: Web/JavaScript/Referencia/Objectes_globals/Number/parseInt +slug: Web/JavaScript/Reference/Global_Objects/Number/parseInt translation_of: Web/JavaScript/Reference/Global_Objects/Number/parseInt +original_slug: Web/JavaScript/Referencia/Objectes_globals/Number/parseInt ---
    {{JSRef}}
    diff --git a/files/ca/web/javascript/reference/global_objects/number/positive_infinity/index.html b/files/ca/web/javascript/reference/global_objects/number/positive_infinity/index.html index 234a779fd1..201eb9a614 100644 --- a/files/ca/web/javascript/reference/global_objects/number/positive_infinity/index.html +++ b/files/ca/web/javascript/reference/global_objects/number/positive_infinity/index.html @@ -1,7 +1,8 @@ --- title: Number.POSITIVE_INFINITY -slug: Web/JavaScript/Referencia/Objectes_globals/Number/POSITIVE_INFINITY +slug: Web/JavaScript/Reference/Global_Objects/Number/POSITIVE_INFINITY translation_of: Web/JavaScript/Reference/Global_Objects/Number/POSITIVE_INFINITY +original_slug: Web/JavaScript/Referencia/Objectes_globals/Number/POSITIVE_INFINITY ---
    {{JSRef}}
    diff --git a/files/ca/web/javascript/reference/global_objects/number/toexponential/index.html b/files/ca/web/javascript/reference/global_objects/number/toexponential/index.html index 69ca3478ac..16adb8fa12 100644 --- a/files/ca/web/javascript/reference/global_objects/number/toexponential/index.html +++ b/files/ca/web/javascript/reference/global_objects/number/toexponential/index.html @@ -1,7 +1,8 @@ --- title: Number.prototype.toExponential() -slug: Web/JavaScript/Referencia/Objectes_globals/Number/toExponential +slug: Web/JavaScript/Reference/Global_Objects/Number/toExponential translation_of: Web/JavaScript/Reference/Global_Objects/Number/toExponential +original_slug: Web/JavaScript/Referencia/Objectes_globals/Number/toExponential ---
    {{JSRef}}
    diff --git a/files/ca/web/javascript/reference/global_objects/number/tofixed/index.html b/files/ca/web/javascript/reference/global_objects/number/tofixed/index.html index 8df53aafe3..97e9279ef3 100644 --- a/files/ca/web/javascript/reference/global_objects/number/tofixed/index.html +++ b/files/ca/web/javascript/reference/global_objects/number/tofixed/index.html @@ -1,7 +1,8 @@ --- title: Number.prototype.toFixed() -slug: Web/JavaScript/Referencia/Objectes_globals/Number/toFixed +slug: Web/JavaScript/Reference/Global_Objects/Number/toFixed translation_of: Web/JavaScript/Reference/Global_Objects/Number/toFixed +original_slug: Web/JavaScript/Referencia/Objectes_globals/Number/toFixed ---
    {{JSRef}}
    diff --git a/files/ca/web/javascript/reference/global_objects/number/toprecision/index.html b/files/ca/web/javascript/reference/global_objects/number/toprecision/index.html index 0af5875e7f..79166a8749 100644 --- a/files/ca/web/javascript/reference/global_objects/number/toprecision/index.html +++ b/files/ca/web/javascript/reference/global_objects/number/toprecision/index.html @@ -1,7 +1,8 @@ --- title: Number.prototype.toPrecision() -slug: Web/JavaScript/Referencia/Objectes_globals/Number/toPrecision +slug: Web/JavaScript/Reference/Global_Objects/Number/toPrecision translation_of: Web/JavaScript/Reference/Global_Objects/Number/toPrecision +original_slug: Web/JavaScript/Referencia/Objectes_globals/Number/toPrecision ---
    {{JSRef}}
    diff --git a/files/ca/web/javascript/reference/global_objects/number/tostring/index.html b/files/ca/web/javascript/reference/global_objects/number/tostring/index.html index 7381fc97ac..c048302d99 100644 --- a/files/ca/web/javascript/reference/global_objects/number/tostring/index.html +++ b/files/ca/web/javascript/reference/global_objects/number/tostring/index.html @@ -1,7 +1,8 @@ --- title: Number.prototype.toString() -slug: Web/JavaScript/Referencia/Objectes_globals/Number/toString +slug: Web/JavaScript/Reference/Global_Objects/Number/toString translation_of: Web/JavaScript/Reference/Global_Objects/Number/toString +original_slug: Web/JavaScript/Referencia/Objectes_globals/Number/toString ---
    {{JSRef}}
    diff --git a/files/ca/web/javascript/reference/global_objects/parsefloat/index.html b/files/ca/web/javascript/reference/global_objects/parsefloat/index.html index 570fa6b63f..f11c81107e 100644 --- a/files/ca/web/javascript/reference/global_objects/parsefloat/index.html +++ b/files/ca/web/javascript/reference/global_objects/parsefloat/index.html @@ -1,7 +1,8 @@ --- title: parseFloat() -slug: Web/JavaScript/Referencia/Objectes_globals/parseFloat +slug: Web/JavaScript/Reference/Global_Objects/parseFloat translation_of: Web/JavaScript/Reference/Global_Objects/parseFloat +original_slug: Web/JavaScript/Referencia/Objectes_globals/parseFloat ---
    diff --git a/files/ca/web/javascript/reference/global_objects/set/add/index.html b/files/ca/web/javascript/reference/global_objects/set/add/index.html index b93eaa3efb..0c619eb2ff 100644 --- a/files/ca/web/javascript/reference/global_objects/set/add/index.html +++ b/files/ca/web/javascript/reference/global_objects/set/add/index.html @@ -1,7 +1,8 @@ --- title: Set.prototype.add() -slug: Web/JavaScript/Referencia/Objectes_globals/Set/add +slug: Web/JavaScript/Reference/Global_Objects/Set/add translation_of: Web/JavaScript/Reference/Global_Objects/Set/add +original_slug: Web/JavaScript/Referencia/Objectes_globals/Set/add ---
    {{JSRef}}
    diff --git a/files/ca/web/javascript/reference/global_objects/set/clear/index.html b/files/ca/web/javascript/reference/global_objects/set/clear/index.html index 6ef179daaa..3853f18f7e 100644 --- a/files/ca/web/javascript/reference/global_objects/set/clear/index.html +++ b/files/ca/web/javascript/reference/global_objects/set/clear/index.html @@ -1,7 +1,8 @@ --- title: Set.prototype.clear() -slug: Web/JavaScript/Referencia/Objectes_globals/Set/clear +slug: Web/JavaScript/Reference/Global_Objects/Set/clear translation_of: Web/JavaScript/Reference/Global_Objects/Set/clear +original_slug: Web/JavaScript/Referencia/Objectes_globals/Set/clear ---
    {{JSRef}}
    diff --git a/files/ca/web/javascript/reference/global_objects/set/delete/index.html b/files/ca/web/javascript/reference/global_objects/set/delete/index.html index ea66c1a723..d2e68be67b 100644 --- a/files/ca/web/javascript/reference/global_objects/set/delete/index.html +++ b/files/ca/web/javascript/reference/global_objects/set/delete/index.html @@ -1,7 +1,8 @@ --- title: Set.prototype.delete() -slug: Web/JavaScript/Referencia/Objectes_globals/Set/delete +slug: Web/JavaScript/Reference/Global_Objects/Set/delete translation_of: Web/JavaScript/Reference/Global_Objects/Set/delete +original_slug: Web/JavaScript/Referencia/Objectes_globals/Set/delete ---
    {{JSRef}}
    diff --git a/files/ca/web/javascript/reference/global_objects/set/entries/index.html b/files/ca/web/javascript/reference/global_objects/set/entries/index.html index 848e53ba8d..084e9597a5 100644 --- a/files/ca/web/javascript/reference/global_objects/set/entries/index.html +++ b/files/ca/web/javascript/reference/global_objects/set/entries/index.html @@ -1,7 +1,8 @@ --- title: Set.prototype.entries() -slug: Web/JavaScript/Referencia/Objectes_globals/Set/entries +slug: Web/JavaScript/Reference/Global_Objects/Set/entries translation_of: Web/JavaScript/Reference/Global_Objects/Set/entries +original_slug: Web/JavaScript/Referencia/Objectes_globals/Set/entries ---
    {{JSRef}}
    diff --git a/files/ca/web/javascript/reference/global_objects/set/has/index.html b/files/ca/web/javascript/reference/global_objects/set/has/index.html index ca9027b8a4..ce1de9ee08 100644 --- a/files/ca/web/javascript/reference/global_objects/set/has/index.html +++ b/files/ca/web/javascript/reference/global_objects/set/has/index.html @@ -1,7 +1,8 @@ --- title: Set.prototype.has() -slug: Web/JavaScript/Referencia/Objectes_globals/Set/has +slug: Web/JavaScript/Reference/Global_Objects/Set/has translation_of: Web/JavaScript/Reference/Global_Objects/Set/has +original_slug: Web/JavaScript/Referencia/Objectes_globals/Set/has ---
    {{JSRef}}
    diff --git a/files/ca/web/javascript/reference/global_objects/set/index.html b/files/ca/web/javascript/reference/global_objects/set/index.html index 993d296324..e7b9067326 100644 --- a/files/ca/web/javascript/reference/global_objects/set/index.html +++ b/files/ca/web/javascript/reference/global_objects/set/index.html @@ -1,7 +1,8 @@ --- title: Set -slug: Web/JavaScript/Referencia/Objectes_globals/Set +slug: Web/JavaScript/Reference/Global_Objects/Set translation_of: Web/JavaScript/Reference/Global_Objects/Set +original_slug: Web/JavaScript/Referencia/Objectes_globals/Set ---
    {{JSRef}}
    diff --git a/files/ca/web/javascript/reference/global_objects/set/values/index.html b/files/ca/web/javascript/reference/global_objects/set/values/index.html index 307fa78113..9a51edb912 100644 --- a/files/ca/web/javascript/reference/global_objects/set/values/index.html +++ b/files/ca/web/javascript/reference/global_objects/set/values/index.html @@ -1,7 +1,8 @@ --- title: Set.prototype.values() -slug: Web/JavaScript/Referencia/Objectes_globals/Set/values +slug: Web/JavaScript/Reference/Global_Objects/Set/values translation_of: Web/JavaScript/Reference/Global_Objects/Set/values +original_slug: Web/JavaScript/Referencia/Objectes_globals/Set/values ---
    {{JSRef}}
    diff --git a/files/ca/web/javascript/reference/global_objects/string/anchor/index.html b/files/ca/web/javascript/reference/global_objects/string/anchor/index.html index 15bd4db97b..501d7ea2eb 100644 --- a/files/ca/web/javascript/reference/global_objects/string/anchor/index.html +++ b/files/ca/web/javascript/reference/global_objects/string/anchor/index.html @@ -1,7 +1,8 @@ --- title: String.prototype.anchor() -slug: Web/JavaScript/Referencia/Objectes_globals/String/anchor +slug: Web/JavaScript/Reference/Global_Objects/String/anchor translation_of: Web/JavaScript/Reference/Global_Objects/String/anchor +original_slug: Web/JavaScript/Referencia/Objectes_globals/String/anchor ---
    {{JSRef}}
    diff --git a/files/ca/web/javascript/reference/global_objects/string/big/index.html b/files/ca/web/javascript/reference/global_objects/string/big/index.html index a3b8815f10..2f9aae3b17 100644 --- a/files/ca/web/javascript/reference/global_objects/string/big/index.html +++ b/files/ca/web/javascript/reference/global_objects/string/big/index.html @@ -1,7 +1,8 @@ --- title: String.prototype.big() -slug: Web/JavaScript/Referencia/Objectes_globals/String/big +slug: Web/JavaScript/Reference/Global_Objects/String/big translation_of: Web/JavaScript/Reference/Global_Objects/String/big +original_slug: Web/JavaScript/Referencia/Objectes_globals/String/big ---
    {{JSRef}} {{deprecated_header}}
    diff --git a/files/ca/web/javascript/reference/global_objects/string/blink/index.html b/files/ca/web/javascript/reference/global_objects/string/blink/index.html index 2378325897..98d657b77b 100644 --- a/files/ca/web/javascript/reference/global_objects/string/blink/index.html +++ b/files/ca/web/javascript/reference/global_objects/string/blink/index.html @@ -1,7 +1,8 @@ --- title: String.prototype.blink() -slug: Web/JavaScript/Referencia/Objectes_globals/String/blink +slug: Web/JavaScript/Reference/Global_Objects/String/blink translation_of: Web/JavaScript/Reference/Global_Objects/String/blink +original_slug: Web/JavaScript/Referencia/Objectes_globals/String/blink ---
    {{JSRef}} {{deprecated_header}}
    diff --git a/files/ca/web/javascript/reference/global_objects/string/bold/index.html b/files/ca/web/javascript/reference/global_objects/string/bold/index.html index 502810bb45..403db1ca36 100644 --- a/files/ca/web/javascript/reference/global_objects/string/bold/index.html +++ b/files/ca/web/javascript/reference/global_objects/string/bold/index.html @@ -1,7 +1,8 @@ --- title: String.prototype.bold() -slug: Web/JavaScript/Referencia/Objectes_globals/String/bold +slug: Web/JavaScript/Reference/Global_Objects/String/bold translation_of: Web/JavaScript/Reference/Global_Objects/String/bold +original_slug: Web/JavaScript/Referencia/Objectes_globals/String/bold ---
    {{JSRef}} {{deprecated_header}}
    diff --git a/files/ca/web/javascript/reference/global_objects/string/charat/index.html b/files/ca/web/javascript/reference/global_objects/string/charat/index.html index 55a84ab7d0..60c6f7a9c0 100644 --- a/files/ca/web/javascript/reference/global_objects/string/charat/index.html +++ b/files/ca/web/javascript/reference/global_objects/string/charat/index.html @@ -1,7 +1,8 @@ --- title: String.prototype.charAt() -slug: Web/JavaScript/Referencia/Objectes_globals/String/charAt +slug: Web/JavaScript/Reference/Global_Objects/String/charAt translation_of: Web/JavaScript/Reference/Global_Objects/String/charAt +original_slug: Web/JavaScript/Referencia/Objectes_globals/String/charAt ---
    {{JSRef}}
    diff --git a/files/ca/web/javascript/reference/global_objects/string/concat/index.html b/files/ca/web/javascript/reference/global_objects/string/concat/index.html index 87cdda3c5e..b9bedcb4ce 100644 --- a/files/ca/web/javascript/reference/global_objects/string/concat/index.html +++ b/files/ca/web/javascript/reference/global_objects/string/concat/index.html @@ -1,7 +1,8 @@ --- title: String.prototype.concat() -slug: Web/JavaScript/Referencia/Objectes_globals/String/concat +slug: Web/JavaScript/Reference/Global_Objects/String/concat translation_of: Web/JavaScript/Reference/Global_Objects/String/concat +original_slug: Web/JavaScript/Referencia/Objectes_globals/String/concat ---
    {{JSRef}}
    diff --git a/files/ca/web/javascript/reference/global_objects/string/endswith/index.html b/files/ca/web/javascript/reference/global_objects/string/endswith/index.html index 83a1201549..2706be9e88 100644 --- a/files/ca/web/javascript/reference/global_objects/string/endswith/index.html +++ b/files/ca/web/javascript/reference/global_objects/string/endswith/index.html @@ -1,7 +1,8 @@ --- title: String.prototype.endsWith() -slug: Web/JavaScript/Referencia/Objectes_globals/String/endsWith +slug: Web/JavaScript/Reference/Global_Objects/String/endsWith translation_of: Web/JavaScript/Reference/Global_Objects/String/endsWith +original_slug: Web/JavaScript/Referencia/Objectes_globals/String/endsWith ---
    {{JSRef}}
    diff --git a/files/ca/web/javascript/reference/global_objects/string/fixed/index.html b/files/ca/web/javascript/reference/global_objects/string/fixed/index.html index 069ab4243f..8e44a443d6 100644 --- a/files/ca/web/javascript/reference/global_objects/string/fixed/index.html +++ b/files/ca/web/javascript/reference/global_objects/string/fixed/index.html @@ -1,7 +1,8 @@ --- title: String.prototype.fixed() -slug: Web/JavaScript/Referencia/Objectes_globals/String/fixed +slug: Web/JavaScript/Reference/Global_Objects/String/fixed translation_of: Web/JavaScript/Reference/Global_Objects/String/fixed +original_slug: Web/JavaScript/Referencia/Objectes_globals/String/fixed ---
    {{JSRef}} {{deprecated_header}}
    diff --git a/files/ca/web/javascript/reference/global_objects/string/fontcolor/index.html b/files/ca/web/javascript/reference/global_objects/string/fontcolor/index.html index be52cd576b..1a88ad0070 100644 --- a/files/ca/web/javascript/reference/global_objects/string/fontcolor/index.html +++ b/files/ca/web/javascript/reference/global_objects/string/fontcolor/index.html @@ -1,7 +1,8 @@ --- title: String.prototype.fontcolor() -slug: Web/JavaScript/Referencia/Objectes_globals/String/fontcolor +slug: Web/JavaScript/Reference/Global_Objects/String/fontcolor translation_of: Web/JavaScript/Reference/Global_Objects/String/fontcolor +original_slug: Web/JavaScript/Referencia/Objectes_globals/String/fontcolor ---
    {{JSRef}} {{deprecated_header}}
    diff --git a/files/ca/web/javascript/reference/global_objects/string/fontsize/index.html b/files/ca/web/javascript/reference/global_objects/string/fontsize/index.html index 9f30d124aa..a55b8eaa5b 100644 --- a/files/ca/web/javascript/reference/global_objects/string/fontsize/index.html +++ b/files/ca/web/javascript/reference/global_objects/string/fontsize/index.html @@ -1,7 +1,8 @@ --- title: String.prototype.fontsize() -slug: Web/JavaScript/Referencia/Objectes_globals/String/fontsize +slug: Web/JavaScript/Reference/Global_Objects/String/fontsize translation_of: Web/JavaScript/Reference/Global_Objects/String/fontsize +original_slug: Web/JavaScript/Referencia/Objectes_globals/String/fontsize ---
    {{JSRef}} {{deprecated_header}}
    diff --git a/files/ca/web/javascript/reference/global_objects/string/fromcharcode/index.html b/files/ca/web/javascript/reference/global_objects/string/fromcharcode/index.html index f4e2308bf9..e168171699 100644 --- a/files/ca/web/javascript/reference/global_objects/string/fromcharcode/index.html +++ b/files/ca/web/javascript/reference/global_objects/string/fromcharcode/index.html @@ -1,7 +1,8 @@ --- title: String.fromCharCode() -slug: Web/JavaScript/Referencia/Objectes_globals/String/fromCharCode +slug: Web/JavaScript/Reference/Global_Objects/String/fromCharCode translation_of: Web/JavaScript/Reference/Global_Objects/String/fromCharCode +original_slug: Web/JavaScript/Referencia/Objectes_globals/String/fromCharCode ---
    {{JSRef}}
    diff --git a/files/ca/web/javascript/reference/global_objects/string/index.html b/files/ca/web/javascript/reference/global_objects/string/index.html index 136820a54d..b3b91b48d7 100644 --- a/files/ca/web/javascript/reference/global_objects/string/index.html +++ b/files/ca/web/javascript/reference/global_objects/string/index.html @@ -1,7 +1,8 @@ --- title: String -slug: Web/JavaScript/Referencia/Objectes_globals/String +slug: Web/JavaScript/Reference/Global_Objects/String translation_of: Web/JavaScript/Reference/Global_Objects/String +original_slug: Web/JavaScript/Referencia/Objectes_globals/String ---
    {{JSRef("Global_Objects", "String")}}
    diff --git a/files/ca/web/javascript/reference/global_objects/string/indexof/index.html b/files/ca/web/javascript/reference/global_objects/string/indexof/index.html index 9b08b04ded..296dbdcb50 100644 --- a/files/ca/web/javascript/reference/global_objects/string/indexof/index.html +++ b/files/ca/web/javascript/reference/global_objects/string/indexof/index.html @@ -1,7 +1,8 @@ --- title: String.prototype.indexOf() -slug: Web/JavaScript/Referencia/Objectes_globals/String/indexOf +slug: Web/JavaScript/Reference/Global_Objects/String/indexOf translation_of: Web/JavaScript/Reference/Global_Objects/String/indexOf +original_slug: Web/JavaScript/Referencia/Objectes_globals/String/indexOf ---
    {{JSRef}}
    diff --git a/files/ca/web/javascript/reference/global_objects/string/italics/index.html b/files/ca/web/javascript/reference/global_objects/string/italics/index.html index f38a8f9579..f263eb5c3f 100644 --- a/files/ca/web/javascript/reference/global_objects/string/italics/index.html +++ b/files/ca/web/javascript/reference/global_objects/string/italics/index.html @@ -1,7 +1,8 @@ --- title: String.prototype.italics() -slug: Web/JavaScript/Referencia/Objectes_globals/String/italics +slug: Web/JavaScript/Reference/Global_Objects/String/italics translation_of: Web/JavaScript/Reference/Global_Objects/String/italics +original_slug: Web/JavaScript/Referencia/Objectes_globals/String/italics ---
    {{JSRef}} {{deprecated_header}}
    diff --git a/files/ca/web/javascript/reference/global_objects/string/length/index.html b/files/ca/web/javascript/reference/global_objects/string/length/index.html index 63a3114d2d..2bc570d90f 100644 --- a/files/ca/web/javascript/reference/global_objects/string/length/index.html +++ b/files/ca/web/javascript/reference/global_objects/string/length/index.html @@ -1,7 +1,8 @@ --- title: String.length -slug: Web/JavaScript/Referencia/Objectes_globals/String/length +slug: Web/JavaScript/Reference/Global_Objects/String/length translation_of: Web/JavaScript/Reference/Global_Objects/String/length +original_slug: Web/JavaScript/Referencia/Objectes_globals/String/length ---
    {{JSRef("Global_Objects", "String")}}
    diff --git a/files/ca/web/javascript/reference/global_objects/string/link/index.html b/files/ca/web/javascript/reference/global_objects/string/link/index.html index efe1385ddc..1c93d90296 100644 --- a/files/ca/web/javascript/reference/global_objects/string/link/index.html +++ b/files/ca/web/javascript/reference/global_objects/string/link/index.html @@ -1,7 +1,8 @@ --- title: String.prototype.link() -slug: Web/JavaScript/Referencia/Objectes_globals/String/link +slug: Web/JavaScript/Reference/Global_Objects/String/link translation_of: Web/JavaScript/Reference/Global_Objects/String/link +original_slug: Web/JavaScript/Referencia/Objectes_globals/String/link ---
    {{JSRef}}
    diff --git a/files/ca/web/javascript/reference/global_objects/string/normalize/index.html b/files/ca/web/javascript/reference/global_objects/string/normalize/index.html index 7a6bcef500..052e740dfe 100644 --- a/files/ca/web/javascript/reference/global_objects/string/normalize/index.html +++ b/files/ca/web/javascript/reference/global_objects/string/normalize/index.html @@ -1,7 +1,8 @@ --- title: String.prototype.normalize() -slug: Web/JavaScript/Referencia/Objectes_globals/String/normalize +slug: Web/JavaScript/Reference/Global_Objects/String/normalize translation_of: Web/JavaScript/Reference/Global_Objects/String/normalize +original_slug: Web/JavaScript/Referencia/Objectes_globals/String/normalize ---
    {{JSRef}}
    diff --git a/files/ca/web/javascript/reference/global_objects/string/small/index.html b/files/ca/web/javascript/reference/global_objects/string/small/index.html index 761797bdda..b7b43ff492 100644 --- a/files/ca/web/javascript/reference/global_objects/string/small/index.html +++ b/files/ca/web/javascript/reference/global_objects/string/small/index.html @@ -1,7 +1,8 @@ --- title: String.prototype.small() -slug: Web/JavaScript/Referencia/Objectes_globals/String/small +slug: Web/JavaScript/Reference/Global_Objects/String/small translation_of: Web/JavaScript/Reference/Global_Objects/String/small +original_slug: Web/JavaScript/Referencia/Objectes_globals/String/small ---
    {{JSRef}} {{deprecated_header}}
    diff --git a/files/ca/web/javascript/reference/global_objects/string/startswith/index.html b/files/ca/web/javascript/reference/global_objects/string/startswith/index.html index ca25398d51..e96aabc68a 100644 --- a/files/ca/web/javascript/reference/global_objects/string/startswith/index.html +++ b/files/ca/web/javascript/reference/global_objects/string/startswith/index.html @@ -1,7 +1,8 @@ --- title: String.prototype.startsWith() -slug: Web/JavaScript/Referencia/Objectes_globals/String/startsWith +slug: Web/JavaScript/Reference/Global_Objects/String/startsWith translation_of: Web/JavaScript/Reference/Global_Objects/String/startsWith +original_slug: Web/JavaScript/Referencia/Objectes_globals/String/startsWith ---
    {{JSRef}}
    diff --git a/files/ca/web/javascript/reference/global_objects/string/sub/index.html b/files/ca/web/javascript/reference/global_objects/string/sub/index.html index 0b512d038e..31655d16c9 100644 --- a/files/ca/web/javascript/reference/global_objects/string/sub/index.html +++ b/files/ca/web/javascript/reference/global_objects/string/sub/index.html @@ -1,7 +1,8 @@ --- title: String.prototype.sub() -slug: Web/JavaScript/Referencia/Objectes_globals/String/sub +slug: Web/JavaScript/Reference/Global_Objects/String/sub translation_of: Web/JavaScript/Reference/Global_Objects/String/sub +original_slug: Web/JavaScript/Referencia/Objectes_globals/String/sub ---
    {{JSRef}} {{deprecated_header}}
    diff --git a/files/ca/web/javascript/reference/global_objects/string/substr/index.html b/files/ca/web/javascript/reference/global_objects/string/substr/index.html index 5fdb1f03b4..d503114bcf 100644 --- a/files/ca/web/javascript/reference/global_objects/string/substr/index.html +++ b/files/ca/web/javascript/reference/global_objects/string/substr/index.html @@ -1,7 +1,8 @@ --- title: String.prototype.substr() -slug: Web/JavaScript/Referencia/Objectes_globals/String/substr +slug: Web/JavaScript/Reference/Global_Objects/String/substr translation_of: Web/JavaScript/Reference/Global_Objects/String/substr +original_slug: Web/JavaScript/Referencia/Objectes_globals/String/substr ---
    {{JSRef}}
    diff --git a/files/ca/web/javascript/reference/global_objects/string/sup/index.html b/files/ca/web/javascript/reference/global_objects/string/sup/index.html index 24b46c88ce..c04b9d7ca3 100644 --- a/files/ca/web/javascript/reference/global_objects/string/sup/index.html +++ b/files/ca/web/javascript/reference/global_objects/string/sup/index.html @@ -1,7 +1,8 @@ --- title: String.prototype.sup() -slug: Web/JavaScript/Referencia/Objectes_globals/String/sup +slug: Web/JavaScript/Reference/Global_Objects/String/sup translation_of: Web/JavaScript/Reference/Global_Objects/String/sup +original_slug: Web/JavaScript/Referencia/Objectes_globals/String/sup ---
    {{JSRef}} {{deprecated_header}}
    diff --git a/files/ca/web/javascript/reference/global_objects/string/tolocalelowercase/index.html b/files/ca/web/javascript/reference/global_objects/string/tolocalelowercase/index.html index c138197bc1..05d5850688 100644 --- a/files/ca/web/javascript/reference/global_objects/string/tolocalelowercase/index.html +++ b/files/ca/web/javascript/reference/global_objects/string/tolocalelowercase/index.html @@ -1,7 +1,8 @@ --- title: String.prototype.toLocaleLowerCase() -slug: Web/JavaScript/Referencia/Objectes_globals/String/toLocaleLowerCase +slug: Web/JavaScript/Reference/Global_Objects/String/toLocaleLowerCase translation_of: Web/JavaScript/Reference/Global_Objects/String/toLocaleLowerCase +original_slug: Web/JavaScript/Referencia/Objectes_globals/String/toLocaleLowerCase ---
    {{JSRef}}
    diff --git a/files/ca/web/javascript/reference/global_objects/string/tolocaleuppercase/index.html b/files/ca/web/javascript/reference/global_objects/string/tolocaleuppercase/index.html index 8f7b2aa716..5e336e40e7 100644 --- a/files/ca/web/javascript/reference/global_objects/string/tolocaleuppercase/index.html +++ b/files/ca/web/javascript/reference/global_objects/string/tolocaleuppercase/index.html @@ -1,7 +1,8 @@ --- title: String.prototype.toLocaleUpperCase() -slug: Web/JavaScript/Referencia/Objectes_globals/String/toLocaleUpperCase +slug: Web/JavaScript/Reference/Global_Objects/String/toLocaleUpperCase translation_of: Web/JavaScript/Reference/Global_Objects/String/toLocaleUpperCase +original_slug: Web/JavaScript/Referencia/Objectes_globals/String/toLocaleUpperCase ---
    {{JSRef}}
    diff --git a/files/ca/web/javascript/reference/global_objects/string/tolowercase/index.html b/files/ca/web/javascript/reference/global_objects/string/tolowercase/index.html index 7147d0ea0d..fe13276895 100644 --- a/files/ca/web/javascript/reference/global_objects/string/tolowercase/index.html +++ b/files/ca/web/javascript/reference/global_objects/string/tolowercase/index.html @@ -1,7 +1,8 @@ --- title: String.prototype.toLowerCase() -slug: Web/JavaScript/Referencia/Objectes_globals/String/toLowerCase +slug: Web/JavaScript/Reference/Global_Objects/String/toLowerCase translation_of: Web/JavaScript/Reference/Global_Objects/String/toLowerCase +original_slug: Web/JavaScript/Referencia/Objectes_globals/String/toLowerCase ---
    {{JSRef}}
    diff --git a/files/ca/web/javascript/reference/global_objects/string/tostring/index.html b/files/ca/web/javascript/reference/global_objects/string/tostring/index.html index 11f2555a2f..ab1881653b 100644 --- a/files/ca/web/javascript/reference/global_objects/string/tostring/index.html +++ b/files/ca/web/javascript/reference/global_objects/string/tostring/index.html @@ -1,7 +1,8 @@ --- title: String.prototype.toString() -slug: Web/JavaScript/Referencia/Objectes_globals/String/toString +slug: Web/JavaScript/Reference/Global_Objects/String/toString translation_of: Web/JavaScript/Reference/Global_Objects/String/toString +original_slug: Web/JavaScript/Referencia/Objectes_globals/String/toString ---
    {{JSRef}}
    diff --git a/files/ca/web/javascript/reference/global_objects/string/touppercase/index.html b/files/ca/web/javascript/reference/global_objects/string/touppercase/index.html index 2a3b4fe56a..986ca1f1c3 100644 --- a/files/ca/web/javascript/reference/global_objects/string/touppercase/index.html +++ b/files/ca/web/javascript/reference/global_objects/string/touppercase/index.html @@ -1,7 +1,8 @@ --- title: String.prototype.toUpperCase() -slug: Web/JavaScript/Referencia/Objectes_globals/String/toUpperCase +slug: Web/JavaScript/Reference/Global_Objects/String/toUpperCase translation_of: Web/JavaScript/Reference/Global_Objects/String/toUpperCase +original_slug: Web/JavaScript/Referencia/Objectes_globals/String/toUpperCase ---
    {{JSRef}}
    diff --git a/files/ca/web/javascript/reference/global_objects/string/trim/index.html b/files/ca/web/javascript/reference/global_objects/string/trim/index.html index 2dd955ea62..23bf4cdcf4 100644 --- a/files/ca/web/javascript/reference/global_objects/string/trim/index.html +++ b/files/ca/web/javascript/reference/global_objects/string/trim/index.html @@ -1,7 +1,8 @@ --- title: String.prototype.trim() -slug: Web/JavaScript/Referencia/Objectes_globals/String/Trim +slug: Web/JavaScript/Reference/Global_Objects/String/Trim translation_of: Web/JavaScript/Reference/Global_Objects/String/Trim +original_slug: Web/JavaScript/Referencia/Objectes_globals/String/Trim ---
    {{JSRef}}
    diff --git a/files/ca/web/javascript/reference/global_objects/string/trimend/index.html b/files/ca/web/javascript/reference/global_objects/string/trimend/index.html index 41ab89e3ca..ee22825fc4 100644 --- a/files/ca/web/javascript/reference/global_objects/string/trimend/index.html +++ b/files/ca/web/javascript/reference/global_objects/string/trimend/index.html @@ -1,7 +1,8 @@ --- title: String.prototype.trimRight() -slug: Web/JavaScript/Referencia/Objectes_globals/String/TrimRight +slug: Web/JavaScript/Reference/Global_Objects/String/trimEnd translation_of: Web/JavaScript/Reference/Global_Objects/String/trimEnd +original_slug: Web/JavaScript/Referencia/Objectes_globals/String/TrimRight ---
    {{JSRef}} {{non-standard_header}}
    diff --git a/files/ca/web/javascript/reference/global_objects/string/trimstart/index.html b/files/ca/web/javascript/reference/global_objects/string/trimstart/index.html index f16a5b89fa..c465678d96 100644 --- a/files/ca/web/javascript/reference/global_objects/string/trimstart/index.html +++ b/files/ca/web/javascript/reference/global_objects/string/trimstart/index.html @@ -1,7 +1,8 @@ --- title: String.prototype.trimLeft() -slug: Web/JavaScript/Referencia/Objectes_globals/String/TrimLeft +slug: Web/JavaScript/Reference/Global_Objects/String/trimStart translation_of: Web/JavaScript/Reference/Global_Objects/String/trimStart +original_slug: Web/JavaScript/Referencia/Objectes_globals/String/TrimLeft ---
    {{JSRef}} {{non-standard_header}}
    diff --git a/files/ca/web/javascript/reference/global_objects/syntaxerror/index.html b/files/ca/web/javascript/reference/global_objects/syntaxerror/index.html index 2ad16e006f..53db99e0ef 100644 --- a/files/ca/web/javascript/reference/global_objects/syntaxerror/index.html +++ b/files/ca/web/javascript/reference/global_objects/syntaxerror/index.html @@ -1,7 +1,8 @@ --- title: SyntaxError -slug: Web/JavaScript/Referencia/Objectes_globals/SyntaxError +slug: Web/JavaScript/Reference/Global_Objects/SyntaxError translation_of: Web/JavaScript/Reference/Global_Objects/SyntaxError +original_slug: Web/JavaScript/Referencia/Objectes_globals/SyntaxError ---
    {{JSRef}}
    diff --git a/files/ca/web/javascript/reference/global_objects/undefined/index.html b/files/ca/web/javascript/reference/global_objects/undefined/index.html index 3dd30fbefe..e00aa3008d 100644 --- a/files/ca/web/javascript/reference/global_objects/undefined/index.html +++ b/files/ca/web/javascript/reference/global_objects/undefined/index.html @@ -1,7 +1,8 @@ --- title: undefined -slug: Web/JavaScript/Referencia/Objectes_globals/undefined +slug: Web/JavaScript/Reference/Global_Objects/undefined translation_of: Web/JavaScript/Reference/Global_Objects/undefined +original_slug: Web/JavaScript/Referencia/Objectes_globals/undefined ---
    diff --git a/files/ca/web/javascript/reference/index.html b/files/ca/web/javascript/reference/index.html index f524504ab2..5330d2dd8f 100644 --- a/files/ca/web/javascript/reference/index.html +++ b/files/ca/web/javascript/reference/index.html @@ -1,7 +1,8 @@ --- title: Glossari de JavaScript -slug: Web/JavaScript/Referencia +slug: Web/JavaScript/Reference translation_of: Web/JavaScript/Reference +original_slug: Web/JavaScript/Referencia ---
    {{JsSidebar}}
    diff --git a/files/ca/web/javascript/reference/operators/comma_operator/index.html b/files/ca/web/javascript/reference/operators/comma_operator/index.html index f6a62d2bc8..4819aa9186 100644 --- a/files/ca/web/javascript/reference/operators/comma_operator/index.html +++ b/files/ca/web/javascript/reference/operators/comma_operator/index.html @@ -1,7 +1,8 @@ --- title: Operador Coma -slug: Web/JavaScript/Referencia/Operadors/Operador_Coma +slug: Web/JavaScript/Reference/Operators/Comma_Operator translation_of: Web/JavaScript/Reference/Operators/Comma_Operator +original_slug: Web/JavaScript/Referencia/Operadors/Operador_Coma ---
    {{jsSidebar("Operators")}}
    diff --git a/files/ca/web/javascript/reference/operators/conditional_operator/index.html b/files/ca/web/javascript/reference/operators/conditional_operator/index.html index 15265c62b3..0cfbd791a3 100644 --- a/files/ca/web/javascript/reference/operators/conditional_operator/index.html +++ b/files/ca/web/javascript/reference/operators/conditional_operator/index.html @@ -1,7 +1,8 @@ --- title: Operador Condicional (ternari) -slug: Web/JavaScript/Referencia/Operadors/Conditional_Operator +slug: Web/JavaScript/Reference/Operators/Conditional_Operator translation_of: Web/JavaScript/Reference/Operators/Conditional_Operator +original_slug: Web/JavaScript/Referencia/Operadors/Conditional_Operator ---
    {{jsSidebar("Operators")}}
    diff --git a/files/ca/web/javascript/reference/operators/function/index.html b/files/ca/web/javascript/reference/operators/function/index.html index 0908f591b6..ad7b71f5de 100644 --- a/files/ca/web/javascript/reference/operators/function/index.html +++ b/files/ca/web/javascript/reference/operators/function/index.html @@ -1,7 +1,8 @@ --- title: function expression -slug: Web/JavaScript/Referencia/Operadors/function +slug: Web/JavaScript/Reference/Operators/function translation_of: Web/JavaScript/Reference/Operators/function +original_slug: Web/JavaScript/Referencia/Operadors/function ---
    {{jsSidebar("Operators")}}
    diff --git a/files/ca/web/javascript/reference/operators/grouping/index.html b/files/ca/web/javascript/reference/operators/grouping/index.html index 45e8566806..7c2441239b 100644 --- a/files/ca/web/javascript/reference/operators/grouping/index.html +++ b/files/ca/web/javascript/reference/operators/grouping/index.html @@ -1,7 +1,8 @@ --- title: Operador d'agrupament -slug: Web/JavaScript/Referencia/Operadors/Grouping +slug: Web/JavaScript/Reference/Operators/Grouping translation_of: Web/JavaScript/Reference/Operators/Grouping +original_slug: Web/JavaScript/Referencia/Operadors/Grouping ---
    {{jsSidebar("Operators")}}
    diff --git a/files/ca/web/javascript/reference/operators/index.html b/files/ca/web/javascript/reference/operators/index.html index 4a70edc4fb..620607e228 100644 --- a/files/ca/web/javascript/reference/operators/index.html +++ b/files/ca/web/javascript/reference/operators/index.html @@ -1,12 +1,13 @@ --- title: Expressions and operators -slug: Web/JavaScript/Referencia/Operadors +slug: Web/JavaScript/Reference/Operators tags: - JavaScript - NeedsTranslation - Operators - TopicStub translation_of: Web/JavaScript/Reference/Operators +original_slug: Web/JavaScript/Referencia/Operadors ---
    {{jsSidebar("Operators")}}
    diff --git a/files/ca/web/javascript/reference/operators/super/index.html b/files/ca/web/javascript/reference/operators/super/index.html index c19e58cba1..140c07505a 100644 --- a/files/ca/web/javascript/reference/operators/super/index.html +++ b/files/ca/web/javascript/reference/operators/super/index.html @@ -1,7 +1,8 @@ --- title: super -slug: Web/JavaScript/Referencia/Operadors/super +slug: Web/JavaScript/Reference/Operators/super translation_of: Web/JavaScript/Reference/Operators/super +original_slug: Web/JavaScript/Referencia/Operadors/super ---
    {{jsSidebar("Operators")}}
    diff --git a/files/ca/web/javascript/reference/operators/typeof/index.html b/files/ca/web/javascript/reference/operators/typeof/index.html index a7407e79ce..dbdfa6f86a 100644 --- a/files/ca/web/javascript/reference/operators/typeof/index.html +++ b/files/ca/web/javascript/reference/operators/typeof/index.html @@ -1,7 +1,8 @@ --- title: typeof -slug: Web/JavaScript/Referencia/Operadors/typeof +slug: Web/JavaScript/Reference/Operators/typeof translation_of: Web/JavaScript/Reference/Operators/typeof +original_slug: Web/JavaScript/Referencia/Operadors/typeof ---
    {{jsSidebar("Operators")}}
    diff --git a/files/ca/web/javascript/reference/operators/void/index.html b/files/ca/web/javascript/reference/operators/void/index.html index ddf98ebfd9..60b2846665 100644 --- a/files/ca/web/javascript/reference/operators/void/index.html +++ b/files/ca/web/javascript/reference/operators/void/index.html @@ -1,7 +1,8 @@ --- title: L'operador void -slug: Web/JavaScript/Referencia/Operadors/void +slug: Web/JavaScript/Reference/Operators/void translation_of: Web/JavaScript/Reference/Operators/void +original_slug: Web/JavaScript/Referencia/Operadors/void ---
    {{jsSidebar("Operators")}}
    diff --git a/files/ca/web/javascript/reference/operators/yield/index.html b/files/ca/web/javascript/reference/operators/yield/index.html index d01f641767..cdbe9b1c37 100644 --- a/files/ca/web/javascript/reference/operators/yield/index.html +++ b/files/ca/web/javascript/reference/operators/yield/index.html @@ -1,7 +1,8 @@ --- title: yield -slug: Web/JavaScript/Referencia/Operadors/yield +slug: Web/JavaScript/Reference/Operators/yield translation_of: Web/JavaScript/Reference/Operators/yield +original_slug: Web/JavaScript/Referencia/Operadors/yield ---
    {{jsSidebar("Operators")}}
    diff --git a/files/ca/web/javascript/reference/statements/block/index.html b/files/ca/web/javascript/reference/statements/block/index.html index cfa5d7fd20..7e2f0602ec 100644 --- a/files/ca/web/javascript/reference/statements/block/index.html +++ b/files/ca/web/javascript/reference/statements/block/index.html @@ -1,7 +1,8 @@ --- title: block -slug: Web/JavaScript/Referencia/Sentencies/block +slug: Web/JavaScript/Reference/Statements/block translation_of: Web/JavaScript/Reference/Statements/block +original_slug: Web/JavaScript/Referencia/Sentencies/block ---
    {{jsSidebar("Statements")}}
    diff --git a/files/ca/web/javascript/reference/statements/break/index.html b/files/ca/web/javascript/reference/statements/break/index.html index d71eff620d..a4bb253163 100644 --- a/files/ca/web/javascript/reference/statements/break/index.html +++ b/files/ca/web/javascript/reference/statements/break/index.html @@ -1,7 +1,8 @@ --- title: break -slug: Web/JavaScript/Referencia/Sentencies/break +slug: Web/JavaScript/Reference/Statements/break translation_of: Web/JavaScript/Reference/Statements/break +original_slug: Web/JavaScript/Referencia/Sentencies/break ---
    {{jsSidebar("Statements")}}
    diff --git a/files/ca/web/javascript/reference/statements/continue/index.html b/files/ca/web/javascript/reference/statements/continue/index.html index a6928d15b7..fc2d298ac0 100644 --- a/files/ca/web/javascript/reference/statements/continue/index.html +++ b/files/ca/web/javascript/reference/statements/continue/index.html @@ -1,7 +1,8 @@ --- title: continue -slug: Web/JavaScript/Referencia/Sentencies/continue +slug: Web/JavaScript/Reference/Statements/continue translation_of: Web/JavaScript/Reference/Statements/continue +original_slug: Web/JavaScript/Referencia/Sentencies/continue ---
    {{jsSidebar("Statements")}}
    diff --git a/files/ca/web/javascript/reference/statements/debugger/index.html b/files/ca/web/javascript/reference/statements/debugger/index.html index 54d8d02e3d..7ccf2e9ae2 100644 --- a/files/ca/web/javascript/reference/statements/debugger/index.html +++ b/files/ca/web/javascript/reference/statements/debugger/index.html @@ -1,7 +1,8 @@ --- title: debugger -slug: Web/JavaScript/Referencia/Sentencies/debugger +slug: Web/JavaScript/Reference/Statements/debugger translation_of: Web/JavaScript/Reference/Statements/debugger +original_slug: Web/JavaScript/Referencia/Sentencies/debugger ---
    {{jsSidebar("Statements")}}
    diff --git a/files/ca/web/javascript/reference/statements/do...while/index.html b/files/ca/web/javascript/reference/statements/do...while/index.html index 88f221f83d..e5a3a33578 100644 --- a/files/ca/web/javascript/reference/statements/do...while/index.html +++ b/files/ca/web/javascript/reference/statements/do...while/index.html @@ -1,7 +1,8 @@ --- title: do...while -slug: Web/JavaScript/Referencia/Sentencies/do...while +slug: Web/JavaScript/Reference/Statements/do...while translation_of: Web/JavaScript/Reference/Statements/do...while +original_slug: Web/JavaScript/Referencia/Sentencies/do...while ---
    {{jsSidebar("Statements")}}
    diff --git a/files/ca/web/javascript/reference/statements/empty/index.html b/files/ca/web/javascript/reference/statements/empty/index.html index 6800d476f8..3d3e916fe1 100644 --- a/files/ca/web/javascript/reference/statements/empty/index.html +++ b/files/ca/web/javascript/reference/statements/empty/index.html @@ -1,7 +1,8 @@ --- title: Buida -slug: Web/JavaScript/Referencia/Sentencies/Buida +slug: Web/JavaScript/Reference/Statements/Empty translation_of: Web/JavaScript/Reference/Statements/Empty +original_slug: Web/JavaScript/Referencia/Sentencies/Buida ---
    {{jsSidebar("Statements")}}
    diff --git a/files/ca/web/javascript/reference/statements/export/index.html b/files/ca/web/javascript/reference/statements/export/index.html index c1d92ab504..fcf4f6283e 100644 --- a/files/ca/web/javascript/reference/statements/export/index.html +++ b/files/ca/web/javascript/reference/statements/export/index.html @@ -1,7 +1,8 @@ --- title: export -slug: Web/JavaScript/Referencia/Sentencies/export +slug: Web/JavaScript/Reference/Statements/export translation_of: Web/JavaScript/Reference/Statements/export +original_slug: Web/JavaScript/Referencia/Sentencies/export ---
    {{jsSidebar("Statements")}}
    diff --git a/files/ca/web/javascript/reference/statements/for...of/index.html b/files/ca/web/javascript/reference/statements/for...of/index.html index 5cc16f52f8..0df66da1b8 100644 --- a/files/ca/web/javascript/reference/statements/for...of/index.html +++ b/files/ca/web/javascript/reference/statements/for...of/index.html @@ -1,7 +1,8 @@ --- title: for...of -slug: Web/JavaScript/Referencia/Sentencies/for...of +slug: Web/JavaScript/Reference/Statements/for...of translation_of: Web/JavaScript/Reference/Statements/for...of +original_slug: Web/JavaScript/Referencia/Sentencies/for...of ---
    {{jsSidebar("Statements")}}
    diff --git a/files/ca/web/javascript/reference/statements/for/index.html b/files/ca/web/javascript/reference/statements/for/index.html index 00a16b62df..78f72b9850 100644 --- a/files/ca/web/javascript/reference/statements/for/index.html +++ b/files/ca/web/javascript/reference/statements/for/index.html @@ -1,7 +1,8 @@ --- title: for -slug: Web/JavaScript/Referencia/Sentencies/for +slug: Web/JavaScript/Reference/Statements/for translation_of: Web/JavaScript/Reference/Statements/for +original_slug: Web/JavaScript/Referencia/Sentencies/for ---
    {{jsSidebar("Statements")}}
    diff --git a/files/ca/web/javascript/reference/statements/function/index.html b/files/ca/web/javascript/reference/statements/function/index.html index 37deff748f..207c3b0af8 100644 --- a/files/ca/web/javascript/reference/statements/function/index.html +++ b/files/ca/web/javascript/reference/statements/function/index.html @@ -1,7 +1,8 @@ --- title: function -slug: Web/JavaScript/Referencia/Sentencies/function +slug: Web/JavaScript/Reference/Statements/function translation_of: Web/JavaScript/Reference/Statements/function +original_slug: Web/JavaScript/Referencia/Sentencies/function ---
    {{jsSidebar("Statements")}}
    diff --git a/files/ca/web/javascript/reference/statements/if...else/index.html b/files/ca/web/javascript/reference/statements/if...else/index.html index b45e9bea3c..5b7e36ad50 100644 --- a/files/ca/web/javascript/reference/statements/if...else/index.html +++ b/files/ca/web/javascript/reference/statements/if...else/index.html @@ -1,7 +1,8 @@ --- title: if...else -slug: Web/JavaScript/Referencia/Sentencies/if...else +slug: Web/JavaScript/Reference/Statements/if...else translation_of: Web/JavaScript/Reference/Statements/if...else +original_slug: Web/JavaScript/Referencia/Sentencies/if...else ---
    {{jsSidebar("Statements")}}
    diff --git a/files/ca/web/javascript/reference/statements/index.html b/files/ca/web/javascript/reference/statements/index.html index e91e446cbf..d3eeca18da 100644 --- a/files/ca/web/javascript/reference/statements/index.html +++ b/files/ca/web/javascript/reference/statements/index.html @@ -1,6 +1,6 @@ --- title: Statements and declarations -slug: Web/JavaScript/Referencia/Sentencies +slug: Web/JavaScript/Reference/Statements tags: - JavaScript - NeedsTranslation @@ -8,6 +8,7 @@ tags: - TopicStub - statements translation_of: Web/JavaScript/Reference/Statements +original_slug: Web/JavaScript/Referencia/Sentencies ---
    {{jsSidebar("Statements")}}
    diff --git a/files/ca/web/javascript/reference/statements/return/index.html b/files/ca/web/javascript/reference/statements/return/index.html index 5b3c3e902a..dc3b43ed79 100644 --- a/files/ca/web/javascript/reference/statements/return/index.html +++ b/files/ca/web/javascript/reference/statements/return/index.html @@ -1,7 +1,8 @@ --- title: return -slug: Web/JavaScript/Referencia/Sentencies/return +slug: Web/JavaScript/Reference/Statements/return translation_of: Web/JavaScript/Reference/Statements/return +original_slug: Web/JavaScript/Referencia/Sentencies/return ---
    {{jsSidebar("Statements")}}
    diff --git a/files/ca/web/javascript/reference/statements/throw/index.html b/files/ca/web/javascript/reference/statements/throw/index.html index 37d13b964b..55de3592c1 100644 --- a/files/ca/web/javascript/reference/statements/throw/index.html +++ b/files/ca/web/javascript/reference/statements/throw/index.html @@ -1,7 +1,8 @@ --- title: throw -slug: Web/JavaScript/Referencia/Sentencies/throw +slug: Web/JavaScript/Reference/Statements/throw translation_of: Web/JavaScript/Reference/Statements/throw +original_slug: Web/JavaScript/Referencia/Sentencies/throw ---
    {{jsSidebar("Statements")}}
    diff --git a/files/ca/web/javascript/reference/statements/while/index.html b/files/ca/web/javascript/reference/statements/while/index.html index d3997dbefd..072cad4cf7 100644 --- a/files/ca/web/javascript/reference/statements/while/index.html +++ b/files/ca/web/javascript/reference/statements/while/index.html @@ -1,7 +1,8 @@ --- title: while -slug: Web/JavaScript/Referencia/Sentencies/while +slug: Web/JavaScript/Reference/Statements/while translation_of: Web/JavaScript/Reference/Statements/while +original_slug: Web/JavaScript/Referencia/Sentencies/while ---
    {{jsSidebar("Statements")}}
    diff --git a/files/ca/web/opensearch/index.html b/files/ca/web/opensearch/index.html index adfa504760..55500ead3e 100644 --- a/files/ca/web/opensearch/index.html +++ b/files/ca/web/opensearch/index.html @@ -1,11 +1,12 @@ --- title: Addició de motors de cerca a les pàgines web -slug: Addició_de_motors_de_cerca_a_les_pàgines_web +slug: Web/OpenSearch tags: - Complements - Connectors_de_cerca translation_of: Web/OpenSearch translation_of_original: Web/API/Window/sidebar/Adding_search_engines_from_Web_pages +original_slug: Addició_de_motors_de_cerca_a_les_pàgines_web ---

    El Firefox utilitza codi JavaScript per a instaŀlar connectors de motors de cerca. Pot fer servir 3 formats: MozSearch, OpenSearch i Sherlock.

    Quan un codi JavaScript intenta instaŀlar un connector de cerca, el Firefox mostra un avís demanant a l'usuari permís per a instaŀlar-lo. diff --git a/files/ca/web/progressive_web_apps/index.html b/files/ca/web/progressive_web_apps/index.html index 53bd5eb866..2b9254a061 100644 --- a/files/ca/web/progressive_web_apps/index.html +++ b/files/ca/web/progressive_web_apps/index.html @@ -1,8 +1,9 @@ --- title: Disseny sensible (Responsive design) -slug: Web_Development/Mobile/Responsive_design +slug: Web/Progressive_web_apps translation_of: Web/Progressive_web_apps translation_of_original: Web/Guide/Responsive_design +original_slug: Web_Development/Mobile/Responsive_design ---

    Com una resposta als problemes associats a l'enfoc de desenvolupament basat en dos dissenys web separats per a cada plataforma, mòbil i escriptori, una idea relativament nova (de fet no tant) ha crescut en popularitat: oblidar-se de la detecció del user-agent des del servidor, i sustituir-ho per una plana que respongui del costat del client a les possibilitats del navegador. Aquest enfoc del problema s'ha convingut en anomenar-lo disseny web sensible. Igual que l'enfoc dels dissenys separats, el disseny web sensible té els seus avantatges i inconvenients.

    Avantatges

    diff --git a/files/ca/web/progressive_web_apps/responsive/media_types/index.html b/files/ca/web/progressive_web_apps/responsive/media_types/index.html index f3b14fb062..98b04144d1 100644 --- a/files/ca/web/progressive_web_apps/responsive/media_types/index.html +++ b/files/ca/web/progressive_web_apps/responsive/media_types/index.html @@ -1,9 +1,9 @@ --- title: Mitjà -slug: Web/Guide/CSS/Inici_en_CSS/Mitjà +slug: Web/Progressive_web_apps/Responsive/Media_types tags: - CSS - - 'CSS:Getting_Started' + - CSS:Getting_Started - Example - Guide - Intermediate @@ -12,6 +12,7 @@ tags: - NeedsUpdate - Web translation_of: Web/Progressive_web_apps/Responsive/Media_types +original_slug: Web/Guide/CSS/Inici_en_CSS/Mitjà ---

    {{CSSTutorialTOC}} {{previousPage("/en-US/docs/Web/Guide/CSS/Getting_Started/Tables", "Taules")}}

    diff --git a/files/ca/web/svg/tutorial/svg_and_css/index.html b/files/ca/web/svg/tutorial/svg_and_css/index.html index 6dac20b5a6..6d729fdfe1 100644 --- a/files/ca/web/svg/tutorial/svg_and_css/index.html +++ b/files/ca/web/svg/tutorial/svg_and_css/index.html @@ -1,9 +1,9 @@ --- title: SVG i CSS -slug: Web/Guide/CSS/Inici_en_CSS/SVG_i_CSS +slug: Web/SVG/Tutorial/SVG_and_CSS tags: - CSS - - 'CSS:Getting_Started' + - CSS:Getting_Started - Example - Guide - Intermediate @@ -12,6 +12,7 @@ tags: - SVG - Web translation_of: Web/SVG/Tutorial/SVG_and_CSS +original_slug: Web/Guide/CSS/Inici_en_CSS/SVG_i_CSS ---
    {{CSSTutorialTOC}}
    -- cgit v1.2.3-54-g00ecf