Click here to Skip to main content
14,364,954 members

JavaScript

 
Questione.target.value, switch-case operators Pin
ghazabaz6-Dec-18 20:22
memberghazabaz6-Dec-18 20:22 
QuestionRe: e.target.value, switch-case operators Pin
Richard MacCutchan7-Dec-18 0:26
protectorRichard MacCutchan7-Dec-18 0:26 
QuestionRe: e.target.value, switch-case operators Pin
ghazabaz7-Dec-18 4:47
memberghazabaz7-Dec-18 4:47 
AnswerRe: e.target.value, switch-case operators Pin
Richard MacCutchan7-Dec-18 5:29
protectorRichard MacCutchan7-Dec-18 5:29 
AnswerRe: e.target.value, switch-case operators Pin
Richard Deeming7-Dec-18 6:37
mveRichard Deeming7-Dec-18 6:37 
QuestionRe: e.target.value, switch-case operators Pin
ghazabaz7-Dec-18 7:44
memberghazabaz7-Dec-18 7:44 
AnswerRe: e.target.value, switch-case operators Pin
Richard Deeming7-Dec-18 7:51
mveRichard Deeming7-Dec-18 7:51 
AnswerRe: e.target.value, switch-case operators Pin
Richard Deeming7-Dec-18 7:54
mveRichard Deeming7-Dec-18 7:54 
Assuming your number buttons are in the calcButtons array, you'll need a default case in your switch statement to handle them:
switch (buttonValue) {
    ...
    case "prev":
        calcValue = ??? + lastEq(calcValue) ; 
        calcValue = calcValue + buttonValue;
        break;
    
    default:
        calcValue = calcValue + buttonValue;
        break;
}

JavaScript Switch Statement[^]



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

QuestionRe: e.target.value, switch-case operators Pin
ghazabaz8-Dec-18 6:19
memberghazabaz8-Dec-18 6:19 
AnswerRe: e.target.value, switch-case operators Pin
Richard Deeming11-Dec-18 2:16
mveRichard Deeming11-Dec-18 2:16 
PraiseRe: e.target.value, switch-case operators Pin
ghazabaz13-Dec-18 7:05
memberghazabaz13-Dec-18 7:05 
QuestionEasy HTML Editor Pin
Bram van Kampen3-Dec-18 16:23
memberBram van Kampen3-Dec-18 16:23 
AnswerRe: Easy HTML Editor Pin
Nathan Minier6-Dec-18 2:24
professionalNathan Minier6-Dec-18 2:24 
AnswerRe: Easy HTML Editor Pin
Nitin Sawant7-Dec-18 2:57
professionalNitin Sawant7-Dec-18 2:57 
AnswerRe: Easy HTML Editor Pin
RedDk28-Dec-18 12:44
memberRedDk28-Dec-18 12:44 
GeneralRe: Easy HTML Editor Pin
Bram van Kampen28-Dec-18 13:55
memberBram van Kampen28-Dec-18 13:55 
QuestionProblems to obtain value "0" or "1" from a div Pin
serenimus1-Dec-18 1:37
memberserenimus1-Dec-18 1:37 
AnswerRe: Problems to obtain value "0" or "1" from a div Pin
ZurdoDev4-Dec-18 3:27
professionalZurdoDev4-Dec-18 3:27 
QuestionUnable to switch events in jquery Pin
vmann30-Nov-18 19:45
membervmann30-Nov-18 19:45 
SuggestionRe: Unable to switch events in jquery Pin
ZurdoDev4-Dec-18 3:28
professionalZurdoDev4-Dec-18 3:28 
QuestionError on line 45 Pin
ghazabaz30-Nov-18 14:38
memberghazabaz30-Nov-18 14:38 
AnswerRe: Error on line 45 Pin
ZurdoDev4-Dec-18 3:29
professionalZurdoDev4-Dec-18 3:29 
AnswerRe: Error on line 45 Pin
maryam.saboor5-Dec-18 0:54
professionalmaryam.saboor5-Dec-18 0:54 
Questiondata transfer in two dimensional array format Pin
Member 1406088822-Nov-18 21:31
memberMember 1406088822-Nov-18 21:31 
QuestionRe: data transfer in two dimensional array format Pin
ZurdoDev4-Dec-18 3:29
professionalZurdoDev4-Dec-18 3:29 

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.