Introduction to functions in javascript

Поделиться
HTML-код
  • Опубликовано: 21 авг 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...

Комментарии • 91

  • @SwadeshiBakchod
    @SwadeshiBakchod 6 лет назад +10

    TYPES OF FUNCTIONS:-
    function name ( param ) {} // Normal function
    var name = function (){}; //Anonymous function assigned to a variable named "name"
    const name = (param) => {}; // es6 arrow function, defined with const named "name"
    :)

  • @aqeebhj5467
    @aqeebhj5467 6 лет назад +12

    assignment:
    let sayHello = function(name){
    console.log(`greeting message for ${name}` )
    console.log(`Hey ${name}`)
    }
    sayHello('Hitesh')

  • @effmerunning
    @effmerunning 5 лет назад

    Thank you Hitesh. I am in the precourse stage of a bootcamp and their demos include 'console.log()' only, but the exercises use RETURN, which can cause students to confuse the two as producing the same result. I have watched a half-dozen videos and yours broke it down best. Subscribed.

  • @asdfghjkl1770
    @asdfghjkl1770 5 лет назад +1

    I know some stuffs of JS but I still following this course with 1.5x playback speed because the way Hitesh sir teach us is amazing! Keep doing this !

  • @MijeshDeuja
    @MijeshDeuja 5 лет назад +3

    Really fun series to learn from. I will have already learnt JS basics before my collage courses start hahaha thanks to you.

  • @yashshende2786
    @yashshende2786 6 лет назад +4

    Best js series 👍

  • @rammaheshwari3008
    @rammaheshwari3008 5 лет назад

    He is one of the best teacher in the world , I am going to buy his online courses :)

  • @delubiod1970
    @delubiod1970 6 лет назад

    I like the Indian accent. "parenthesis" is paren + thesis. Another word "parameters" is para + meters. In Brazil we have somewhat the same way of saying words, like emphasis in the last part of the word, sometimes in the middle of the word and even in the beginning of the word. Some words sounds like a roller coaster, and it sounds nice.....In English is kind of flat. like "parenthesis" but in parAmeters the upper case A is where the Americans do speak their roller coaster and Hitesh speaks like paraMeters with his roller coaster starting on M.....I love linguistics. Sorry guys, off topic, but really nice......

    • @HiteshCodeLab
      @HiteshCodeLab  6 лет назад +1

      This is the mOst intersTing comment :)

    • @delubiod1970
      @delubiod1970 6 лет назад

      ;) Thanks Hitesh. I LOve India and your milenar cuLture...

    • @shreejasoni5171
      @shreejasoni5171 4 года назад +1

      really good and informative comment

  • @rightbackatcha22
    @rightbackatcha22 2 года назад

    Loving the Series. Thanks Hitesh.

  • @kushalbagadia4755
    @kushalbagadia4755 5 лет назад

    Best series ever i seen..
    How u make mistakes to understand easier it was awesome..

  • @NoGoodHandlesComingToMind
    @NoGoodHandlesComingToMind 5 лет назад

    I did my own examples just to make sure I understood it, and they all worked. :-)
    Great series!

  • @mizanurrahmankhan692
    @mizanurrahmankhan692 6 лет назад +1

    Hi Hitesh, we very much enjoying this series.

  • @arjunsingh-eu5or
    @arjunsingh-eu5or 5 лет назад +2

    Sir $ is not working what is the problem ,when I execute programme it happen all copy, first-name and last name John and doe are not happening
    The answer happening same as ${firt name } ${last name } not John and doe help me

    • @drpstar
      @drpstar 4 года назад +1

      Same here bro....

    • @drpstar
      @drpstar 4 года назад +1

      Did you find any solution??

    • @arjunsingh-eu5or
      @arjunsingh-eu5or 4 года назад

      @@drpstar bro remove doller and use only variable in console.log(given variable)

  • @himanipandey4414
    @himanipandey4414 5 лет назад

    Very Helpful videos.The way you explain is very clear and interesting.Thanks.

  • @tarundhouni4875
    @tarundhouni4875 5 лет назад

    let mymultiply = function(num1,num2){
    multiply =num1 * num2
    return multiply
    }
    mymultiply(6,8)
    console.log(mymultiply(6,8))

  • @srikanthracharla420
    @srikanthracharla420 4 года назад +1

    let fullNameMaker = function (firstName, lastName) {
    console.log("Welcome to RUclips");
    console.log(`Happy to have you ${firstName} ${lastName}`);
    };
    fullNameMaker("srikanth", "racharla");

  • @srikanthracharla420
    @srikanthracharla420 4 года назад +1

    let myAdder = function (num1, num2) {
    let added = num1 + num2;
    return added;
    };
    console.log(myAdder(7, 7));

  • @Bajrang.707
    @Bajrang.707 5 лет назад +3

    Thanks for this one!

  • @franklinraj
    @franklinraj 6 лет назад +1

    very useful for me and easy to understand

  • @Saurabhkumar-hz9wj
    @Saurabhkumar-hz9wj 6 лет назад

    yaa...i love all videos by YOU...thankyou

  • @shadabahmed4547
    @shadabahmed4547 5 лет назад

    thanks for uploading such a marvelous series on javascript

  • @mohitvaishnav7283
    @mohitvaishnav7283 6 лет назад

    I wish I had you in my school 😊😊
    #great teacher

  • @XploreWithReal
    @XploreWithReal 6 лет назад +1

    is it gonna be a complete series of JavaScript ?

  • @srikanthracharla420
    @srikanthracharla420 4 года назад +1

    let sayHello = function (name) {
    console.log("Greeting messgae to " + name);
    console.log(`Hey ${name}`);
    };
    sayHello("Srikanth");

  • @MrKhandeshi
    @MrKhandeshi 6 лет назад +2

    Sir, ${} is not working on my computer...
    it is printing as it is value....

    • @yashwanthreddy366
      @yashwanthreddy366 5 лет назад

      yeah, same here

    • @YoYo-eg6rc
      @YoYo-eg6rc 5 лет назад +2

      @@yashwanthreddy366 but it is working on chrome console , I am still using
      Tip: use inside ` ` it ,not in " " or ' '

    • @manibhushanabhishek687
      @manibhushanabhishek687 5 лет назад

      @@YoYo-eg6rc Hi I do have the same issue

    • @bibhudanandadash
      @bibhudanandadash 5 лет назад

      Yup, It will work for few Browser and not for few as these are related to JS6 latest release, adding multiple variable in message and multi-line message. So expected that It may only work in Chrome else a browser that is upgraded to support JS6

  • @Devank12
    @Devank12 6 лет назад

    Sir, I loved this series

  • @RaviSolanki-iz9ev
    @RaviSolanki-iz9ev 5 лет назад +1

    what is the difference between
    Console.log(`hey ${name}`)
    and
    Console.log("hey" + name)
    Both gives same output.
    Plz explain

    • @ThisIsLiving__
      @ThisIsLiving__ 5 лет назад

      you use the ${} when the value is inside a sentence for instance ..my name is ravi and i m learning JS whereas the +name u calling a defined value at the end of ur sentence for insance ....my name is : ravi you ll not be able to continue the sentence with the name in between

    • @secretninja9058
      @secretninja9058 5 лет назад

      developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Template_literals

  • @edyd1
    @edyd1 5 лет назад

    here is code for sin(x)
    let angle = 3.140/6;
    let nr = angle;
    let dr = 1;
    let i,sinx=angle,t=1,num=0;
    for(i=1; i

  • @yoyoma7273_6
    @yoyoma7273_6 5 лет назад

    Thank you for these series.

  • @pratikgarg6593
    @pratikgarg6593 6 лет назад

    Awesome series sir

  • @abhishekshah11
    @abhishekshah11 5 лет назад

    Okay one question, why are you using back ticks in those functions when printing the function parameters?

  • @rishabhkumar2264
    @rishabhkumar2264 6 лет назад

    hii sir, i have question!! What's the difference between general function and arrow function???

  • @khadijasaleem6068
    @khadijasaleem6068 5 лет назад

    let fullName=function(num1,num2)
    {
    document.write(`sum is,${num1+num2}`)
    }
    let result=fullName(1,3)

  • @likhitachinnari4773
    @likhitachinnari4773 4 года назад

    Sir, what if we wanna use the parameters passed inside the function block, how to access those parameters ?

  • @kartiksharma139
    @kartiksharma139 4 года назад

    */* Really professional explanation! ^^

  • @sandeepreddy830
    @sandeepreddy830 6 лет назад

    Only he taught us anonymous functions in this video but i hope he will also going to make a video on normal function declaration method like
    function function-name()
    {
    }

  • @umairali2360
    @umairali2360 4 года назад

    very informative

  • @abhipadhi
    @abhipadhi 4 года назад

    I guess statement : let sayHello = function(name){} doen't mean function's name is sayHello rather funtion is assigned to a variable named sayHello..

  • @lalitgupta590
    @lalitgupta590 4 года назад

    Why you not write firstname and lastname in camel case, it is a way to write this or something else please explain it so I just clear this in my mind.

  • @yogendraiyer
    @yogendraiyer 5 лет назад

    Super JS series

  • @rishabhkumar2264
    @rishabhkumar2264 6 лет назад

    nice video sir

  • @munmundas3
    @munmundas3 4 года назад

    I follow above two conditions for add number also.. and it returns same..

  • @sairam-du7ip
    @sairam-du7ip 5 лет назад

    im not getting the output in terminal, instead im getting an error that the syntax is wrong in microsoft script host

  • @idahkhakaali4449
    @idahkhakaali4449 4 года назад

    hey I need some help.Whenever i Invoke this ${para} it does not call the parameter.Where is the problem?

  • @ruhankhandaker5198
    @ruhankhandaker5198 6 лет назад

    Use semicolon is a good practise

  • @chandualluri7258
    @chandualluri7258 4 года назад

    I am using termux to run js it is not showing any errors of my programme do you have any solution

  • @Shubhamsharma-nk8nz
    @Shubhamsharma-nk8nz 6 лет назад +1

    👌👌👌👌

  • @hemangi90
    @hemangi90 5 лет назад +1

    Sir I got +9 error but I do exactly same as you

  • @tanvirsingh355
    @tanvirsingh355 6 лет назад

    sir what if we write var instead of let in this...

  • @padmapriyas7684
    @padmapriyas7684 6 лет назад

    How to read a value from the user in nodejs?

  • @gauravk4050
    @gauravk4050 6 лет назад

    yeah one more...great

  • @yashmishra5796
    @yashmishra5796 4 года назад

    hitesh how i can take input from user

  • @manju-hz9eg
    @manju-hz9eg 5 лет назад

    ${} not working for me as well....I am trying to execute in JS bin ...is this problem with JS bin?

  • @kunalmanshani379
    @kunalmanshani379 5 лет назад

    i have a query about arrays and something else

  • @harshjaiswal8264
    @harshjaiswal8264 6 лет назад

    When to use ' and when to use " ???

  • @aalokk.chaudhary
    @aalokk.chaudhary 5 лет назад

    Difference bn Document.write() & console.log() ?

    • @rajeshkumarverma8843
      @rajeshkumarverma8843 4 года назад

      Console.log directly shows the output in console area.
      Document.write shows the output in the big screen, where the html outputs are usually shown

  • @manibhushanabhishek687
    @manibhushanabhishek687 5 лет назад

    Hi, $ is not working for me, when I m trying to pass, it came in the simple string form. Can anybody please help me with it?

  • @harshrathod2237
    @harshrathod2237 5 лет назад

    whenever i'm executing node functions.js command it is giving me
    can't find module error
    anyone tell me what to do

    • @Weirdstreamer
      @Weirdstreamer 4 года назад

      check out where you have saved the file >trace the path upto that folder then,run this command to >run this js file

  • @dopamine_Seeker
    @dopamine_Seeker 3 года назад

    ${ } function not working

  • @SanatanaShivShorts
    @SanatanaShivShorts 6 лет назад

    ♥️♥️♥️♥️♥️♥️♥️♥️

  • @siddharthcharkhawala6659
    @siddharthcharkhawala6659 6 лет назад +1

    what if i write:
    let name = 'john'
    console.log(`Heyy ${console.log(name)}`)
    its output is : Heyy undefine
    BUt i don't understand why undefine.. if anyone can help me..

    • @matiri91
      @matiri91 6 лет назад

      let name = 'john'
      console.log(`Heyy ${name}`)

    • @Mayankyadavmy
      @Mayankyadavmy 6 лет назад +1

      because in console.log(`Heyy ${console.log(name)}`) first console.log(name) will operate which will give john and again console.log(`Hey ${john}`) will operate and john is not defined because ${Here it takes a variable}.
      Hope it's clear
      Tip: start operating the code from right to left and acknowledge which code will operate first.

    • @jetspray3
      @jetspray3 5 лет назад

      Dude i think most of the time that format is used as a placeholder for a variable that has been declared and assigned a value.

    • @YoYo-eg6rc
      @YoYo-eg6rc 5 лет назад +1

      @@Mayankyadavmy I understood clearly dude

  • @timmytim9054
    @timmytim9054 5 лет назад

    I'm probably not going to get a fucking response from this like always but why use 'let' instead of 'var' to declare a function??

  • @rahulmukherjee4351
    @rahulmukherjee4351 6 лет назад

    $ sign function is not working in my system

  • @beingabdul2487
    @beingabdul2487 5 лет назад

    ???

  • @tarundhouni4875
    @tarundhouni4875 5 лет назад +1

    let helloFriend = function(name){
    console.log(`Greeting msg for ${name} `)
    console.log(`Hello ${name}`)
    }
    helloFriend("Tarun")

  • @govindrajput6454
    @govindrajput6454 6 лет назад

    Sorry to say but sound is not good