-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathimport.js
More file actions
38 lines (27 loc) · 862 Bytes
/
import.js
File metadata and controls
38 lines (27 loc) · 862 Bytes
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
/**
* -------------------------- IMPORTING IN JAVASCRIPT -------------------------
*/
// ----------------------------------------------------------------------------
/**
* TEST : Import an array object and Modify,
* Copy the existing array and form anther array.
*/
import array from './array.js'
// console.log(array);
// array.push(10);
// array.unshift(0)
// console.log(array);
// let newArr = array.map((e) => e);
// console.log(newArr)
// ----------------------------------------------------------------------------
/**
* TEST : Inserting or Updating values in myData object
*/
import myData from './object.js'
// console.log(myData)
myData.name = "Vikash Kumar";
myData.skill = ["JAVASCRIPT", "HTML", "CSS", "REACT", "NODEJS", "TAILWINDCSS"];
// console.log(myData)
/**
* NOTE : Spread operator can't be used in imported object
*/