Java Script Basic

JavaScript – Basics

JavaScript, initially called LiveScript is a robust client-side scripting language, used mainly for make your webpage more interactive. This also helps in communicate data between the server and the browser.

JavaScript is also used in game development and mobile application development. It Also help in reduce the traffic of server side.

JavaScript was developed by Brendan Eich in 1995, which appeared in Netscape, a popular browser of that time.

Please note that JavaScript and Java are very much unrelated. Java is a very complex programming language whereas JavaScript is only a scripting language.

 

Limitation of JavaScript

  1. JavaScript doesn’t support any network related programming.
  2. JavaScript doesn’t support multithreading

 

JavaScript Output

JavaScript can display data in following ways:

 

Dialog boxes() – Display output using alert, prompt and confirm dialog boxes

document.write() – Used to insert text onto your web page (this text can actually be HTML elements).

innerHTML – Used to display output in a specific place or in a division

console.log() – Used to display output on the console of a browser.

 

JavaScript – Variables

A variable is basically an identifier for a value or simply the Variables are used to store values or expressions

The way to use variables is by using the var keyword followed by the variable name.

Example:

var empName;

In this line of code, I declared a variable called empName. Right now, It doesn’t contain any value. So initialization is required here –

Example:

var empName = “Hernan”;

Naming Variables

Following things should be follow when naming them:

– Your variable name should be meaningful or be a noun.

– Your variables can start with a letter, underscore, or the $, they can’t start with a number.

– Spaces are not allowed.

– Variable name should be unique and should not be a keyword.

 

Function in JavaScript

A function is nothing more than a wrapper for some code. A function is a block of code which will be executed only if it is called.

So A Function is a:

– Groups statements together

– Makes your code reusable

Syntax

function functionname()

{

//Set of statements here

}

