Given a multidimensional array
var links = [ ['home', 'http://itstep.zp.ua'], ['contacts', 'https://itstep.zp.ua/contacts/'], ['news', 'https://itstep.zp.ua/news/'], ['success', 'http://success.itstep.org/'], ]; Given a multidimensional array
var links = [ ['home', 'http://itstep.zp.ua'], ['contacts', 'https://itstep.zp.ua/contacts/'], ['news', 'https://itstep.zp.ua/news/'], ['success', 'http://success.itstep.org/'], ]; Try to write more detailed questions. To get an answer, explain what exactly you see the problem, how to reproduce it, what you want to get as a result, etc. Give an example that clearly demonstrates the problem. If the question can be reformulated according to the rules set out in the certificate , edit it .
var links = [ ['home', 'http://itstep.zp.ua'], ['contacts', 'https://itstep.zp.ua/contacts/'], ['news', 'https://itstep.zp.ua/news/'], ['success', 'http://success.itstep.org/'], ]; let nav = ''; links.forEach(function(v){ nav += '<a class="nav-link" href="' + v[1] + '">' + v[0] + '</a>'; }); document.querySelector(".nav").innerHTML = nav; <link href="https://stackpath.bootstrapcdn.com/bootstrap/4.1.3/css/bootstrap.min.css" rel="stylesheet"/> <nav class="nav"></nav> Source: https://ru.stackoverflow.com/questions/907738/
All Articles
document.write, you can do it like pastebin.com/MUYndfYN - Alex