May 2, 2021 05:42 am GMT
Original Link: https://dev.to/jahongir2007/data-js-mini-framework-for-beginners-p5o
Data.js mini framework for beginners
What is Data.js?
Data.js is a mini-framework that runs on Node.js. It is mainly programmed to work with arrays. This framework is able to display arrays in different formats and again give information about how much information is in the array. Its syntax is very simple.
In Data.js we create a program called "subgroup of numbers"
We can download Data.js from github. The location of the downloaded folder: (all guides)
|___bin |___data.js |___test.js|___docs |___config.yml |___index.md|___LICENSE|___README.md
We attach the data.js file in the bin folder to our program (Of course we can copy the bin folder from the uploaded folder to the folder we are creating).
const Data = require(".\bin\data.js"); //importing data.js
Now it's your turn to create the program:
const Data = require(".\bin\data.js");var app = new Data([25,9,16,100],{ get: "false", getLenght: false, join: false, copy: false, constructor: false, entries: false, reverse: false, sort: false, fill: false, shift: false, map: Math.sqrt, pop: false});
Output:
[5,3,4,10]
Original Link: https://dev.to/jahongir2007/data-js-mini-framework-for-beginners-p5o
Share this article:
Tweet
View Full Article
Dev To
An online community for sharing and discovering great ideas, having debates, and making friendsMore About this Source Visit Dev To