58 thoughts on “Java Script Basic

  1. Real good information can be found on web site. “You have to learn that if you start making sure you feel good, everything will be okay.” by Ruben Studdard.

  2. I loved as much as you will receive carried out right here. The sketch is attractive, your authored material stylish. nonetheless, you command get bought an nervousness over that you wish be delivering the following. unwell unquestionably come further formerly again since exactly the same nearly very often inside case you shield this increase.

  3. We are a group of volunteers and opening a new scheme in our community. Your website provided us with valuable information to work on. You have done an impressive job and our whole community will be thankful to you.

  4. I truly enjoy looking through on this web site, it contains excellent posts. “And all the winds go sighing, For sweet things dying.” by Christina Georgina Rossetti.

  5. Only a smiling visitor here to share the love (:, btw outstanding pattern. “The price one pays for pursuing a profession, or calling, is an intimate knowledge of its ugly side.” by James Arthur Baldwin.

  6. Thanks for sharing excellent informations. Your web site is very cool. I am impressed by the details that you’ve on this website. It reveals how nicely you perceive this subject. Bookmarked this web page, will come back for more articles. You, my friend, ROCK! I found simply the info I already searched everywhere and just couldn’t come across. What a perfect web site.

  7. Attractive section of content. I just stumbled upon your web site and in accession capital to assert that I acquire in fact enjoyed account your blog posts. Any way I will be subscribing to your augment and even I achievement you access consistently rapidly.

  8. I conceive this website has some rattling great information for everyone :D. “Heat cannot be separated from fire, or beauty from The Eternal.” by Alighieri Dante.

  9. Thank you for sharing superb informations. Your web-site is very cool. I am impressed by the details that you have on this website. It reveals how nicely you perceive this subject. Bookmarked this website page, will come back for more articles. You, my friend, ROCK! I found simply the info I already searched everywhere and just could not come across. What a great website.

  10. Needed to put you this tiny observation to thank you very much yet again for those incredible ideas you have provided here. It was simply shockingly open-handed with you to convey openly just what a number of us could possibly have marketed for an e book to end up making some money on their own, even more so now that you could possibly have tried it in case you wanted. The good ideas as well acted to become fantastic way to understand that many people have a similar keenness really like my own to know more and more in terms of this matter. I am certain there are numerous more pleasurable opportunities ahead for those who read carefully your website.

  11. I haven’t checked in here for some time because I thought it was getting boring, but the last several posts are great quality so I guess I’ll add you back to my everyday bloglist. You deserve it my friend 🙂

  12. I have not checked in here for a while as I thought it was getting boring, but the last several posts are great quality so I guess I’ll add you back to my daily bloglist. You deserve it my friend 🙂

  13. Enjoyed examining this, very good stuff, thankyou . “Hereafter, in a better world than this, I shall desire more love and knowledge of you.” by William Shakespeare.

  14. Great – I should certainly pronounce, impressed with your site. I had no trouble navigating through all the tabs and related information ended up being truly simple to do to access. I recently found what I hoped for before you know it in the least. Reasonably unusual. Is likely to appreciate it for those who add forums or something, website theme . a tones way for your client to communicate. Nice task.

  15. obviously like your web site however you need to take a look at the spelling on several of your posts. A number of them are rife with spelling issues and I find it very troublesome to tell the reality however I will definitely come back again.

  16. Hi, Neat post. There is a problem along with your site in web explorer, could check this… IE nonetheless is the market chief and a good section of other folks will pass over your magnificent writing because of this problem.

  17. I do trust all the ideas you’ve introduced for your post. They are really convincing and will certainly work. Still, the posts are very quick for novices. Could you please lengthen them a little from next time? Thanks for the post.

  18. I precisely wished to thank you very much once again. I do not know the things that I could possibly have taken care of in the absence of the points contributed by you on such subject. It was an absolute distressing matter for me personally, nevertheless spending time with your specialised mode you solved it forced me to cry for gladness. I am just happier for your help and believe you are aware of a powerful job you were getting into instructing most people using your websites. I am sure you haven’t met any of us.

  19. Attractive section of content. I just stumbled upon your weblog and in accession capital to assert that I get in fact enjoyed account your blog posts. Anyway I will be subscribing to your augment and even I achievement you access consistently rapidly.

  20. What i do not understood is if truth be told how you’re no longer really a lot more neatly-favored than you may be right now. You’re so intelligent. You know thus significantly in relation to this subject, made me in my opinion consider it from numerous numerous angles. Its like men and women don’t seem to be interested until it is something to do with Girl gaga! Your own stuffs excellent. Always maintain it up!

  21. You have remarked very interesting details ! ps decent website . “I just wish we knew a little less about his urethra and a little more about his arms sales to Iran.” by Andrew A. Rooney.

  22. Somebody essentially help to make critically posts I’d state. That is the first time I frequented your website page and up to now? I surprised with the research you made to create this particular put up extraordinary. Excellent job!

  23. My spouse and i were absolutely comfortable when Raymond could complete his investigations from the precious recommendations he grabbed when using the blog. It is now and again perplexing to simply be giving freely instructions the rest have been making money from. We really see we now have the writer to appreciate for that. Most of the explanations you have made, the straightforward web site navigation, the relationships you can make it possible to instill – it is mostly incredible, and it’s really assisting our son and the family recognize that that matter is excellent, and that’s rather indispensable. Many thanks for all the pieces!

  24. Simply want to say your article is as astonishing. The clearness in your post is just nice and i can assume you’re an expert on this subject. Fine with your permission let me to grab your feed to keep updated with forthcoming post. Thanks a million and please keep up the enjoyable work.

  25. I have been surfing online more than 3 hours today, yet I never found any interesting article like yours. It is pretty worth enough for me. Personally, if all webmasters and bloggers made good content as you did, the web will be much more useful than ever before.

  26. I have been exploring for a little bit for any high-quality articles or weblog posts on this sort of area . Exploring in Yahoo I at last stumbled upon this site. Studying this info So i¡¦m satisfied to convey that I’ve an incredibly just right uncanny feeling I came upon exactly what I needed. I such a lot no doubt will make certain to do not overlook this web site and provides it a glance on a continuing basis.

  27. Thanks for any other magnificent article. The place else may just anybody get that type of information in such an ideal way of writing? I have a presentation next week, and I’m on the search for such information.

  28. I’m really impressed with your writing skills and also with the layout on your blog. Is this a paid theme or did you customize it yourself? Either way keep up the excellent quality writing, it is rare to see a nice blog like this one today..

  29. Unquestionably believe that which you stated. Your favorite justification seemed to be on the net the simplest thing to be aware of. I say to you, I certainly get irked while people consider worries that they plainly don’t know about. You managed to hit the nail upon the top and also defined out the whole thing without having side effect , people could take a signal. Will probably be back to get more. Thanks

  30. I really wanted to compose a small word to be able to appreciate you for those precious tips and tricks you are giving at this site. My extended internet look up has at the end been honored with pleasant details to go over with my co-workers. I ‘d assert that many of us site visitors actually are undeniably blessed to dwell in a great community with so many marvellous professionals with good principles. I feel pretty privileged to have seen your entire website page and look forward to so many more awesome times reading here. Thanks once again for all the details.

  31. I have been browsing online more than 3 hours today, yet I never found any interesting article like yours. It’s pretty worth enough for me. Personally, if all web owners and bloggers made good content as you did, the internet will be much more useful than ever before.

  32. Terrific paintings! That is the kind of info that are supposed to be shared around the internet. Disgrace on Google for no longer positioning this submit higher! Come on over and discuss with my website . Thanks =)

  33. Very nice post. I just stumbled upon your blog and wished to say that I’ve really enjoyed surfing around your blog posts. In any case I’ll be subscribing to your rss feed and I hope you write again soon!

Leave a Reply

Your email address will not be published.

Enjoy the tutorial? Please spread the word :)

Follow by Email
Facebook
Facebook
Google+2k
Google+
http://hirdeshbhardwaj.com/2016/09/14/java-script-basic
YouTube49
YouTube