JavaScript - Need Help With Js Exercises
I have finished studying JS and now testing myself on what I have learned so far by trying these exercises:
http://www.nvcc.edu/home/wpegram/Jav...exercises.html This is my code so far for number 1 through 4: Code: <html> <body> <script language="Javascript"> var name = prompt("What is your name?", "Type your name here"); alert("Welcome "+name) var m_names = new Array("January", "February", "March", "April", "May", "June", "July", "August", "September", "October", "November", "December"); var d = new Date(); var curr_date = d.getDate(); var curr_month = d.getMonth(); var curr_year = d.getFullYear(); document.write(m_names [curr_month] + " " + curr_date + "," + " " + curr_year + "."); document.lastModified; document.write(document.lastModified); </script> </body> </html> Regarding number 4: Code: 4. Display the last modified date of the document. I am having a problem: 1] The output from the above code is: May 31, 2011.05/31/2011 10:13:13 So it's lining up questions numbers 3 and 4 on the same line, how can I get 3 and 4 on separate lines please? Similar TutorialsI'm looking for online Javascript excercises that I can do at home to practise my JavaScript and just basically expand my JavaScript knowledge. I want something that is presented clearly and professionaly, and is also presented in something that resembles an actual excercise that is/would be given to students on a JavaScript course, etc. Something like this is what I am looking for: http://www.nvcc.edu/home/wpegram/Jav...exercises.html Any sites/pages on the net that have stuff like that on them would be a great resource to me, and would help a lot. Thanks in advance. Hello all. I have been taking a JavaScript course on Udemy that while has been a very good course as far as I can tell, it has been short on practical exercises. Lots of examples, lots of showing different concepts and methods, etc, just short on the reinforcing and confidence building exercises. Thus, the point to my post here. I wish there were some kind of web developing club here locally but alas if you don't hunt, fish, drink or chew tobacco you are kind of left out, LOL. Well its not that bad, I make fun of it, but sometimes it seems so. At any rate, I'm looking for some kind of resource or something I can participate in that will help me use what I am learning and help me build some experience, etc. I want to get past the 'noob' stage as quickly as I can and as far as I know the quickest way to do that is to start coding even if its really simple stuff and working to more complicated coding. So, does anyone know of such resources? Thanks in advance for your time and help. |