Use Bracket Notation to Find the Last Character in a String, freeCodeCamp Basic Javascript

Pubblicato il: 11 marzo 2017
sul canale di: We Will Code
2,383
12

In this challenge we continue exploring bracket notation and learn a handy trick to target the last character of a string. Subtracting 1 from the length of a string variable and setting the result inside bracket notations will target that lest character. For example to target the last character of a string var myCode = "code", you can target the "e" character like this myCode[myCode.length - 1]


In questa pagina del sito puoi guardare il video online Use Bracket Notation to Find the Last Character in a String, freeCodeCamp Basic Javascript della durata di ore minuti seconda in buona qualità , che l'utente ha caricato We Will Code 11 marzo 2017, condividi il link con amici e conoscenti, su youtube questo video è già stato visto 2,383 volte e gli è piaciuto 12 spettatori. Buona visione!