|
@@ -159,6 +159,23 @@ else if (size = 54) {
|
|
|
}
|
|
|
|
|
|
|
|
|
+//Comparison: object/////////////////////////////////////////////////////
|
|
|
+let size = +prompt('enter ukr size', "");
|
|
|
+let size2;
|
|
|
+let size1 = {
|
|
|
+ number40: '6(S)',
|
|
|
+ number42: '8(M)',
|
|
|
+ number44: '10',
|
|
|
+ number46: '12(L)',
|
|
|
+ number48: '14',
|
|
|
+ number50: '16(XL)',
|
|
|
+ number52: '18',
|
|
|
+ number54: '20(XXL)',
|
|
|
+
|
|
|
+}
|
|
|
+size2 = size1[`number${size}`]
|
|
|
+alert(`us size = ${size2}`)
|
|
|
+
|
|
|
|
|
|
//Ternary///////////////////////////////////////////////////////////////
|
|
|
let text = confirm('вы мужчина?') ? alert('вы мужчина') : alert('вы женщина');
|