Basics of variables and constants in javascript

แชร์
ฝัง
  • เผยแพร่เมื่อ 15 ต.ค. 2024
  • Welcome to a youtube channel dedicated to programming and coding related tutorials. We talk about tech, write code, discuss about cloud and devops. That’s what we do all day, all year. We roll out a lot of series and videos on our channel.
    All the learning resources such as code files, documentations, articles and community discussions are available on our website:
    chaicode.com/
    You can find our discord link, github link etc on the above website.
    Twitter/X link: x.com/hiteshdo...
    Discord link: hitesh.ai/discord
    Learn React with 10 projects: • Let's learn react from...
    Learn Docker: • A practical guide on D...
    Learn Kubernetes: • Complete Kubernetes Co...
    How does a browser works: • How does a browser wor...
    How nodejs works: • How node JS works | En...
    Learn Redux-toolkit: • Learn Redux Toolkit in...
    Learn NextJS: • Nextjs Full stack course
    Learn Typescript: • Why to learn Typescript
    Learn Javascript: • Welcome to new JavaScr...
    Learn React Native: • React Native Mastery: ...
    Learn Zustand: • React state management...
    Learn Golang: • How to get started wit...

ความคิดเห็น • 122

  • @HiteshCodeLab
    @HiteshCodeLab  6 ปีที่แล้ว +9

    Videos in a proper sequence and with discussion support are available at my website (of course free). It's easier for me to address issues at one place, instead of drilling into every video. A quick word, please help others in the discussion too.
    courses.learncodeonline.in/learn/Javascript-for-2018-developer

    • @boogiestreet594
      @boogiestreet594 6 ปีที่แล้ว

      Hi Hitesh, I'm loving your channel, I've decided to start with JavaScript and when i need a break, Java itself, so i'll learn both at the same time kind of.
      I have a simple question I'd love an answer too, with Javascript or Java, is it possible for me to make just a tiny little desktop program that you can click, that when clicked it can automatically open say, Google Chrome search window for you? I want to do this as nmy firsat program, simple little program, click it, in the little box it says "Connect", i click it, and the program goes and open google chrome for me as i have it set like that in the code. I just want to know if it's possible? Thanks!

    • @gurjeetsingh-qp4wp
      @gurjeetsingh-qp4wp 5 ปีที่แล้ว

      let ram having money = 100
      let money given to ram by sita = 25
      let money given to ram by gita = 29
      let total money ram have = ram having money + money given to ram by sita + money given to ram by gita
      I have tried this code for practice, but it's not working. Can you please tell me why it isn't working ?

    • @gurjeetsingh-qp4wp
      @gurjeetsingh-qp4wp 5 ปีที่แล้ว

      ohkk. sorry. I got that. camel case worked for me. Thanks alot hitesh sir.

    • @mohammedshoaib9722
      @mohammedshoaib9722 4 ปีที่แล้ว

      Sir can you please tell me how can i use cmd on windows I tried but couldn't

  • @gwalaniarun
    @gwalaniarun 6 ปีที่แล้ว +8

    Thanks for RAIN OF JAVASCRIPT
    So much video in one day..

  • @salwacoding5661
    @salwacoding5661 4 ปีที่แล้ว +1

    Your voice tone is just so encouraging ,Thank You Sir.

  • @faizKhan-wn5fr
    @faizKhan-wn5fr 6 ปีที่แล้ว +10

    Hey guys hitesh back again with another episode of JavaScript we gonna break the record uploading videos in a day 😁

  • @bhanurulz
    @bhanurulz 6 ปีที่แล้ว

    One question related to " const". When we load a page that time const are assigned, generally data will be coming from back-end. So on page load whatever value is set in const will be there till the time till that session time only, if we change anything in back-end, the same will be apply on next page load? So do i assume that const will just hold its initial value only for that particular page load session?

  • @abhinavgupta4816
    @abhinavgupta4816 6 ปีที่แล้ว

    Hi, I am using windows 7 and in my cmd prompt , " node variables.js" is running but not showing the output, could you please help me out with any suggestions.........

  • @shubhamchannagire1370
    @shubhamchannagire1370 6 ปีที่แล้ว +2

    Love the way u explain...m beginner and its just perfect for me. Thanks

  • @kamranjaved5583
    @kamranjaved5583 5 ปีที่แล้ว

    Simply One Word "OUTSTANDING" your videos are GREAT and the way you teach is amazing ....SIR THANKS VERY VERY MUCH

  • @catherinegalvin1640
    @catherinegalvin1640 4 ปีที่แล้ว

    I have seen var used to represent a variable in JavaScript. Is there a specific rule of when to use let to represent a variable as opposed to var? Is one method better than the other?

  • @marnix_antil
    @marnix_antil 6 ปีที่แล้ว

    Awesome tutorials sir you are doing so much for the people who don't even have enough money to buy tutorials on your website .This series also helps those who want to demo of your tutorials thank you so much

  • @maths_kamlesh1787
    @maths_kamlesh1787 6 ปีที่แล้ว

    Hi Hitesh
    I can also use the variable without let as a keyword. Is it necessary to use let?

  • @oengkimchhay
    @oengkimchhay 4 ปีที่แล้ว

    what's differences between "var" and "let" when we declare a variable brother?

  • @SoyEdrey_
    @SoyEdrey_ 2 ปีที่แล้ว

    why dont you use Var instead of let. i ask because im learning based on Var. im just asking :)

  • @vijayrawat09
    @vijayrawat09 5 ปีที่แล้ว +1

    I know JS is smart language and a semicolon is optional in it but I think in my opinion using a semicolon is good practice until you are not using PUG instead of HTML, SASS instead of SCSS and JS, PYTHON, KOTLIN instead of JAVA, C,C++ or anything else ,where semicolon is mandatory. :)

  • @S4LTYT
    @S4LTYT 5 ปีที่แล้ว

    why dont u use var name=‘john’; please explain .

  • @yevs99
    @yevs99 4 ปีที่แล้ว

    "Have patience, without patience u can never be a good programmer." u nicely said sir,
    Watching this JS series to start the MERN Bootcamp which i bought today. #MERN@199.
    #ThanksForAllYourAmazingVideos

  • @curious.ankit.kumar.
    @curious.ankit.kumar. 6 ปีที่แล้ว

    Sir I have encountered a interesting doubt
    const string='java'
    const STRING='script';
    const String=' is Easy..!!'
    console.log(string+STRING+String);
    i got the output: javascript is Easy..!!
    without any error but the VS Code editor show the three variable names String,STRING and string with three different colour...ideally all the variable names should have same colour
    Sir please show some light on the situation what is happening ?

  • @oengkimchhay
    @oengkimchhay 4 ปีที่แล้ว

    Do we use the( let) keyword to declare variable?

  • @vishalb9599
    @vishalb9599 6 ปีที่แล้ว

    can't we run those codes in that GUI environment/ide bcoz I don't like to use the command prompt or terminal

  • @mayurgupta4004
    @mayurgupta4004 4 ปีที่แล้ว

    Why are we using let to declare variable where we use var to declare in javascript

  • @shahidullahmiazi
    @shahidullahmiazi 6 ปีที่แล้ว

    Without let or var keyword my all variable smoothly work! So, why I use both? May I use these only using const keyword?

  • @meow22074
    @meow22074 5 ปีที่แล้ว

    Can i use the terminal in vs code to produce the output?

  • @johng5295
    @johng5295 5 ปีที่แล้ว +1

    Thanks in a million! Great teachers are hard to find.

  • @mohitvaishnav7283
    @mohitvaishnav7283 6 ปีที่แล้ว +1

    Dear Sir,
    you should make these programming tutorials on many languages they are very helpful and I am starting to like this already.

    • @HiteshCodeLab
      @HiteshCodeLab  6 ปีที่แล้ว

      More are available on my website.

  • @govindrathi5632
    @govindrathi5632 6 ปีที่แล้ว

    """""
    let r = 33
    let bonus = 20
    let total = r + bonus
    console.log(total);
    /*
    Exception: SyntaxError: redeclaration of let name
    @Scratchpad/1:1:1
    */
    """""
    now what is this sir?

  • @pile333
    @pile333 6 ปีที่แล้ว

    Dude, you're an incredibly good teacher.

  • @zafarhussain8273
    @zafarhussain8273 4 ปีที่แล้ว

    how to use javascript with html for example created a button using html and want to work this button then how it posible

  • @YogeshKumar-bp5dr
    @YogeshKumar-bp5dr 6 ปีที่แล้ว

    Thanks sir. I have been following you from a long time. Your videos helped me a lot. I want to go into web development. I have learned html and css. Now i want to learn JavaScript. You are using node.js here. I am little a bit confused how i can use this in web development? Please help me out in getting started.

  • @muhammadzafar2470
    @muhammadzafar2470 4 ปีที่แล้ว

    Sir which theme are u using in Vs?

  • @vigneshwaran.palani
    @vigneshwaran.palani 6 ปีที่แล้ว

    let or var ? both of them are different? or same ?

  • @padmajapatil8996
    @padmajapatil8996 6 ปีที่แล้ว

    Sir we r using var insted of let than whats differnce in that?

  • @akshitagarg5914
    @akshitagarg5914 5 ปีที่แล้ว

    What is difference in using let and var in JS... can't find it

  • @gtxfalcon003
    @gtxfalcon003 2 ปีที่แล้ว

    hello sir, while using let name = "John" and console.log(name), the error of name is @depreciated is coming, even after using var. how do i solve this error? pls help sir and other fellow users...

    • @santoshmore2953
      @santoshmore2953 2 ปีที่แล้ว

      let name= "john";
      console.log(name);

  • @dhruvdesai391
    @dhruvdesai391 6 ปีที่แล้ว

    hey, I am a IT student and i have learn java Script basics before, we were writing it in and running in browser .
    But what you did is completely different and we have't declared variables like that.and we never used node i am not getting why it is different.

    • @HiteshCodeLab
      @HiteshCodeLab  6 ปีที่แล้ว

      I think you should start from 1st video.

  • @hemantkumar-zh1bo
    @hemantkumar-zh1bo 6 ปีที่แล้ว

    Hi Hitesh, can u please explain difference between var and let keywords

  • @justankit_shrivastava
    @justankit_shrivastava 6 ปีที่แล้ว

    Tha way people run NGOs for social services for the helpless people
    In the same way you run the TH-cam channel,we help people
    Really really love u sir 😊👌👌👌👌👌👌

  • @aryangrover7216
    @aryangrover7216 5 ปีที่แล้ว

    I am writing the code in Visual Study. Can anyone please help me that is how to run the code. I have typed but is not able to run it. Please help me

  • @voiceonkarma021
    @voiceonkarma021 6 ปีที่แล้ว

    please tell how to download the sublime text that u are using............provide link for every things.................

  • @akshaychauhan917
    @akshaychauhan917 5 ปีที่แล้ว +2

    its not working on cmd using windows.........so use........node fullname_of_the_file_with_path then press enter key...............
    like node E:\foldername\filename then enter

  • @sriharshajaddu3426
    @sriharshajaddu3426 6 ปีที่แล้ว

    Can you explain phases of web development for learning... Like fist html then css and next js.
    Reply would be helpful!!

  • @hkpedits5088
    @hkpedits5088 5 ปีที่แล้ว

    can you explain the diff bw var, const and let and their scopes?

  • @priyanth123mohan
    @priyanth123mohan 6 ปีที่แล้ว

    const name ='priyanth'
    {
    const name = 'Raju'
    console.log(name);
    }
    In the above example am getting o/p raju how it is possible to change const value pls explain

  • @Harendrasingh-op3lv
    @Harendrasingh-op3lv 6 ปีที่แล้ว

    how to update the node -v in ubuntu...
    while runing variable.js
    following msg appear in my terminal--/home/harendra/hiteshSir/variable.js:1
    (function (exports, require, module, __filename, __dirname) { let name = 'john';
    ^^^
    SyntaxError: Block-scoped declarations (let, const, function, class) not yet supported outside strict mode
    at exports.runInThisContext (vm.js:53:16)
    at Module._compile (module.js:374:25)
    at Object.Module._extensions..js (module.js:417:10)
    at Module.load (module.js:344:32)
    at Function.Module._load (module.js:301:12)
    at Function.Module.runMain (module.js:442:10)
    at startup (node.js:136:18)
    at node.js:966:3

  • @pravinsaha7249
    @pravinsaha7249 5 ปีที่แล้ว

    Can we have var as variable instead of let ?

  • @abhichauhan8811
    @abhichauhan8811 6 ปีที่แล้ว

    after running the program in command prompt the output is not showing please help sir

  • @bhanurulz
    @bhanurulz 6 ปีที่แล้ว

    Hello Sir, if I am adding 100.0 and 20 , why the result is not coming in decimal number?

    • @thotashiridi5964
      @thotashiridi5964 6 ปีที่แล้ว

      The result of addition is "120.0", which is nothing but "120". may be that is why it not showing up decimal or float numbers. Please try to add with 100.05 or give any integer after 100.0, that should give you decimal value in the addition result.

  • @azkexz
    @azkexz 5 ปีที่แล้ว

    My Command Prompt Doesn't work :( Can you help?

  • @EJFF.
    @EJFF. 5 ปีที่แล้ว

    Amazing tutorial Hitesh, thank you for uploading free yet outstanding content.

  • @XXXXAman
    @XXXXAman 6 ปีที่แล้ว

    hi hitesh ,
    whats the difference between 'aman' and "aman" , using single quote and double quote ?

    • @izaanjahangir834
      @izaanjahangir834 6 ปีที่แล้ว +1

      Aman Shrivastava there is no difference in there it's just depends on preference to use single or double quotes

    • @XXXXAman
      @XXXXAman 6 ปีที่แล้ว

      izaan jahangir thanks

  • @its-nitish-kumar-30
    @its-nitish-kumar-30 6 ปีที่แล้ว +2

    its fun and awesome after watching your consistency

  • @shanushwarz2040
    @shanushwarz2040 3 ปีที่แล้ว

    Name =20; also works y?? Even if its not declared

  • @jetspray3
    @jetspray3 5 ปีที่แล้ว

    Try make it a practice of using semi colon to close statements and you could have use the internal terminal in visual studio code.

  • @ashirbadbehera5544
    @ashirbadbehera5544 4 ปีที่แล้ว

    what's the difference between a var and let

  • @mahichy1590
    @mahichy1590 5 ปีที่แล้ว

    Sir you are really a great teacher.

  • @realRohit001
    @realRohit001 6 ปีที่แล้ว

    So as I learned earlier that "var" is the keyword use to declare a variable. So why is it "let" here?

    • @dotslashtarun
      @dotslashtarun 6 ปีที่แล้ว +2

      there are some subtle differences between their scopes
      var is scoped to the nearest function block and let is scoped to the nearest enclosing block, which can be smaller than a function block. Both are global if outside any block.

  • @ShivamSharma-iq6zb
    @ShivamSharma-iq6zb 6 ปีที่แล้ว

    I am so thankfull to you, for making such videos for us.

  • @manibhushanabhishek687
    @manibhushanabhishek687 5 ปีที่แล้ว

    Other than skills u do have a good vocal with awesome communications

  • @dharmendraprasad198
    @dharmendraprasad198 6 ปีที่แล้ว

    Thanq for this course sir.....it's will improve my concept of js

  • @harshit741
    @harshit741 5 ปีที่แล้ว

    please explain difference between usage of let and var.

  • @chaitanyakumarreddy1776
    @chaitanyakumarreddy1776 6 ปีที่แล้ว

    What is node.js???please explain me in detail sir

  • @krisilyubenov2372
    @krisilyubenov2372 5 ปีที่แล้ว

    Thank you so much man!!! Java Script is much easier than c++ I learn so fast with you love ya!

  • @subhoneeldatta6011
    @subhoneeldatta6011 6 ปีที่แล้ว

    let firstName = 'John'
    let lastName = 'Doe'
    console.log(firstName + ' ' + lastName)
    it print the single name what if we print multiple name?

  • @RahulSharma-ot6hl
    @RahulSharma-ot6hl 6 ปีที่แล้ว

    What would happen if u add name and bonus.??

  • @ruhankhandaker5198
    @ruhankhandaker5198 6 ปีที่แล้ว

    i think we'll get all all part of this series.. saltue sir

  • @yashrajanshukla7790
    @yashrajanshukla7790 6 ปีที่แล้ว +1

    Hey why youtube is not sending notifications?..

  • @nishantprajapati7166
    @nishantprajapati7166 6 ปีที่แล้ว

    what is difference between "let" and "var".

  • @vasimshaikh8950
    @vasimshaikh8950 6 ปีที่แล้ว

    var and let are the same and totalscore is not printing in browser.

  • @skillfulactor09
    @skillfulactor09 6 ปีที่แล้ว

    I love u man hitesh you are a great inspiration to me are you going to make Vue js. videos

  • @raihanakram530
    @raihanakram530 6 ปีที่แล้ว +2

    4:42
    All humans made mistakes!
    All humans _will continue_ to make mistakes
    We all are humans...(except some I think...)
    #humans

  • @ajinkyashinde6345
    @ajinkyashinde6345 6 ปีที่แล้ว

    awesome course sir
    i m loving it

  • @jaytalkss
    @jaytalkss 4 ปีที่แล้ว

    bro you solved my problem thanks

  • @pratapsinghrathour7438
    @pratapsinghrathour7438 6 ปีที่แล้ว +1

    Back to back 4th video.Yeah!!!

  • @amitojsinghahuja4330
    @amitojsinghahuja4330 6 ปีที่แล้ว

    Sir what is the difference b/w var and let.

    • @HiteshCodeLab
      @HiteshCodeLab  6 ปีที่แล้ว

      I Never discussed var. :)

    • @amitojsinghahuja4330
      @amitojsinghahuja4330 6 ปีที่แล้ว

      i commented before watching your next video
      but you used it in next video

  • @sandeepreddy830
    @sandeepreddy830 6 ปีที่แล้ว +1

    Upload more videos from the course sir😊😊

  • @vasimshaikh8950
    @vasimshaikh8950 6 ปีที่แล้ว

    when i write let is showing error in dreamwever

  • @YasirKhan-bl8lj
    @YasirKhan-bl8lj 5 ปีที่แล้ว

    Thanks Hitesh

  • @ssshivan
    @ssshivan 4 ปีที่แล้ว

    hummmmm
    i learned alot today i am 14 year kid i want to learn i play games so i want to make a game my self

  • @kartikeyachoudhary5742
    @kartikeyachoudhary5742 4 ปีที่แล้ว

    i think their is another method too: console.log(first_name+ '\t '+last_name)

  • @EAGEEYE321
    @EAGEEYE321 4 ปีที่แล้ว

    i cannot believe you giving this for free

  • @adnaan28
    @adnaan28 5 ปีที่แล้ว

    just one word
    AMAZING !!

  • @subodhkamble6480
    @subodhkamble6480 6 ปีที่แล้ว

    It's fun to learn with you sir ,thanks ❤️

  • @mohitvaishnav7283
    @mohitvaishnav7283 6 ปีที่แล้ว

    please also do some practical use of javascript where we can learn real life applications BTW amazing videos 😍 😍

  • @dhananjaychoudhary2110
    @dhananjaychoudhary2110 6 ปีที่แล้ว +2

    Sir are we getting the whole series today😀

    • @HiteshCodeLab
      @HiteshCodeLab  6 ปีที่แล้ว +2

      nahhhh, not that quick because videos need to be polished and need to be in same audio and video quality.

  • @soumya9895
    @soumya9895 5 ปีที่แล้ว

    Hey guys!! there s a faster way to run java scripts using the code runner extension, just search up code runner in vscode extension's tab and install it.

  • @padmajapatil8996
    @padmajapatil8996 6 ปีที่แล้ว

    Wow its very nice thanku soo much:)

  • @shubhamsharma-pu2sp
    @shubhamsharma-pu2sp 6 ปีที่แล้ว

    Hey sir, We can call variable by 'VAR'

    • @HiteshCodeLab
      @HiteshCodeLab  6 ปีที่แล้ว

      Yep, but let and const are more of a standard now.

    • @shubhamsharma-pu2sp
      @shubhamsharma-pu2sp 6 ปีที่แล้ว

      How can I setup my atom for different languages I don't know how to do it..

  • @gauravk4050
    @gauravk4050 6 ปีที่แล้ว

    great javascript series...

  • @YOYO-dl6fe
    @YOYO-dl6fe 6 ปีที่แล้ว

    Showers of Javascript!!

  • @bhuwanadhikari6732
    @bhuwanadhikari6732 6 ปีที่แล้ว

    make a video about progressive web app and it's future

  • @shankarsingh7842
    @shankarsingh7842 6 ปีที่แล้ว +1

    Keep uploading😀😀

  • @ajaydshimpi4889
    @ajaydshimpi4889 6 ปีที่แล้ว

    Awesome sir

  • @muzik6808
    @muzik6808 5 ปีที่แล้ว

    Thank you sir

  • @rockybhai-cn3qw
    @rockybhai-cn3qw 5 ปีที่แล้ว

    always present sir

  • @dhananjaychoudhary2110
    @dhananjaychoudhary2110 6 ปีที่แล้ว

    Great sir

  • @sandeepkumarmishra7267
    @sandeepkumarmishra7267 6 ปีที่แล้ว

    thankuuu sir....

  • @yashshende2786
    @yashshende2786 6 ปีที่แล้ว +2

    TH-cam is gonna be mad it not even sending me a notification
    #dumb_TH-cam

  • @tabishmanzoor4154
    @tabishmanzoor4154 6 ปีที่แล้ว

    good video :)

  • @kundanpandey5442
    @kundanpandey5442 6 ปีที่แล้ว

    Nice :)

  • @priyamvashi2187
    @priyamvashi2187 6 ปีที่แล้ว

    great :)

  • @pranavkushwaha6016
    @pranavkushwaha6016 6 ปีที่แล้ว

    present sir