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.

175 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

Leave a Comment