A
Size: a a a
A
I
🌬М
es
DM
index.js
const solve = require('./solve.js')
const express = require('express')
const app = express()
const port = 3000
app.get('/', (req, res) => {
const input = req.query.input.split(',')
const result = solve(input)
res.send(result)
})
app.listen(port, () => {
console.log(`Server is listening at http://localhost:${port}`)
})
solve.js
function solve(arr) {потом запускаешь
... тут код функции solve
}
module.exports = solve
node ./index.js
http://localhost:3000?input=8,7,6,5,4
🌬М
🌬М
es
🌬М
А
index.js
const solve = require('./solve.js')
const express = require('express')
const app = express()
const port = 3000
app.get('/', (req, res) => {
const input = req.query.input.split(',')
const result = solve(input)
res.send(result)
})
app.listen(port, () => {
console.log(`Server is listening at http://localhost:${port}`)
})
solve.js
function solve(arr) {потом запускаешь
... тут код функции solve
}
module.exports = solve
node ./index.js
http://localhost:3000?input=8,7,6,5,4
DM
🌬М
index.js
const solve = require('./solve.js')
const express = require('express')
const app = express()
const port = 3000
app.get('/', (req, res) => {
const input = req.query.input.split(',')
const result = solve(input)
res.send(result)
})
app.listen(port, () => {
console.log(`Server is listening at http://localhost:${port}`)
})
solve.js
function solve(arr) {потом запускаешь
... тут код функции solve
}
module.exports = solve
node ./index.js
http://localhost:3000?input=8,7,6,5,4
NN
const newArray = notifications.map(({ ['data:data:text']: text, ['data:data:title']: title, ...rest }) => ({ text, title, ...rest }))
NN
DM
const newArray = notifications.map(({ ['data:data:text']: text, ['data:data:title']: title, ...rest }) => ({ text, title, ...rest }))
NN
created_at: "2021-02-09T14:22:19.000000Z"вот итоговый идем
data: {data: {…}}
id: "f792a337-5c22-4b1b-a7dc-7b34bbc9d159"
notifiable_id: 110
notifiable_type: null
read_at: null
text: undefined
title: undefined
type: "App\Notifications\WelcomeNotification"
updated_at: "2021-02-09T14:22:19.000000Z"
I
🌬М
DM
created_at: "2021-02-09T14:22:19.000000Z"вот итоговый идем
data: {data: {…}}
id: "f792a337-5c22-4b1b-a7dc-7b34bbc9d159"
notifiable_id: 110
notifiable_type: null
read_at: null
text: undefined
title: undefined
type: "App\Notifications\WelcomeNotification"
updated_at: "2021-02-09T14:22:19.000000Z"
data:data:text
DM