★ wanayoo — archive 1999 https://developer.mozilla.org/ca/docs/Web/JavaScript/Referencia/Objectes_globals/String/toUpperCaseNouvelle recherche | Portail wanayoo

String.prototype.toUpperCase()

by 1 contributor:

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ó Estat Comentaris
ECMAScript 1st Edition (ECMA-262) Standard Definició inicial. Implementat a JavaScript 1.0.
ECMAScript 5.1 (ECMA-262)
The definition of 'String.prototype.toUpperCase' in that specification.
Standard  
ECMAScript 2015 (6th Edition, ECMA-262)
The definition of 'String.prototype.toUpperCase' in that specification.
Standard  

Compatibilitat amb navegadors

Característica Chrome Firefox (Gecko) Internet Explorer Opera Safari
Suport bàsic (Yes) (Yes) (Yes) (Yes) (Yes)
Característica Android Chrome for Android Firefox Mobile (Gecko) IE Mobile Opera Mobile Safari Mobile
Suport bàsic (Yes) (Yes) (Yes) (Yes) (Yes) (Yes)

Vegeu també

Document Tags and Contributors

Contributors to this page: enTropy
Last updated by: enTropy,
Hide Sidebar