• Sunday , 31 May 2020

Beginner JavaScript Tutorial – 31 – join and pop

Code Canyon



Facebook – https://www.facebook.com/TheNewBoston-464114846956315/
GitHub – https://github.com/buckyroberts
Google+ – https://plus.google.com/+BuckyRoberts
LinkedIn – https://www.linkedin.com/in/buckyroberts
reddit – https://www.reddit.com/r/thenewboston/
Support – https://www.patreon.com/thenewboston
thenewboston – https://thenewboston.com/
Twitter – https://twitter.com/bucky_roberts

Original source

3d Ocean

Related Posts

48 Comments

  1. Blagoj Karbev
    June 2, 2019 at 06:32

    pop removes the last element….? why simply do not delete the last element from the array?

  2. Rich Williams
    June 2, 2019 at 06:32

    i underststand what pop does now but WHY would i use it? i.e. no point in learning it if cant use it. Maybe next video will explain?

  3. KwangWon Lee
    June 2, 2019 at 06:32

    if you guys want to remove first array, you can use shift() function with same way.

  4. Ashish Kumar
    June 2, 2019 at 06:32

    can any one tell me why the variable name As "name" does not accept in java script.for example if i write a code
    var name= new Array("Ash","Ashish","abhinav","kumar");
    var string = name.join();
    document.write(string);

    this code will not generate desire output but if i will use the variable such as "people" rather than "name" then it will generate output.
    i.e
    var people = new Array("Ash","Ashish","abhinav","kumar");
    var string = people.join();
    document.write(string);

    output:Ash,Ashish,abhinav,kumar

  5. Naruto Rahat
    June 2, 2019 at 06:32

    you like ham but ham is also unhealthy doctor say that

  6. Naruto Rahat
    June 2, 2019 at 06:32

    thank you bucky roberts

  7. AJay Gupta
    June 2, 2019 at 06:32

    Wow great explaination bucky!!!! Does anyone knows how to take input from user in javascript not forms.

  8. Dragos
    June 2, 2019 at 06:32

    Avatar Will Vanilla Fight

  9. David Mozart Andraws
    June 2, 2019 at 06:32

    go ahead and write the name of your shtring

  10. George Emad
    June 2, 2019 at 06:32

    if anyone can help me with this.

    what pop();
    is used for why do i create an array then use pop to remove the last one ???

  11. Shahid Vlogs
    June 2, 2019 at 06:32

    why to convert an array into a string?

  12. Mayank Gupta
    June 2, 2019 at 06:32

    pretty cool huh 😛

  13. xxqqzzaa
    June 2, 2019 at 06:32

    don't talk about undefined.

  14. tehJimmyy
    June 2, 2019 at 06:32

    STRIENG

  15. Dan Varlan
    June 2, 2019 at 06:32

    Pretty much cool 😀

  16. Zolboo Otgonbaatar
    June 2, 2019 at 06:32

    oh because of i forgot " " when giving value to movies.join( – ) , my code couldn't get printed . took so long to realize that .

  17. Lei Sheng
    June 2, 2019 at 06:32

    You can also do the opposite to convert a string to array. Example:
    var string1 = "tuna – ham – bacon";
    var groceryList = string1.split(" – ");

    now groceryList is an Array object with "tuna", "ham", "bacon"
    🙂

  18. Vaibhav Phutane
    June 2, 2019 at 06:32

    is this series of tutorial  enough ?

  19. TripJay21
    June 2, 2019 at 06:32

    When he said P- O – P I had to say "HOLD IT DOWN MOMMA I LOVE YOU"

  20. Rustam Turaev
    June 2, 2019 at 06:32

    why put <br/> in quotation marks?

  21. Ralphunreal
    June 2, 2019 at 06:32

    When you said join method adds commas,i document.write without the join method and it still had commas.

  22. jimv1983
    June 2, 2019 at 06:32

    Just to add to this, the pop() function will return the removed value of the array.
    var arr = new Array("apple", "banana");
    var string1 = arr.pop();

    The variable string1 has the value "banana".

  23. Charles Paroissien
    June 2, 2019 at 06:32

    555 likes o.o illuminati 

  24. فهد العتيبي
    June 2, 2019 at 06:32

    join() method is same as  document.write(movies);

  25. Life of Michael T
    June 2, 2019 at 06:32

    Dude, You Broke 1st rule !!

  26. dolev ben
    June 2, 2019 at 06:32

    hay can you help me???
    i have a problem in the "for" loop
    he does the loop just one time

    <html>
    <head>
    </head>
    <body>
    <script type="text/javascript">

    var num = new Array (1,2,3,4,5,6,7,8,9,10,11,12,13,14,15,16,17,18,19,20);

    for (x=0;x<20;X++)
    {
    var string1 = num.join(" – ");
    document.write (string1);
    num.pop();
    document.write (num[19]);
    }

    </script>
    </body>
    </html>

  27. R-Kedgaming
    June 2, 2019 at 06:32

    ok does this make any diff with concat??

  28. Robert McNair
    June 2, 2019 at 06:32

    I used this code to see what was happening:
    var movies = new Array ("Wolf of Wall Street", "Sin City", "The Godfather", "Apocalypse Now", "Das Experiment");

    var stop = movies.length;//stop used to control when for loop terminates – in this case it is 5 as there are 5 elements in array

    //This loop prints each element of array and then removes the end element – it loops 5 times
    for (count = 0; count < stop; count++)
    {
    var string1 = movies.join(" – ");//adds all elements of array to string and separates with comma by default or you can put separator in brackets
    document.write(string1 + "<br/>");//prints all the elements of the array
    movies.pop();//removes 1 element of array
    }

  29. WhiteArtsMagic
    June 2, 2019 at 06:32

    Do you ever show how to implement all these wonderful lessons into actual real world uses?

  30. Those Epic Scenes
    June 2, 2019 at 06:32

    Why would someone want to use POP method if they don't want the data to be in an Array ?

  31. TooT - the new Google
    June 2, 2019 at 06:32

    Roger Kun::::::::::

    6 Years and you know Java??? AND C++

  32. Roger kun
    June 2, 2019 at 06:32

    Im only 6 and i know html, java,javascript,c++, and all those fucking languages out there including chinese.

  33. Thom de Jong
    June 2, 2019 at 06:32

    It is simple.
    I am 14 and already know html, css and php.
    but if you don't know thath, don't watch this. XD

  34. Rob L
    June 2, 2019 at 06:32

    in case anyone doesn't know… "Being able to understand technology and control it today, is as fundamental as being able to read and write"… ugh F-YOU treehouse!!! Why advertise on a channel that has hundreds of excellent, free programming videos!?

  35. Sajal Shrestha
    June 2, 2019 at 06:32

    this is the computer crap you do not want to watch! or else you're gonna be a mindfucked website designer!

  36. Gideon Paul
    June 2, 2019 at 06:32

    if u made it this far . .. hats off !! u got real ambition dude 🙂

  37. Jason Van Wyke
    June 2, 2019 at 06:32

    this shows how to fuck your self

  38. LordStarBlue
    June 2, 2019 at 06:32

    Thanks for the tutorial !

  39. Boris Jurosevic
    June 2, 2019 at 06:32

    I am 12 years old and what is this

  40. Abry Dela Vega
    June 2, 2019 at 06:32

    Try this: document.write(movies);

    The output will still be the same!

  41. Lily Lincesa
    June 2, 2019 at 06:32

    Could we use the pop command to remove "Justin Bieber" from the music array?

  42. ChrisPTY507
    June 2, 2019 at 06:32

    Begginers should already know what does LIFO means if they want to fully undestand the function of the pop method….

  43. Jay B
    June 2, 2019 at 06:32

    Separated by commas.

  44. Jay B
    June 2, 2019 at 06:32

    The array gets printed out just by typing "document.write(array)" without using join. At least for me it did.

  45. frugihoyi
    June 2, 2019 at 06:32

    What's the 1 for in (2,1)?

  46. frugihoyi
    June 2, 2019 at 06:32

    Can you pass in a number the pop() method to remove an element in the middle? For example, pop(2) to remove Vanilla Sky?

Leave A Comment

You must be logged in to post a comment.