¡GoConqr estrena diseño! Cuéntanos qué te parece.

Diagrama de flujo

Strings data type overview

Kostas Diakogiannis Web Developing Junior Certificate Inglés

Contenido del diagrama

  1. JavaScript String Type

  2. Strings Data Type

    Dealing with text. Is a symbol of characters united together to display a unified message that is readable not only from computers but also from users.

    You create a string with 2 possible ways and the difference is on the quotes:

    let sentence = 'This is a string literal' // This is called a string literal

    let anotherSentence = `This is an interpolated string` // string interpolation

    The main difference is that interpolated strings can contain javascript expressions inside (like variables, executable functions and many many more), while in order to achieve the same result with string literals you need to concatenate the expressions to the existing string.

    ex. let name = 'Jake';

    let sayYourName = 'Hello, my name is ' + name;

    let sayYourNameInterpolated = `Hello, my name is ${name}`

    Strings have methods in order to be manipulated and changes. Some of the most used ones are:

    string.length // Returns the exact length of the specified string

    string.split(' ') // Splits an existing string into array elements. You can specify every when is splited

    string[0] // Grab the first character of a string. Or grab in general by index.

    string. replace('someword', 'anotherword') // Replace all instances of the first argument with the second

    You can find out whole String documentation here!

Información

Descripción
Junior Certificate (JavaScript) Web Developing Diagrama sobre Strings data type overview, creado por Kostas Diakogiannis el 12/10/2018.
Visitas
9
Valoración

Escríbenos

¿Sobre qué es tu mensaje?

¿Qué te parece el nuevo diseño?

¿Te gusta?