The most viewed items
const tnwNum = [70, 30, 20, 10, 7];
function tnwFun1(){
document.getElementById("demo").innerHTML = tnwNum.join("
");
}
function tnwFun2(){
var result = tnwNum.reduce(tnwFun3);
document.getElementById("demo").innerHTML = result;
}
function tnwFun3(leftNum, sum){
return leftNum - sum;
}
const tnwNames = ["Soe Soe", "Moe Moe"];
function tnwFun1(){
document.getElementById("demo").innerHTML = tnwNames.join("
");
}
function tnwFun2(){
let tnwAdd = document.getElementById("adding").value;
let result = tnwNames.push(tnwAdd);
document.getElementById("demo").innerHTML = result;
}
const tnwName = ["Hla Hla", "Mya Mya", "Aung Aung", "Maung Maung"];
function tnwFun1(){
document.getElementById("demo").innerHTML = tnwName.join("
");
}
function tnwFun2(){
let result = tnwName.pop();
document.getElementById("demo").innerHTML = "The removed element is : " + result;
}
const tnwNum = [10, 20, 30, 40];
function tnwFun1(){
document.getElementById("demo").innerHTML = tnwNum.join("
");
}
/**
function tnwFun2(){
let result = tnwNum.map(Math.sqrt);
document.getElementById("demo").innerHTML = result.join("
");
}*/
function tnwFun2(){
let result = tnwNum.map(tnwFun3);
document.getElementById("demo").innerHTML = result.join("
");
}
function tnwFun3(num){
return num * 10;
}
const tnwText = "Hello, welcome to TNW (Web Service & ICT Solutions)";
function tnwFun1(){
document.getElementById("demo").innerHTML = tnwText;
}
function tnwFun2(){
let tnwSearch = document.getElementById("search").value;
let result = tnwText.lastIndexOf(tnwSearch);
document.getElementById("demo").innerHTML = "The search text is found at : " + result;
}
const tnwNames = ["Hla Hla", "Mya Mya", "Soe Soe", "Moe Moe"];
let result = "";
function tnwFun1(){
document.getElementById("demo").innerHTML = tnwNames.join("
");
}
function tnwFun2(){
let tnwKeys = tnwNames.keys();
for(let x of tnwKeys){
result += x + "
";
document.getElementById("demo").innerHTML = result;
}
}
const tnwNames = ["Hla Hla", "Mya Mya", "Aung Aung", "Maung Maung"];
function tnwFun1(){
document.getElementById("demo").innerHTML = tnwNames;
}
function tnwFun2(){
document.getElementById("demo").innerHTML = tnwNames.join("
");
}
const tnwText = ["Hla Hla", "Mya Mya", "Soe Soe", "Noe Noe"];
//const tnwText = "I am Thet Naing Win.";
const result = Array.isArray(tnwText);
document.write(result);
const tnwText = "Hello Dear All, I am Thet Naing Win. Welcome to TNW (Web Service & ICT Solutions)";
function tnwFun1(){
document.getElementById("demo").innerHTML = tnwText;
}
function tnwFun2(){
const tnwSearch = document.getElementById("search").value;
const result = tnwText.indexOf(tnwSearch);
document.getElementById("demo").innerHTML = "The search text is fount at " + result;
}
const tnwNames = ["Hla Hla", "Mya Mya", "Soe Soe", "Moe Moe"];
function tnwFun1(){
document.getElementById("demo").innerHTML = tnwNames.join("
");
}
function tnwFun2(){
document.getElementById("demo").innerHTML = tnwNames.includes("Mya Mya");
}
const myLetter = "ABCDEFGHIJKL";
function tnwFun1(){
document.getElementById("demo").innerHTML = myLetter;
}
function tnwFun2(){
const result = Array.from(myLetter);
document.getElementById("demo").innerHTML = result;
}
const student = ["Aung Aung", "Maung", "Kyaw", "Zaw", "Soe", "Moe"];
let names = "";
function tnwFun1(){
student.forEach(tnwFun2);
}
function tnwFun2(item, index){
names += index + " : " + item + "
";
document.getElementById("demo").innerHTML = names;
}