Can someone help me with that javascript code?

I'm started studying but I'm not figured out yet how to resolve it. Can someone show me it constructed?

Attachment image

1 Answer

Relevance
  • EddieJ
    Lv 7
    2 months ago

    The last character would be

    var lastChar = word.substr (word.length - 1);

    but I assume you want someone to do the entire assignment for you.

    https://jsfiddle.net/z6h8mfbs/

Still have questions? Get your answers by asking now.