We have just started this section for the users (beginner to
+ intermediate) who want to work with various JavaScript problems
+ and write scripts online to test their JavaScript skill.
+
+
+
\ No newline at end of file
diff --git a/lab_tests/lab_test2_2.html b/lab_tests/lab_test2_2.html
new file mode 100644
index 0000000..0e11f66
--- /dev/null
+++ b/lab_tests/lab_test2_2.html
@@ -0,0 +1,26 @@
+
+
+
+
+
+ Return first and last name from a form -
+
+
+
+
+
+
+
+
\ No newline at end of file
diff --git a/lab_tests/lab_test2_3.html b/lab_tests/lab_test2_3.html
new file mode 100644
index 0000000..fdee1f3
--- /dev/null
+++ b/lab_tests/lab_test2_3.html
@@ -0,0 +1,21 @@
+
+
+
+
+
+
+ JS DOM paragraph style
+
+
+
+
JavaScript Exercises -
+
+
+
+
+
+
\ No newline at end of file
diff --git a/lab_tests/lab_test2_4.html b/lab_tests/lab_test2_4.html
new file mode 100644
index 0000000..32d2265
--- /dev/null
+++ b/lab_tests/lab_test2_4.html
@@ -0,0 +1,28 @@
+
+
+
+
+
+
+
+
+
+
+
+
+
+
\ No newline at end of file
diff --git a/lab_tests/lab_test2_5.html b/lab_tests/lab_test2_5.html
new file mode 100644
index 0000000..806c0cf
--- /dev/null
+++ b/lab_tests/lab_test2_5.html
@@ -0,0 +1,33 @@
+
+
+
+
+
+
+ Insert row in a table -
+
+
+
+
+
+
Row1 cell1
+
Row1 cell2
+
+
+
Row2 cell1
+
Row2 cell2
+
+
+
+
+
+
\ No newline at end of file
diff --git a/lab_tests/lab_test2_6.html b/lab_tests/lab_test2_6.html
new file mode 100644
index 0000000..23b6de6
--- /dev/null
+++ b/lab_tests/lab_test2_6.html
@@ -0,0 +1,41 @@
+
+
+
+
+
+
+ Change the content of a cell
+
+
+
+
+
+
Row1 cell1
+
Row1 cell2
+
+
+
Row2 cell1
+
Row2 cell2
+
+
+
Row3 cell1
+
Row3 cell2
+
+
+
+
+
+
\ No newline at end of file
diff --git a/lab_tests/lab_test2_7.html b/lab_tests/lab_test2_7.html
new file mode 100644
index 0000000..45ed1dd
--- /dev/null
+++ b/lab_tests/lab_test2_7.html
@@ -0,0 +1,38 @@
+
+
+
+
+
+ Change the content of a cell
+
+
+
+
+
+
+
+
+
+
+
\ No newline at end of file
diff --git a/lab_tests/lab_test2_8.html b/lab_tests/lab_test2_8.html
new file mode 100644
index 0000000..b553510
--- /dev/null
+++ b/lab_tests/lab_test2_8.html
@@ -0,0 +1,27 @@
+
+
+
+
+
+ Remove items from a dropdown list
+
+
+
+
+
+
+
+
\ No newline at end of file
diff --git a/lab_tests/lab_test2_9.html b/lab_tests/lab_test2_9.html
new file mode 100644
index 0000000..be97c7b
--- /dev/null
+++ b/lab_tests/lab_test2_9.html
@@ -0,0 +1,36 @@
+
+
+
+
+
+
+ Count and display items of a dropdown list -
+
+
+
+
+
+
+
+
\ No newline at end of file
diff --git a/lab_tests/lab_test3.html b/lab_tests/lab_test3.html
new file mode 100644
index 0000000..7789337
--- /dev/null
+++ b/lab_tests/lab_test3.html
@@ -0,0 +1,38 @@
+
+
+
+
+
+
+
+
+
+
+
+
\ No newline at end of file
diff --git a/lab_tests/lab_test3.js b/lab_tests/lab_test3.js
new file mode 100644
index 0000000..97f3e53
--- /dev/null
+++ b/lab_tests/lab_test3.js
@@ -0,0 +1,70 @@
+//1
+function booleanValidate(value) {
+ if (value === true || value === false || toString.call(value) === "[object Boolean]") {
+ return true;
+ } else {
+ return false;
+ }
+}
+
+//2
+function errorValidate(value) {
+ if (value instanceof Error || toString.call(value) === "[object Error]") {
+ return true;
+ } else {
+ return false;
+ }
+}
+
+//3
+function nanValidate(value) {
+ if (value !== value) {
+ return true;
+ } else {
+ return false;
+ }
+}
+
+//4
+function nullValidate(value) {
+ if (value === null) {
+ return true;
+ } else {
+ return false;
+ }
+}
+
+//5
+function numberValidate(value) {
+ if (!isNaN(value) && toString.call(value) === "[object Number]") {
+ return true;
+ } else {
+ return false;
+ }
+}
+
+//6
+function charValidate(value) {
+ if ((value || Object.prototype.toString.call(value) === "[object String]") && value.length === 1) {
+ return true;
+ } else {
+ return false;
+ }
+}
+
+//7
+function sameValidate(value1, value2) {
+ if (nanValidate(value1) || nanValidate(value2)) {
+ if (nanValidate(value1) === nanValidate(value2)) {
+ return true;
+ } else {
+ return false;
+ }
+ }
+ if (toString.call(value1) === toString.call(value2)) {
+ return true;
+ } else {
+ return false;
+ }
+}
+