We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
There was an error while loading. Please reload this page.
1 parent 0140278 commit f3eb221Copy full SHA for f3eb221
F. Function/special-problem/valid-phone-number.js
@@ -0,0 +1,13 @@
1
+function validContact(contact) {
2
+ if (contact.length === 11 && contact.startsWith("01") && !contact.includes(" ")) {
3
+ return true;
4
+ }
5
+ else if (typeof contact !== 'string') {
6
+ return "Invalid";
7
8
+ else {
9
+ return false;
10
11
+}
12
+const number = validContact(true);
13
+console.log(number);
F. Function/special-problem/vat-calc.js
@@ -0,0 +1,11 @@
+function calculateVAT(price) {
+ if (typeof price !== 'number' || price < 0) {
+ const productVat = price * 7.5 / 100;
+ return productVat;
+const result = calculateVAT(1000);
+console.log(result);
0 commit comments