A
A
Afafks1231321321652020-03-08 18:26:07
PHP
Afafks123132132165, 2020-03-08 18:26:07

How to connect js file to js file?

And so I'm trying to connect a js file to a js file and I've seen how libraries are connected, but for some reason it doesn't work for me.

function sayHi(user) {
  return `Hello, ${user}!`;
}

<!DOCTYPE html>
<html>
<head>
  <title>Test</title>
</head>
<body>
<script type="text/javascript" src="engine.js"></script>
<script type="text/javascript">
  sayHI("Hello");
</script>
</body>
</html>

Answer the question

In order to leave comments, you need to log in

3 answer(s)
T
ThunderCat, 2019-07-29
@freshik312

one-time, when data comes from import,
Then it’s quite banal,
select where pid = 0 and width = 0,
then iterate over the lines in the puff,
exploding name with a space,
select all lines where name is now an array of length 1 (these will be roots) into a separate array
and make the keys in this array name.
Once again we iterate over the array of strings with a check or an array with a length of more than 1 in name,
after which we extract a clean number from name[1] (remove the brackets), write it to width,
from name[0] we get the key to the root array, from which we get id , and put in pid.
That's it, update the lines in the database.
It is quite possible that the algorithm can be improved somewhere, but "on the forehead" is the most obvious option.

R
Rsa97, 2019-07-28
@Rsa97

What about the meaning? Your `pid` points to the `id` of the parent.

A
Alexey Yarkov, 2020-03-08
@Afafks123132132165

sayHi !== sayHI

Didn't find what you were looking for?

Ask your question

Ask a Question

731 491 924 answers to any question