“Modul Node.js” Kode Jawaban

Node membutuhkan modul

// Use require.main.require to get a module from the root folder.
const Globals = require.main.require("./globals.js");
const YourCustomModule = require("./yourmodule.js");

console.log(YourCustomModule.message);

// --- yourmodule.js ---
module.exports = {
	message: "Hello World!",
	otherData: "Hello Grepper!"
};
Nathan uses Linux

area lingkaran

def circle(radius):
	return radius * math.pi * 2
Charming Chicken

Program Python Circle

#Area and circumference of a circle.
r=float(input('Enter the radius of the circle :'))
pi=22/7
area=pi*r**2
circumference=2*pi*r
print('The area of the circle is',area)
print('The circumference of the circle is',circumference)
_______________________________________________________________________________
Gr@Y_orphan_ViLL@in##

Modul Node.js

const baseball = require('./babeRuth.js')
Magnificent Monkey Adi

Jawaban yang mirip dengan “Modul Node.js”

Jelajahi jawaban kode populer menurut bahasa

Jelajahi bahasa kode lainnya