• Saturday , 11 July 2020

JavaScript Tutorial For Beginners #25 – Slice and Split Strings

Code Canyon

Yo ninjas, I just want to show you a couple of neat little string methods (functions) in this JavaScript tutorial. The slice method and the split method. The slice method literally ‘slices’ your string into a new segment defined by starting and ending points. The split method, splits a string into multiple ‘pockets’ and puts them into an array (great for splitting tags).

As always, any questions, fire away below :).

SUBSCRIBE TO CHANNEL – https://www.youtube.com/channel/UCW5YeuERMmlnqo4oq8vwUpg?sub_confirmation=1

========== JavaScript for Beginners Playlist ==========

========== CSS for Beginners Playlist ==========

========== HTML for Beginners Playlist ==========

========== The Net Ninja ============

For more front-end development tutorials & to black-belt your coding skills, head over to – https://www.youtube.com/channel/UCW5YeuERMmlnqo4oq8vwUpg or http://thenetninja.co.uk

========== Social Links ==========

Twitter – @TheNetNinja – https://twitter.com/thenetninjauk

Original source

3d Ocean

Related Posts


  1. かわいいreo
    April 12, 2019 at 04:46

    u really like meat so much.
    always meat examples lmao

  2. EthicalGro
    April 12, 2019 at 04:46

    Im eating a cake while watching this video and I can really taste the layer! Okay i'll stop…

  3. joshua chumber
    April 12, 2019 at 04:46

    how would you do this with shapes

  4. Henri Schollier
    April 12, 2019 at 04:46

    sure feeling like having a little prok right now!

  5. Rania Esse
    April 12, 2019 at 04:46

    so helpfull

  6. Allen Zitting
    April 12, 2019 at 04:46

    I love how short and simple these vids are. Thanks

  7. Nelson Ongiti
    April 12, 2019 at 04:46

    HEY NET NINJA, how do i split let alphabet = "abcdefghijklmnopqrstuvwxyz" into a single character with space [let alphabet1= alphabet.split(" ") ; ] is not working

  8. Christian Canlubo
    April 12, 2019 at 04:46

    Cannot read property 'slice' of null

    this is printing on my developers tool

  9. Miljan Ristanovic
    April 12, 2019 at 04:46

    for now, js is almost exactly like php..

  10. GOKUL K
    April 12, 2019 at 04:46

    is the mozilla page link in description missing.

  11. Elizabeth
    April 12, 2019 at 04:46

    the best explanation of arrays

  12. Med Amiin Lechlech
    April 12, 2019 at 04:46

    You save me <3
    tagsarray[0] =meat
    tagsarray[1] =ham
    tagsarray[2] =salami
    …… All love!

  13. Billy Huellas
    April 12, 2019 at 04:46

    This tutorial made me hungry for prok~!
    But, f'reals though, you and the tutorials you make are awesome!
    A very nice balance of thorough, to-the-point lecturing, and light-hearted feels.
    Please keep doing what you do! <3

  14. Zim O.E
    April 12, 2019 at 04:46

    Awesome, thanks for sharing.

  15. Tamás Dénes
    April 12, 2019 at 04:46

    Hi, and what is when i want to slice the string from backwards?

  16. Benny Powers
    April 12, 2019 at 04:46

    How can we strip out the leading spaces from array positions >0?

  17. annie khaliq
    April 12, 2019 at 04:46

    what about negative slice numbers?

Leave A Comment

You must be logged in to post a comment.