当前位置:网站首页>模块化操作
模块化操作
2022-06-28 18:32:00 【qq_46198929】

package.json
{
"name": "moduledemo",
"version": "1.0.0",
"description": "",
"main": "index.js",
"scripts": {
"test": "echo \"Error: no test specified\" && exit 1"
},
"keywords": [],
"author": "",
"license": "ISC"
}
01.js
const sum=function(a,b){
return parseInt(a)+parseInt(b)
}
const subtract=function(a,b){
return parseInt(a)-parseInt(b)
}
module.exports={
sum,
subtract
}
02.js
const m=require('./01.js')
console.log((m.sum(6,5)))
console.log((m.subtract(6,5)))

边栏推荐
猜你喜欢

SMARCA2抗体研究:Abnova SMARCA2 单克隆抗体方案

About Covariance and Correlation(协方差和相关)

独立站卖家如何高效管理复杂的Facebook主页?

杂记:数据库go,begin,end,for,after,instead of

双功能交联剂丨Lumiprobe 磺基花青7二羧酸研究

Mycat+ sub database and sub table

用户网络模型与QoE

Chapter 2 processing files, cameras and GUI Cameo applications

How to manage interface documents efficiently and gracefully

图形系统——1. 布局加载
随机推荐
leetcode 1647. Minimum Deletions to Make Character Frequencies Unique(所有字母频率不同的最小删除次数)
Opencv中使用Tracker实现物体跟踪
Steam education to break the barriers between disciplines
数据库实验7 完整性约束
1 invalid import format(s) Postman Collection Format v1 is no longer supported and can not be import
SqlTransaction
NFT流动性协议的安全困局—NFT借贷协议XCarnival被黑事件分析
19.2 容器分类、array、vector容器精解
【Unity3D】发射(RayCast)物理射线(Ray)
Sharing-JDBC分布式事务之Seata实现
Small program graduation project based on wechat milk tea takeout mall small program graduation project opening report function reference
刷题分析工具
数据资产为王,如何解析企业数字化转型与数据资产管理的关系?
推荐两款超高质量的壁纸软件
golang中的select详解(转)
注意!PMP紧急缓考今天就截止了!
Huawei cloud AOM released version 2.0, and three features appeared
Alist+RaiDrive 给电脑整个80亿GB硬盘
启牛学堂的vip证券账户是真的安全正规吗?怎么说
Small program graduation design based on wechat real estate intermediary house viewing appointment small program graduation design opening report function reference