How can I declare a variable as a function as well as assign values to it

I tried this:

 var fun = function(){ console.log("booyah"} , {
  hell: function(){
    console.log("hello");
  },
  boy: ()=>{
    alert("blah");
  }
};
fun.boy();

I want that first I call fun function and then Access functions I have stored as objects. But I am getting errors . How can I fix it? Or is there any other way to do that?
Please help.

380 thoughts on “How can I declare a variable as a function as well as assign values to it”

  1. What i do not realize is in truth how you are not actually much more smartly-favored than you may be now. You are so intelligent. You realize therefore considerably in relation to this matter, made me in my view consider it from numerous varied angles. Its like women and men are not fascinated unless it is one thing to accomplish with Woman gaga! Your individual stuffs excellent. All the time care for it up!

    Reply
  2. Pingback: keto creamer
  3. First of all I would like to say superb blog! I had a quick question which I’d like to ask if you do not mind.
    I was interested to find out how you center yourself and clear your mind prior
    to writing. I have had trouble clearing my mind in getting my thoughts out
    there. I do enjoy writing however it just seems like the first 10 to 15 minutes are
    wasted just trying to figure out how to begin. Any recommendations or hints?
    Kudos! http://herreramedical.org/prednisone

    Reply
  4. I just could not go away your web site prior to suggesting that I actually enjoyed the usual information a person supply on your visitors? Is gonna be again regularly to check up on new posts.

    Reply
  5. I really love your blog.. Very nice colors & theme. Did
    you develop this site yourself? Please reply back as I’m wanting to create
    my own personal site and want to learn where you got this from
    or what the theme is named. Cheers!

    Reply
  6. Hi there I am so thrilled I found your web site, I really found you by mistake, while I was researching on Digg for something
    else, Anyways I am here now and would just like to say cheers
    for a tremendous post and a all round entertaining blog (I
    also love the theme/design), I don’t have time to look over it all at
    the minute but I have bookmarked it and also added your RSS feeds, so when I have time I will be back to read a lot more,
    Please do keep up the excellent job.

    Reply
  7. Pretty nice post. I just stumbled upon your blog
    and wished to say that I have truly enjoyed browsing your blog posts.
    In any case I’ll be subscribing to your feed and I hope you write again very soon!

    Reply
  8. Hey! I know this is kinda off topic but I was wondering which blog platform are you using for this website?
    I’m getting tired of WordPress because I’ve had issues with hackers and I’m looking at alternatives for
    another platform. I would be fantastic if you could point me in the direction of a
    good platform.

    Reply
  9. Simply want to say your article is as astonishing.
    The clarity in your post is simply spectacular and i can assume you’re
    an expert on this subject. Fine with your permission let me to grab your feed to keep up to date with forthcoming post.
    Thanks a million and please keep up the gratifying work.

    Reply
  10. Pingback: gay female dating
  11. Howdy just wanted to give you a quick heads up and let you know a few of the images aren’t loading correctly. I’m not sure why but I think its a linking issue. I’ve tried it in two different internet browsers and both show the same results.

    Reply
  12. I love your blog.. very nice colors & theme. Did you design this website yourself or did you hire someone to do it for you? Plz respond as I’m looking to create my own blog and would like to know where u got this from. appreciate it

    Reply
  13. This design is steller! You most certainly know how to keep a reader entertained. Between your wit and your videos, I was almost moved to start my own blog (well, almost…HaHa!) Great job. I really enjoyed what you had to say, and more than that, how you presented it. Too cool!

    Reply
  14. Hello there! This post could not be written any better! Reading through this post reminds me of my previous room mate! He always kept chatting about this. I will forward this page to him. Fairly certain he will have a good read. Thanks for sharing!

    Reply
  15. Does your site have a contact page? I’m having trouble locating it but,
    I’d like to send you an e-mail. I’ve got some ideas for your blog you
    might be interested in hearing. Either way, great website and I
    look forward to seeing it improve over time.

    Reply
  16. Hey I am so delighted I found your blog, I really found you by error, while I was researching on Askjeeve for something else, Anyways I am here now and would just like to say kudos for a incredible post and a all round thrilling blog (I also love the theme/design), I don’t have time to read through it all at the moment but I have saved it and also included your RSS feeds, so when I have time I will be back to read a lot more, Please do keep up the excellent job.

    Reply
  17. What i don’t realize is in reality how you are not
    actually much more well-appreciated than you might be now.
    You’re so intelligent. You know therefore considerably in terms of this matter, made me personally consider it from a lot of various angles.
    Its like women and men don’t seem to be interested until it is one thing to accomplish with Woman gaga!
    Your own stuffs outstanding. Always take care of it up!

    Reply
  18. Just desire to say your article is as astonishing.
    The clearness for your submit is just nice and that
    i can assume you are knowledgeable in this subject.
    Well together with your permission let me to snatch your RSS feed to stay updated with forthcoming post.
    Thanks a million and please carry on the rewarding work.

    Reply
  19. obviously like your website but you have to check the spelling on several of your posts.
    Many of them are rife with spelling problems and I find it
    very bothersome to tell the reality nevertheless I’ll certainly come back again.

    Reply
  20. It is appropriate time to make a few plans for the long run and
    it is time to be happy. I’ve learn this publish and if I may I want to suggest you some attention-grabbing issues or advice.
    Perhaps you can write next articles referring to this article.
    I desire to learn even more issues about it!

    Reply
  21. Just desire to say your article is as astounding. The clarity for your
    put up is simply cool and i can assume you are an expert on this subject.
    Well along with your permission let me to grasp your RSS feed to keep up to date
    with approaching post. Thank you a million and please continue the enjoyable work.

    Reply
  22. My partner and I stumbled over here coming from a different page and thought I
    should check things out. I like what I see so
    now i’m following you. Look forward to finding out about your web page for a second time.

    Reply
  23. Excellent post. I used to be checking constantly this blog and I am impressed!

    Very helpful information specifically the ultimate section :
    ) I maintain such information a lot. I used to be looking for this certain info for a very lengthy time.
    Thank you and good luck.

    Reply
  24. Oh my goodness! Awesome article dude! Many thanks, However I am encountering
    difficulties with your RSS. I don’t know why I cannot join it.
    Is there anyone else having identical RSS issues?
    Anyone who knows the answer can you kindly respond?

    Thanx!!

    Reply
  25. Fantastic blog! Do you have any tips and hints for aspiring
    writers? I’m hoping to start my own website soon but I’m a little lost on everything.
    Would you suggest starting with a free platform like WordPress or go for a paid option? There are so many choices
    out there that I’m totally confused .. Any ideas?
    Thanks a lot!

    Reply
  26. Awesome website you have here but I was wanting to know if you knew of any user discussion forums that cover the same topics discussed in this article?
    I’d really like to be a part of online community where I can get advice from other
    experienced individuals that share the same interest. If you have any recommendations, please let me know.
    Bless you!

    Reply
  27. I’m extremely impressed together with your writing skills as well as with the structure on your blog. Is that this a paid subject matter or did you modify it yourself? Either way keep up the nice high quality writing, it’s rare to look a nice blog like this one today..

    Reply
  28. Great post. I used to be checking continuously this blog and I am impressed!
    Extremely helpful info particularly the final part :
    ) I care for such information much. I used to be looking for this certain info for a long time.
    Thank you and best of luck.

    Reply
  29. Hi, I do think this is a great web site. I stumbledupon it
    😉 I am going to revisit yet again since I bookmarked it.
    Money and freedom is the greatest way to change, may you be rich
    and continue to guide others.

    Reply
  30. I was extremely pleased to discover this web site.
    I wanted to thank you for your time due to this fantastic read!!
    I definitely savored every little bit of it and I have
    you saved as a favorite to see new stuff in your blog.

    Reply
  31. Hi I am so grateful I found your site, I really found you by accident, while I was researching on Bing for something else, Nonetheless I am
    here now and would just like to say many thanks for a tremendous post and a all
    round thrilling blog (I also love the theme/design), I don’t have time to browse it all at the moment but I have book-marked it
    and also included your RSS feeds, so when I have time I will be back to
    read a lot more, Please do keep up the superb work.

    Reply
  32. Greetings! This is my first visit to your blog! We are a collection of volunteers and starting a new initiative in a community in the same niche.
    Your blog provided us valuable information to work on. You have done a extraordinary job!

    Reply