Click here to Skip to main content
15,890,185 members
Home / Discussions / JavaScript
   

JavaScript

 
AnswerRe: How to Check whether radio button is checked or not Pin
Peter Leow6-Mar-14 6:25
professionalPeter Leow6-Mar-14 6:25 
GeneralRe: How to Check whether radio button is checked or not Pin
monsterchub6-Mar-14 7:39
monsterchub6-Mar-14 7:39 
GeneralRe: How to Check whether radio button is checked or not Pin
monsterchub6-Mar-14 9:02
monsterchub6-Mar-14 9:02 
AnswerRe: How to Check whether radio button is checked or not Pin
Peter Leow6-Mar-14 16:06
professionalPeter Leow6-Mar-14 16:06 
Questionreference type vs. primitive type Pin
ThetaClear4-Mar-14 20:37
ThetaClear4-Mar-14 20:37 
AnswerRe: reference type vs. primitive type Pin
Richard Deeming4-Mar-14 23:30
mveRichard Deeming4-Mar-14 23:30 
GeneralRe: reference type vs. primitive type Pin
ThetaClear5-Mar-14 1:15
ThetaClear5-Mar-14 1:15 
GeneralRe: reference type vs. primitive type Pin
Richard Deeming5-Mar-14 1:26
mveRichard Deeming5-Mar-14 1:26 
No. If variables a and b point to object1, and you change variable a to point to object2, variable b will not be affected.

If you're more comfortable with C#, consider the following contrived example:
C#
string a = string.Empty;
string b = string.Empty;

a = "Hello";

What value do you think will be in b after you run this code?

If the language followed your idea, since both variables start out pointing to the same string, when you change a to point to the string "Hello", it would automatically change b as well. That would make it virtually impossible to write a program, since all variables and fields of the same type would automatically be pointing to the same instance of that type.

Think of it like postal addresses: person a lives at address1, and person b also lives at address1. If you change the street-name for address1, that change affects both people. If person a moves to address2, that doesn't necessarily mean that person b moves as well.



"These people looked deep within my soul and assigned me a number based on the order in which I joined."
- Homer


GeneralRe: reference type vs. primitive type Pin
ThetaClear5-Mar-14 1:35
ThetaClear5-Mar-14 1:35 
AnswerRe: reference type vs. primitive type Pin
twseitex13-Mar-14 9:43
twseitex13-Mar-14 9:43 
QuestionBandwidth throttling with Java-script Pin
Member 106426994-Mar-14 5:44
Member 106426994-Mar-14 5:44 
AnswerRe: Bandwidth throttling with Java-script Pin
twseitex13-Mar-14 9:50
twseitex13-Mar-14 9:50 
QuestionCross browser compatibility Pin
Mary Abraham27-Feb-14 15:05
Mary Abraham27-Feb-14 15:05 
AnswerRe: Cross browser compatibility Pin
Peter Leow27-Feb-14 15:57
professionalPeter Leow27-Feb-14 15:57 
GeneralRe: Cross browser compatibility Pin
Mary Abraham27-Feb-14 16:46
Mary Abraham27-Feb-14 16:46 
AnswerRe: Cross browser compatibility Pin
Jellali Tarek7-Mar-14 4:42
Jellali Tarek7-Mar-14 4:42 
QuestionSimple computing machine Pin
Member 1062982927-Feb-14 2:07
Member 1062982927-Feb-14 2:07 
SuggestionRe: Simple computing machine Pin
thatraja27-Feb-14 3:11
professionalthatraja27-Feb-14 3:11 
QuestionRe: Simple computing machine Pin
ZurdoDev27-Feb-14 4:04
professionalZurdoDev27-Feb-14 4:04 
AnswerRe: Simple computing machine Pin
Member 1062982927-Feb-14 13:23
Member 1062982927-Feb-14 13:23 
QuestionRe: Simple computing machine Pin
ZurdoDev27-Feb-14 13:38
professionalZurdoDev27-Feb-14 13:38 
QuestionRe: Simple computing machine Pin
Richard MacCutchan27-Feb-14 22:20
mveRichard MacCutchan27-Feb-14 22:20 
QuestionProblem using onbeforeunload in JQuery or Javascript Pin
Vimalsoft(Pty) Ltd26-Feb-14 3:14
professionalVimalsoft(Pty) Ltd26-Feb-14 3:14 
SuggestionOff-Topic Pin
Nicholas Marty26-Feb-14 4:00
professionalNicholas Marty26-Feb-14 4:00 
GeneralRe: Off-Topic Pin
Vimalsoft(Pty) Ltd26-Feb-14 4:51
professionalVimalsoft(Pty) Ltd26-Feb-14 4:51 

General General    News News    Suggestion Suggestion    Question Question    Bug Bug    Answer Answer    Joke Joke    Praise Praise    Rant Rant    Admin Admin   

Use Ctrl+Left/Right to switch messages, Ctrl+Up/Down to switch threads, Ctrl+Shift+Left/Right to switch pages.