Home > Tag Archives: javascript (page 2)

Tag Archives: javascript

type coercion and === operator in javascript

javascript

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

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?

javascript

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

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

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 »

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

javascript

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 »

jQuery detecting scroll- scroll reaching to the bottom of page

jQuery detecting scroll- scroll reaching to the bottom of page Detecting scroll and executing login based on scrolling has important significance in web development like implementing pagination, where more data gets loaded when user scrolls near the bottom of page. So, first basic question arises as to how to detect scroll. OR, if you are a jQuery freak, you can ... Read More »