Тёмный

Javascript Tutorial For Beginners - Free JS Course - Web Development Tutorial 

LearnCode.academy
Подписаться 773 тыс.
Просмотров 859 тыс.
50% 1

This Javascript Tutorial is a Free Javascript Web Development Course designed for beginners. If you're wanting to know how to Javascript, in this course, you'll get JS tutorials that cover the basics and programming basics from the very beginning.
We'll cover Javascript variables, if else statements, functions, arrays, event bindings, and more. If you're learning web development and are ready to learn Javascript for beginners, this is the free tutorial for you.
~-~~-~~~-~~-~
Also watch: "Responsive Design Tutorial - Tips for making web sites look great on any device"
• Responsive Design Tuto...
~-~~-~~~-~~-~

Опубликовано:

 

27 сен 2024

Поделиться:

Ссылка:

Скачать:

Готовим ссылку...

Добавить в:

Мой плейлист
Посмотреть позже
Комментарии : 526   
@anonymoushackingfitnessgra1059
2:59 FINALLY! SOMEONE GETS IT. You just motivated me to code. I love you now
@SamuelNthoroane
@SamuelNthoroane 7 лет назад
No Maths!!! LOL
@randyc.3525
@randyc.3525 7 лет назад
you over used lol
@thedrawingdutchman4714
@thedrawingdutchman4714 7 лет назад
lol....... :P
@KandyWabbit
@KandyWabbit 7 лет назад
7:55 for the homework: prompt will save whatever you typed into a string ,you can use parseInt() or parseFloat() commands to turn that into a integer or float which then can be used for calculation, for example z = prompt('enter a number'); //stores your input onto variable z as string z = parseInt(z); //change z into integer, which means the pc will consider it as a number and not just texts z = z++; //z = the number you entered plus 1, proving it can now be used for calculation
@alissangardner
@alissangardner Год назад
Thank you! Also don't like chrome's console for running JS but I understand the need for the tutorial.
@TheLegendaryDFour
@TheLegendaryDFour 9 лет назад
After a few mins or prolly an hour of research I finally got it. var number = +prompt('Enter first Number'); var addition = +prompt('Enter Second Number'); var name = prompt('Enter Name'); var tot = number + addition; alert(name + ' , ' + ' ' + 'the sum of' + ' ' + number + ' and ' + addition + ' ' + 'is' + ' ' + tot) owh the feeling of satisfaction after I got it working lmao.
@TheTechRoy
@TheTechRoy 9 лет назад
TheLegendaryDFour hey so before looking at the comments i was trying to do something like that but the only thing i was missing was the +prompt command, now is there a certain reason you have to add +prompt, i was thinking maybe so it would add both numbers prompted at the end.
@maxandrade1741
@maxandrade1741 9 лет назад
***** Everything you receive from promt is recognized as a String. So, to solve this problem and turn this in a number, you need to put the + before prompt: var number = +prompt('Enter first Number'); Or you can do it too: var number = Number(prompt('Enter first Number')); This way it will be recognized as a number, not a string.
@Daniel-sy3wo
@Daniel-sy3wo 9 лет назад
+Raided ‌ it can, you just have to put them both between brackets like this: var num1 = +prompt("Please enter a number"); var num2 = +prompt("Please enter a second number"); alert("the"+" "+"sum"+" "+"of"+" "+"both"+" "+"numbers"+" "+"is"+" "+(num1+num2))
@criticmc837
@criticmc837 7 лет назад
thanks i was searching for that
@willydilly549
@willydilly549 7 лет назад
Yeah I tried it aswell.. "prompt()" makes a string so his example of homework got me confused because it wasn't possible with the information the video has given to us. Thanks for the help!
@shivGGG
@shivGGG 8 лет назад
""" var num1 = +prompt("Enter the First Number"); var num2 = +prompt("Enter the Second Number"); result = num1 + num2; alert(result); """ Amazing tutorial :) also learning from comments :P
@learncodeacademy
@learncodeacademy 8 лет назад
+Shiv Shankar Thanks man! Great job!
@mlsdd
@mlsdd 8 лет назад
+Shiv Shankar we don't need + before prompt.
@bostonfan24
@bostonfan24 8 лет назад
+Star Cat After playing with this exercise I realize that adding the +prompt actually adds the numbers whereas prompt concatenates them like they are strings. Thank you +Shiv Shanker for that solution!
@anantsutar8484
@anantsutar8484 8 лет назад
Can u explain a bit more why does that happen
@14Ñ-s9b
@14Ñ-s9b 4 года назад
For the first time I feel like I learned programming. Thanks man? Your efforts and knowledge worth more than millions....😍🙌🙌🙌
@tulikagoyal8838
@tulikagoyal8838 6 лет назад
I highly recommend students to watch html, css, bootstrap tutorial. Earlier I hated web designing but after seeing this tutorial series I fell in love with it. Generally I don't give reviews but after seeing this, I couldn't stop myself from writing reviews.
@kingsosarugue2346
@kingsosarugue2346 3 года назад
awesome lesson dude. I just started learning html css and javascript and ive learned so much from your playlists. heres what I did for the assignment: var name = prompt('What is your first name?'); var LastName= prompt('What is your last name?'); var age= prompt('How old are you?'); var school= prompt('What school do you go to?'); alert('Hi '+name+' '+LastName+ ', glad you\'re with us! '+school+ ' is a great school and we are looking forward to hearing more about it!') Keep up the good work!!
@RD-pl7tl
@RD-pl7tl 9 лет назад
I recently started Javascript again, This is just what i needed, i hope you do a intermediate and a expert level. Maybe Amber.js, Backbone.js and Angular.js. Love your other videos. Thank You so much for eveything :)
@rekhadrdr42
@rekhadrdr42 7 лет назад
Nice Tutorial. Crisp and to the point. Thank you. I tried to program your assignment of getting 2 numbers using prompt. The prompt returns Numbers as Strings . So when I add them, it will not give sum, but concatenated output. I googled and found out that We have to Parse the Strings into numbers using the parseInt() or parseFloat() , store them back into number variables, add them inside the alert . I learnt new things .
@willgrabham
@willgrabham 7 лет назад
I have already learnt python and from this tutorial it seems really similar. Thanks for the great tutorial!
@LuckyYouDude
@LuckyYouDude 8 лет назад
Hi Will, can you please do a video explaining how/why html, css and js all are laid out in the text editor, like you have it on your editor. How they interact with each other, how they mingle together and generate a website, rules and do's and don'ts. Or you already have a video like that if so please point it to me. As always, without a doubt, your videos are the best on the tube...! Thank you...!!!
@lonwabosibejele7738
@lonwabosibejele7738 8 лет назад
What have I learnt from this tutorial? Answer: Your name is Will
@samaamohamed7337
@samaamohamed7337 7 лет назад
Hahaha
@MailsonWei
@MailsonWei 6 лет назад
Hahahahha
@bunnay7251
@bunnay7251 6 лет назад
HAHAHAHHAHA
@gurdeep6825
@gurdeep6825 6 лет назад
you will be a verry good programmer....
@yaciine9026
@yaciine9026 6 лет назад
that's because you've been c focusing on the bad part bro
@shadsluiter
@shadsluiter 8 лет назад
Great series. In 6 videos you covered what some people do in 30 videos. I'm using this to teach my high school students some techniques in web development. Thanks for the resource.
@Lyftic
@Lyftic 8 лет назад
I am going to study Javascript at the University, and I really like this tutorial so far. Thank you. (I have completed #2)
@apporvaarya
@apporvaarya 5 лет назад
I have always avoided doing js.. u are the best teacher I ever had experience of getting taught from. :)
@avanipratheep6010
@avanipratheep6010 8 лет назад
var name = prompt("Hello, random citizen! I am Computy! What's your name?"); alert(name + " is a cool name!"); var lastName = prompt("What is your last name?"); alert(name + " " + lastName + ". Nice!"); prompt("How's your day?"); alert("Good, good"); alert("Well, I'll be going now."); alert("Bye!") It was so fun making this! Thanks for the tutorial xD
@a2pha
@a2pha 8 лет назад
You are not mentioning this in the tutorial, but I understood that if you press UP on the arrow key, it retrieves the last commands you typed in the Javascript prompt.
@AdamKaan
@AdamKaan 8 лет назад
I looked at a web developers course on Udemy that's selling for £200 it's sold 1000's the javascript tutorial on there is terrible in comparison. In fact the whole course is rubbish. I don't know why people buy them when you have RU-vid and tutorials like this
@learncodeacademy
@learncodeacademy 8 лет назад
+Adam Kaan I think the fact that it costs makes people feel that it's worth it...when it isn't always.
@MuminovicGoran
@MuminovicGoran 8 лет назад
+LearnCode.academy hahah true that, but also sometimes when people pay for something they take it more seriously, kind of like when i made my own table and finished it with tung oil, instead of buying one, when a drop of water fell on it i immediately wiped it hehe i was protective of it, it's different when u build something and when u buy it, but people just don't value free stuff usually when u give them somethig they say oh it was free anyway, sure but the other person bought it, so thank you, i've seen your vid's on node grunt and others now i'm on this one, then angular...
@JashMota
@JashMota 8 лет назад
+LearnCode.academy bro love you for your tutorials! Thanks a ton
@ink5473
@ink5473 8 лет назад
+Adam Kaan You need an accredited education, that is what corporate is looking for
@ckbapps2009
@ckbapps2009 8 лет назад
+Adam Kaan They don't buy, most of them have FREE coupon code to get those courses :D
@keesanker4241
@keesanker4241 7 лет назад
what do you think of my homework? var whothere = prompt('Knock knock, who is there?'); var who = prompt(whothere+' '+'who?'); alert(whothere+" "+who) Great tutorial by the way!
@marktalamson4697
@marktalamson4697 3 года назад
classic..... a man of culture.....
@livelife5947
@livelife5947 8 лет назад
Thank you, i love your tutorials
@learncodeacademy
@learncodeacademy 8 лет назад
Thanks Tina!
@andrewkoestl
@andrewkoestl 8 лет назад
welcome
@thecloudbacon
@thecloudbacon 8 лет назад
+Joe Strongman YOU DIDNT SAY ANYTHING XD
@andrewkoestl
@andrewkoestl 8 лет назад
Finnley Moore ye i did
@thecloudbacon
@thecloudbacon 8 лет назад
Joe Strongman only one thing
@owenstewart1049
@owenstewart1049 8 лет назад
var x = +prompt('first number to add'); var y = +prompt('second number to add'); result = x + y; alert (result); //if you see this then hi!
@PearHeadFilm
@PearHeadFilm 9 лет назад
This is one of the best tutorials on You Tube. You KISS it.
@ammnalir8218
@ammnalir8218 Год назад
For those doing this course more recently, now u use 'let' instead of 'var' when declaring variables
@alyssabrownridge6179
@alyssabrownridge6179 7 лет назад
I am watching this in 2017 and I feel giddy after making it work!!!!!
@wengeance8962
@wengeance8962 8 лет назад
I made this, will be a fun thing to do for your girlfriend or significant other to show them your new interests. var eye = prompt('what do you use to see?'); var love = prompt('Whats the strongest feeling you can feel for someone'); var yew = prompt('what tree lasts around 400-600 years?'); alert(var1+' '+var2+' '+var3+'.'); eye love yew. Get it? Nice tutorial, FeelsGoodMan .
@saiyomaru
@saiyomaru 8 лет назад
+William Macleod ............
@SuperCoolGuy855
@SuperCoolGuy855 7 лет назад
Did you even test it because I can bet it won't give you the output you expect to see. I understand what are you trying to do but here is the correct one: var question1 = prompt("What do you use to see?"); var question2 = prompt("What's the strongest feeling you can fell for someone?"); var question3 = prompt("What tree last around 400 to 600 years?"); alert(question1+" "+question2+" "+question3); Then it will print out: eye love yew (if they enter correct answer). PS: I'm a year late but that's alright.
@lumosss
@lumosss 6 лет назад
Your variable names are 'eye', 'love' and 'yew', so instead of *alert(var1 + ' ' + var2 + ' ' + var3 + '.')*, you would need to have it as *alert(eye + ' ' + love + ' ' + yew + '.')* or change the variable names to var1, var2 and var3, respectively. Correct me if I'm wrong :)
@RizzoDaManiac
@RizzoDaManiac 6 лет назад
Wow, talk about cringe....
@devidodge
@devidodge 6 лет назад
lol I was thinking the same
@yaciine9026
@yaciine9026 6 лет назад
I'm actually with HTM&CSS and i think that this video is great i can't wait to complete them and start with JavaScript 😃😃
@michaelkricheldorf5931
@michaelkricheldorf5931 8 лет назад
Thank You sooooo much, I am starting to get this and I've never thought of coding JS as easy, I've tried 2 times before and I never understood it.
@FoxXTheDark
@FoxXTheDark 6 лет назад
Hi, great video. The single issue I've found is that you told us to do a sum of some numbers as a homework yet you did not taught us the Number() function in this tutorial and I'm sure you know that the prompt() function returns only a string.
@younustarget1528
@younustarget1528 4 года назад
I hope that is actually your name soooo... really bro thanks a lot! I already knew these stuff like html and css and a lil bit of JS But after watching these vids of yours you made every thing understand properly Im really glad that I watched these tutorials)) well I recommend these tutorials to beginners who already know these stuff and who is null at all Will id love to watch you making full internet shop using all of DB and codes it requires THANSK DUDE!!
@brandonwinston6590
@brandonwinston6590 8 лет назад
hands down the best tuto in the world thanks bro i just wrote my first program outstanding new sub right here
@learncodeacademy
@learncodeacademy 8 лет назад
+brandon winston Awesome to hear. thanks for the comment, Brandon!
@guyrandom5740
@guyrandom5740 8 лет назад
Homemade Quadratic Equation solver based on what I've learned from this vid. :D var a = prompt('Enter the A value'); var b = prompt('Enter the B value'); var c = prompt('Enter the C value'); var bsquared = b * b; var fourac = 4 * a * c; var bsquaredminusfourac = bsquared - fourac; var sqrt = Math.sqrt(bsquaredminusfourac); var minussqrt = 0 - sqrt; var minussqrtminusb = minussqrt - b; var plussqrtminusb = sqrt - b; var twoa = 2 * a; var xone = plussqrtminusb / twoa; var xtwo = minussqrtminusb / twoa; alert('Solutions: ' +xone+' and '+xtwo);
@rbaleksandar
@rbaleksandar 8 лет назад
Actually considering that JS is used more and more as a general purpose programming language it might be worth for those who watch this to consider doing stuff outside web development. This at least is my main motivation in learning JS since web development isn't my thing but I have plenty of other areas where it can be used.
@shadow-nv9vv
@shadow-nv9vv 7 лет назад
this is the best tutorial for javascript that i have found.
@sayantan033
@sayantan033 9 лет назад
Thanks for the tutorial. But i would like to share about the suggested homework of number addition just try to convert the var type to int because with prompt function javascript is actually accepting it as a string so instead of add the numbers it will concatenate them. In order to change the type of variable just do something like this : var firstNum = +prompt ('Give me a number');
@learncodeacademy
@learncodeacademy 9 лет назад
I should have mentioned that you have to convert it...I thought about re-recording the video when I realized that I didn't mention that, but then realized it would be good for people to have to google about it. (heehee devilish laugh)
@sayantan033
@sayantan033 9 лет назад
Yea people should google..its a better idea to try to learn yourself rather than being spoonfed..hope i didnt ruin the fun
@learncodeacademy
@learncodeacademy 9 лет назад
nah, I half feel bad about it...but only half haha.
@CHKotol
@CHKotol 4 года назад
Wow, I’m 14 and this is my second day studying JavaScript and all the comments are way above my IQ level🤯
@cyb3rpunk190
@cyb3rpunk190 4 года назад
this is the best tutorial for beginers to understand the basics congrats. im sharing this to my students :v
@ScorpionCA
@ScorpionCA 7 лет назад
in 2017 you can use f12 to bring it up and select console to do the same thing
@DR-vx1xq
@DR-vx1xq 9 лет назад
Well, trying to learn html, but know lotta c++, heard javascript is actually very useful, so this way, i will learn more programming languages :) Thanks for awesome help doing that!
@crownedbowYT
@crownedbowYT 9 лет назад
No, this is 'JavaScript' not 'java'
@DR-vx1xq
@DR-vx1xq 9 лет назад
Yeah i know, i wrote the wrong thing my bad :) Edited
@michaelfiorella6583
@michaelfiorella6583 8 лет назад
Finally somebody that can teach! Thanks!!!
@Co-Monad
@Co-Monad 9 лет назад
Would love to see some modular OOP JS tutorials. Heck, do vids for each then combine them. :)
@learncodeacademy
@learncodeacademy 9 лет назад
Robby Rosario Yes, I was just thinking about that this morning, actually. It's definitely on my mind, just haven't made it happen yet...I'm thinking very soon, though.
@danielnelson5959
@danielnelson5959 9 лет назад
This video gives great examples of variables and strings!
@kauecastro9643
@kauecastro9643 8 лет назад
Why is the type of the variable on this code is a string? : var age= prompt('How old are you?'); var age1= prompt('How old is your dad?'); alert(age + age1) Because, there is quotes on the questions through the prompt?
@krisk3035
@krisk3035 6 лет назад
var numb1 = +prompt('enter the first number'); var numb2 = +prompt('enter the 2nd number'); alert('the sum of '+numb1+ ' & '+numb2 +' = ' + (numb1+numb2));
@cr7neymar908
@cr7neymar908 7 лет назад
var name = prompt('Hello, whats your name?'); var lastname = prompt(name+ " what?"); alert('Hello '+ name + lastname)
@christianpecson180
@christianpecson180 8 лет назад
This is so cool and pretty straight forward.
@sunilsandhu6717
@sunilsandhu6717 7 лет назад
Fantastic collection of videos here
@Jason10111
@Jason10111 7 лет назад
var pay = prompt('How much do you make a month?'); var total = (pay * 12); prompt('You make '+total+' a year!');
@mastertyystudios5572
@mastertyystudios5572 8 лет назад
taught me so much! I love your videos!
@dfjama
@dfjama 6 лет назад
Unique way of teaching, thanks for the job well done
@krisk3035
@krisk3035 6 лет назад
var numb1 = +prompt("enter a number"); var numb2 = +prompt("enter a second number); alert(numb1+numb2);
@nejedly12
@nejedly12 8 лет назад
Your are Top Dog ... absolutely best tutorial. Helped me a lot!
@learncodeacademy
@learncodeacademy 8 лет назад
+Marek Nejedlý Thanks Marek! Thanks for the comment, too.
@abdulalimhason2095
@abdulalimhason2095 9 лет назад
thanks alot!!!! i been looking for a video like this.
@MikeSCaley
@MikeSCaley 9 лет назад
Extremely useful video, thank you! Really want to learn javascript so badly
@learncodeacademy
@learncodeacademy 9 лет назад
Michael Caley Thanks! Yeah, it's a tremendous language...you'll be very glad you learned it.
@lewisstrongofficial
@lewisstrongofficial 3 года назад
If anyone needs this I'm posting it here. If you are doing what I did after the video and you are making an alert based program that prompts for two numbers and then it adds them together, use parseInt in your code. Example: var numOne = prompt('first?'); var numTwo = prompt('second?'); alert(numOne+numTwo); This will just put the two variables together like strings (3+4 will alert 34). Instead, change the last line to this: alert(parseInt(numOne)+parseInt(numTwo)); This will add your two values and give you the proper sum instead of a string.
@jondisla
@jondisla 6 лет назад
YESSSS! You saved my life hahaha!!! Amazing series my biggest thanks.
@editzart3304
@editzart3304 3 года назад
Your videos are amazing and very helpful.. Love and respect sir❤🙏🏻
@brentvsmaximvsone
@brentvsmaximvsone 8 лет назад
these tutorials are very easy to follow
@LogicDecoded
@LogicDecoded 8 лет назад
This guys funny! 😂 Thanks for all the explainer videos they're great! 😊👍🏻
@mayhill300
@mayhill300 9 лет назад
JavaScript ROCKS THX !
@SquatSimp
@SquatSimp 7 лет назад
Thank you man! How would you use var name=' ' to reference a div used in HTML?
@shadowaitherios6172
@shadowaitherios6172 8 лет назад
var num1 = +prompt("Enter first number"); var num2 = +prompt("Enter second number"); var ans = num1 + num2; alert("the sum of " + num1 + " and " + num2 + " is " + ans); thank-you comment section.
@cyplex8358
@cyplex8358 7 лет назад
I Love All The Series On This Channel Heres My First Javascript Program: var name = prompt("What Is Your Name?") var lastname = prompt("What Is Your Last Name?") var age = prompt("How Old Are You?") alert("Hello " + name + lastname + "! You Are " + age + "Years Old!" )
@themelon3944
@themelon3944 8 лет назад
var name = prompt('What is your first name?'); var lastName = prompt('What is your last name?'); var age = prompt('How old are you?'); var color = prompt('What is your favorit color?'); alert('Hi'+' '+name+' '+lastName+'. '+'You are'+' '+age+' '+'years old and like'+' '+color+'.');
@thiantromp6607
@thiantromp6607 8 лет назад
Yay
@rodgetech
@rodgetech 9 лет назад
Your, my good man, are amazing. Thank you.
@learncodeacademy
@learncodeacademy 9 лет назад
Thanks Luis!
@barryslatcher108
@barryslatcher108 6 лет назад
Great tutorial. Is there an autocomplete plug-in for JavaScript? I have not found one for eclipse and I wanted to know if anyone else has had any luck with another ide. Thanks
@jet_a110
@jet_a110 8 лет назад
i can not seem to ba able to code on the sublime and have it work on my web page when split like you do. plus great vids im 50 something and learning to code thanks to you Will
@GAMA-ck5tl
@GAMA-ck5tl 9 лет назад
Very good video, this really got me in to javascript! I'm doing a js program and I relly like that font in that "Let's learn javascript" text, what is the name? :)
@walkingtraveller3259
@walkingtraveller3259 8 лет назад
Great tutorials really practical tutorial for beginners. thank you so much.
@dataglasses
@dataglasses 7 лет назад
somehow I have lost the alert pop up window on my computer? how do i get that to work again I wonder? Otherwise I was having some fun getting started thanks
@joshiprabhas
@joshiprabhas 7 лет назад
why doesnt the alert window shows the close minimize and maximize window controls on ur mac?
@wahidulislam7528
@wahidulislam7528 9 лет назад
your the best awesome !! bring a wordpress tutorial
@Kamillascookie
@Kamillascookie 5 лет назад
Quick question regarding the variables, if I write x=1 (and not "var x=1"), and then the same with a different variable, let say y=2, then I get the same result when writing x+y as I would have when first defining x and y as variables with the "var"-command. I understand that "var" is needed when you introduce text, but is it really necessary when working with numbers?
@danielwijaya8841
@danielwijaya8841 6 лет назад
Hi, I am wondering what is the difference between declaring the variable with "var" in the beginning and without. Thank you and I am looking forward to your reply!
@HouseRentalcorp
@HouseRentalcorp 8 лет назад
I don't have these tabs on my chrome browser. No file no edit no view. I tried everything to find out why .. I have windows 10 and it seems I can't get a straight answer on the web about it. Any suggestions?
@Wallabylover116
@Wallabylover116 8 лет назад
He's using a Mac. Just press ctrl+shift+j and the console will appear
@marijn9861
@marijn9861 8 лет назад
press F12
@marijn9861
@marijn9861 8 лет назад
then the 3 dots to replace it to the bottom if it is not there already
@flatbill2
@flatbill2 8 лет назад
I love you. Seriously good answers!!!
@yanxiangli4253
@yanxiangli4253 5 лет назад
thank you very much for creating these awesome tutorials.
@alonelharar2720
@alonelharar2720 7 лет назад
thank you for helping us out with this great tutorials
@kelle_li
@kelle_li 8 лет назад
Hi guys, I tried Will's 'homework' at the end of the video, this is what I came up with: var y = prompt('Pick a small number'); var z = prompt('Pick another small number'); var x = y*z; alert(x); This works perfectly but when I change the multiplication * to an addition +, it won't add the 2 numbers together as an addition, it will literally put the two numbers together. Like in Will's example; "30" - "3010". How can I correct this?
@acehabes5154
@acehabes5154 4 года назад
Hi, i know it's been 3 years since this post but maybe someone see it and get the idea. so you will need to add something called : parseFloat before the prompt like so : var y =parseFloat(prompt('Pick a small number')); var z = parseFloat(prompt('Pick another small number')); var x = y*z; alert(x); and that will do it. make sure you also include the ( ) btw the parseFloat.
@SagarRana
@SagarRana 8 лет назад
why there is ' after name+ and before Last name? and why is there 2 "+" signs? on what cases variables are written with or without "="? and lastly when i put "alert('text')" it gives me "Uncaught TypeError: alert is not a function(…)" error.
@slala55
@slala55 7 лет назад
thank you it's very simple and easy to understand
@hamood932
@hamood932 8 лет назад
how do I get the program to do the math for me? I did: var number = prompt('What is your favorite number?'); alert(number+x) and it didn't add them. I think its recognizing it as a string type but I don't know how to change since I have to ask the question 'What is your favorite number'.
@markmanalo3420
@markmanalo3420 8 лет назад
great tutorial! you got my subscribe! btw, what is the name of your text editor? thank you so much :)
@umrkhayam
@umrkhayam 6 лет назад
awesome!awesome awesome !!!!! this is so lit! thanks a bunch
@scootover7
@scootover7 7 лет назад
I'm going to try and learn this to try and create my own online games
@suyashsrivastava371
@suyashsrivastava371 8 лет назад
Pleasse help alert('This is a calc');var firstno=prompt('Enter the first no.');var secondno=prompt('Enter the second no');alert("Sum of the no.s is " + (firstno +secondno)) i wrote this code but when i wrote 5 for the first no and 2for the second it gave out 52 But i intede to find the sum
@StlyDutch
@StlyDutch 7 лет назад
What I had was: var x = prompt("Give me a number"); var y = prompt("Give me another number"); var z = x + y; alert("The sum of these numbers is "+z); I learned from the comments that I needed a + before prompt, like: var x = +prompt("Give me a number"); var y = +prompt("Give me another number"); var z = x + y; alert("The sum of these numbers is "+z); Can someone explain to me why in this case the + is needed? Why didnt we need it when we tried the var name? var name = prompt("What is your name?"); alert("Hi "+name);
@steelzii
@steelzii 8 лет назад
Thanks dude!!! Much appreciated!
@123vidd
@123vidd 8 лет назад
Bro thanks so much for this your awesome!!!
@garrett3338
@garrett3338 9 лет назад
Great resource!
@Yiosho
@Yiosho 8 лет назад
Great tutorial, simple and concize.
@larsyandreassen7313
@larsyandreassen7313 9 лет назад
my home work is done :P var number = +prompt('what is 5x5?'); var Number2 = +prompt('what is 7x3?'); var answear = number+Number2; var name = prompt('what is the name of this test?'); alert(name+' '+answear);
@markaustin397
@markaustin397 8 лет назад
How do you get the whole "coding window" on Windows? There isn't the whole "File, Edit, View..." toolbar, so I don't know where to go.
@mlsdd
@mlsdd 8 лет назад
+Mark Austin open Google Chromo. On the right top there is 3 lines. Hover it and you have More tools, then choose Developer tools.
@markaustin397
@markaustin397 8 лет назад
Thank you!
@joonyou9392
@joonyou9392 8 лет назад
i have a problem when i do var x = prompt() and type in the prompt 1 or any number it counts it as a string not a number so i can't make a simple calculator how to fix this ?
@ismaelhayden2916
@ismaelhayden2916 8 лет назад
I yeah I wanted to try that one as well, it's actually not that easy at such a basic level, see: codereview.stackexchange.com/questions/40615/simple-java-calculator I couldn't understand how it's done, I'm hoping he'll refer back to it in the next lesson, if not I'll hopefully know more by the end, this is my first day at this!
@joonyou9392
@joonyou9392 8 лет назад
Ismael Hayden he actully refferd back to it in his other episods i think it was the epesode just before the finale one
@ismaelhayden2916
@ismaelhayden2916 8 лет назад
Cool, I'm not there yet :) did he explain it?
@joonyou9392
@joonyou9392 8 лет назад
yes
@kelvinmarcellino895
@kelvinmarcellino895 8 лет назад
Mmm I don't kinda understand what are you saying... but maybe you can try this ? var x = prompt("What is your first number?"); var y = prompt("What is your 2nd Number"); alert(x*y) something like this ? o.o
@brokiama
@brokiama 7 лет назад
var x= +prompt("Bir sayı yazın"); var y= +prompt("Bir sayı daha yazın"); alert(x+y); I did the program but i couldnt undertand why i have to put a + sign before prompt command. Can someone explain it please?
@thomashuyghebaert5622
@thomashuyghebaert5622 6 лет назад
I made this tiny script, something is wrong but i don't unerstand how to do it. Open the console and try it yourself to see what i mean. . . . . var num1 = prompt("Give me a number."); var num2 = prompt("Give me another number."); alert("The sum of your two numbers is " + num1 + num2 + " if my calculation is right!")
@Optimishka
@Optimishka 8 лет назад
Would it be possible to do the same with the prompt() option for numbers? To read what was insert and it would give back the alert() information of numbers that we did mathematic operations with? For instance var nr1 = prompt ("Insert first number"); var nr2 = prompt ("Insert second number"); alert ("Value of numbers is" nr1+nr2); It just makes 23 when I insert 2 and 3 in each box. Thanks for your answer.
@Optimishka
@Optimishka 8 лет назад
+m0sley thanks - that's exactly what I was going for :)
@georgemanize
@georgemanize 8 лет назад
For some reason if I write the same commands on a txt and then save it as .js and open it with my browser it just shows the commands like text.Isn't it supposed to work this way too?
@poruks7745
@poruks7745 7 лет назад
Could someone tell me how to present a calculation in an alert if the var's are equal to the prompt value.i cant get them to be treated as numbers it just mashes them into one number.
@NASH62884
@NASH62884 9 лет назад
I really cant understand why the console says " Uncaught SyntaxError: Unexpected identifier" when I type down this: var first_no=prompt('Welcome to my Additon calculater! What is your first number?'); var second_no=prompt('What is your second number?');alert(first_no+second_no); I did everything correctly :'(
@osherezra131
@osherezra131 7 лет назад
Hey man great videos thanks a lot keep it up : ) just one question , lets say iv mastered a specific language how do you actually take it and turn it into an app( specifically mobile), where do you build it? do you code first then design or reverse? thanks in advance
Далее
JavaScript Tutorial for Beginners [JS Crash Course 2024]
1:37:14
How to MASTER Javascript FAST in 2023
12:49
Просмотров 363 тыс.
100+ Web Development Things you Should Know
13:18
Просмотров 1,5 млн
JavaScript Pro Tips - Code This, NOT That
12:37
Просмотров 2,5 млн
JavaScript Functions Crash Course
1:36:54
Просмотров 176 тыс.
I built 10 web apps... with 10 different languages
14:23
JavaScript Basics in 10 Minutes
11:49
Просмотров 219 тыс.
Learn Sass In 20 Minutes | Sass Crash Course
19:42
Просмотров 935 тыс.
All The JavaScript You Need To Know For React
28:00
Просмотров 619 тыс.