type coercion and === operator in javascript Type coercion is where you have variables declared & assigned to a value and you are operating on those variables. There are certain points of time where the interpreter will have to do automatic type conversions to equivalent value of the other operands type for you in order to make operations work. Type ... Read More »
typeof operator- typeof null-a known bug in javascript
typeof operator- typeof null-a known bug in javascript As per ECMAscript5 specifications Javascript has 5 primitive data-types. number string boolean undefined null We all know that Javascript is loosely typed, a Javascript variable holding a particular type of value can hold another type of value at another point of time. So, interrogating Javascript variables and values is a very handy ... Read More »
Difference between undefined and null in Javascript- When to use what?
Difference between undefined and null in Javascript- When to use what? This is one of the most confusing topics in the Javascript world. Beginners finds it difficult to understand when to use what. Kindly read my below post for understanding undefined. Understanding undefined in Javascript Null is like N/A(not applicable). It’s a non-value, nothing. Both undefined and null indicates absence ... Read More »
Understanding undefined in Javascript
Understanding undefined in Javascript Interesting thing about variable handling in Javascript is there is no type information associated to a variable. Ex, var jkoder=1; Here variable jkoder is of number type. But, since Javascript has loose typing so we can associate jkoder variable to string type. jkoder="hello javascript"; What I wanted to say is in Javascript variable can be associated ... Read More »
Number primitive type in Javascript
Number primitive type in Javascript As with any other language Javascript comes loaded with its primitive types. As per ECMAscript5 Javascript has number primitive type for dealing with integers, floating-points, double, long. Well these are some fantasies of JAVA world(which depends on the precision of the number you want), but almost every language has these characteristics. Javascript don’t care about ... Read More »
Twitter search API- Get tweets and tweets count of hashtag using JAVA twitter client Twitter4j
Twitter search API- Get tweets and tweets count of hashtag using Twitter4j JAVA I have searched many resources on internet for how to obtain tweets count for a particular hashtag. To may observation there is no API exposed by Twitter for getting counts data for a hashtag.But there is a search tweets API that provides tweets data(including retweets) for a ... Read More »
What is javascript? Why to use javascript?—- Buzzwords explained with simplicity
What is javascript?—- Buzzwords explained with simplicity Javascript is the one of most misunderstood language as per Douglas crockford(a famous name in the Javascript world). There will be times when you will love this language the most as well hate it as much as you can. Now lets come to the point, as per Mozilla Developer Network, JavaScript (often shortened ... Read More »
jQuery load/parse JSON response
jQuery load/parse JSON response Takes a well-formed JSON string and returns the resulting JavaScript value, probably object or array of objects. Passing in a malformed JSON string results in a JavaScript exception being thrown. For example, the following are all invalid JSON strings: “{test: 1}” (test does not have double quotes around it). “{‘test’: 1}” (‘test’ is using single quotes ... Read More »
Javascript for loop vs jQuery for each
Javascript for loop vs jQuery for each Web developers often come across looping through data at client side. People generally use native Javascript coding for loop, or jQuery for each. Javascript For Loop. Example var names= ["jkoder", "kumar", "temp"]; var i; var text=""; for (i = 0; i < cars.length; i++) { text += names[i] + ","; } document.write(text); Result-> ... Read More »
Detecting key press for input text and Detecting Enter key
Detecting keypress for input text and Detecting Enter key The order of events related to the keyup event: 1. keydown – The key is on its way down2. keypress – The key is pressed down3. keyup – The key is released The keyup event occurs when a keyboard key is released. The keyup() method triggers the keyup event, or attaches ... Read More »
Jkoder.com Tutorials, Tips and interview questions for Java, J2EE, Android, Spring, Hibernate, Javascript and other languages for software developers