String.prototype.toUpperCase()
De toUpperCase()
methode geeft een string terug waarbij de meegegeven string naar hoofdletters is geconverteerd.
Syntax
str.toUpperCase()
Returnwaarde
Een nieuwe string waarbij de meegegeven string naar hoofdletters is geconverteerd.
Beschrijving
De toUpperCase()
methode geeft een string terug waarbij de meegegeven string naar hoofdletters is geconverteerd.. toUpperCase()
past de waarde van de meegegeven string niet aan.
Voorbeelden
Gebruik van toUpperCase()
console.log('alfabet'.toUpperCase()); // 'ALFABET'
Specificaties
Specificatie | Status | Comment |
---|---|---|
ECMAScript 1st Edition (ECMA-262) | Standard | Initiële definitie. Geïmplementeerd in 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 | |
ECMAScript (ECMA-262) The definition of 'String.prototype.toUpperCase' in that specification. |
Living Standard |
Browsercompatibiliteit
We're converting our compatibility data into a machine-readable JSON format.
This compatibility table still uses the old format,
because we haven't yet converted the data it contains.
Find out how you can help! (en-US)
Feature | Chrome | Firefox (Gecko) | Internet Explorer | Opera | Safari |
---|---|---|---|---|---|
Basisondersteuning | (Yes) | (Yes) | (Yes) | (Yes) | (Yes) |
Feature | Android | Chrome for Android | Firefox Mobile (Gecko) | IE Mobile | Opera Mobile | Safari Mobile |
---|---|---|---|---|---|---|
Basisondersteuning | (Yes) | (Yes) | (Yes) | (Yes) | (Yes) | (Yes) |