Skip to content
Projects
Groups
Snippets
Help
This project
Loading...
Sign in / Register
Toggle navigation
J
js-e001
Overview
Overview
Details
Activity
Cycle Analytics
Repository
Repository
Files
Commits
Branches
Tags
Contributors
Graph
Compare
Charts
Issues
0
Issues
0
List
Board
Labels
Milestones
Merge Requests
0
Merge Requests
0
CI / CD
CI / CD
Pipelines
Jobs
Schedules
Charts
Wiki
Wiki
Snippets
Snippets
Members
Collapse sidebar
Close sidebar
Activity
Graph
Charts
Create a new issue
Jobs
Commits
Issue Boards
Open sidebar
Silvia Barrientos
js-e001
Commits
7f8fe8f9
You need to sign in or sign up before continuing.
Commit
7f8fe8f9
authored
4 years ago
by
Silvia Barrientos
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
Delete javaScript2.js
parent
086e0979
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
0 additions
and
96 deletions
+0
-96
JavaScript/calculadora/javaScript2.js
+0
-96
No files found.
JavaScript/calculadora/javaScript2.js
deleted
100644 → 0
View file @
086e0979
var
operacion
=
""
;
var
numero1
=
0
;
var
numero2
=
0
;
function
init
(){
var
resultado
=
document
.
getElementById
(
"resultado"
);
var
cero
=
document
.
getElementById
(
"cero"
);
var
uno
=
document
.
getElementById
(
"uno"
);
var
dos
=
document
.
getElementById
(
"dos"
);
var
tres
=
document
.
getElementById
(
"tres"
);
var
cuatro
=
document
.
getElementById
(
"cuatro"
);
var
cinco
=
document
.
getElementById
(
"cinco"
);
var
seis
=
document
.
getElementById
(
"seis"
);
var
siete
=
document
.
getElementById
(
"siete"
);
var
ocho
=
document
.
getElementById
(
"ocho"
);
var
nueve
=
document
.
getElementById
(
"nueve"
);
var
suma
=
document
.
getElementById
(
"suma"
);
var
resta
=
document
.
getElementById
(
"resta"
);
var
division
=
document
.
getElementById
(
"division"
);
var
multiplicacion
=
document
.
getElementById
(
"multiplicacion"
);
var
esigual
=
document
.
getElementById
(
"esigual"
);
cero
.
onclick
=
function
(){
resultado
.
textContent
=
"0"
;
}
uno
.
onclick
=
function
(){
resultado
.
textContent
=
"1"
;
}
dos
.
onclick
=
function
(){
resultado
.
textContent
=
"2"
;
}
tres
.
onclick
=
function
(){
resultado
.
textContent
=
"3"
;
}
cuatro
.
onclick
=
function
(){
resultado
.
textContent
=
"4"
;
}
cinco
.
onclick
=
function
(){
resultado
.
textContent
=
"5"
;
}
seis
.
onclick
=
function
(){
resultado
.
textContent
=
"6"
;
}
siete
.
onclick
=
function
(){
resultado
.
textContent
=
"7"
;
}
ocho
.
onclick
=
function
(){
resultado
.
textContent
=
"8"
;
}
nueve
.
onclick
=
function
(){
resultado
.
textContent
=
"9"
;
}
suma
.
onclick
=
function
(){
numero1
=
resultado
.
textContent
;
resultado
.
textContent
=
"+"
;
operacion
=
"+"
;
}
resta
.
onclick
=
function
(){
numero1
=
resultado
.
textContent
;
resultado
.
textContent
=
"-"
;
operacion
=
"-"
;
}
division
.
onclick
=
function
(){
numero1
=
resultado
.
textContent
;
resultado
.
textContent
=
"/"
;
operacion
=
"/"
;
}
multiplicacion
.
onclick
=
function
(){
numero1
=
resultado
.
textContent
;
resultado
.
textContent
=
"*"
;
operacion
=
"*"
;
}
esigual
.
onclick
=
function
(){
numero2
=
resultado
.
textContent
;
switch
(
operacion
){
case
"+"
:
resultado
.
textContent
=
parseInt
(
numero1
)
+
parseInt
(
numero2
);
break
;
case
"-"
:
resultado
.
textContent
=
parseInt
(
numero1
)
-
parseInt
(
numero2
);
break
;
case
"/"
:
resultado
.
textContent
=
parseInt
(
numero1
)
/
parseInt
(
numero2
);
break
;
case
"*"
:
resultado
.
textContent
=
parseInt
(
numero1
)
*
parseInt
(
numero2
);
break
;
}
}
}
\ No newline at end of file
This diff is collapsed.
Click to expand it.
Write
Preview
Markdown
is supported
0%
Try again
or
attach a new file
Attach a file
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment