Search
 
SCRIPT & CODE EXAMPLE
 

JAVASCRIPT

log javascript

console.log(variable)
Comment

what is log method in javascript

var str = "Howdy GeeksforGeeks"
var geek = {
  book: "harrypotter",
  price: "2000"
};
var geek2 = [10, 20, 30];
console.log(str);
console.dir(str);
console.dir(geek);
console.log("geek (log) = ", geek);
console.dir(geek2);
console.log("geek2 (log) = ", geek2);

// Prints only string as dir() takes 
// only one parameter. 
console.dir("geek2 (dir) = ", geek2);
Comment

Login js

const formlog = document.getElementById("login-form");
const BtnLog = document.getElementById("login-form-submit");
const ErrorMessage = document.getElementById("login-error-msg");
BtnLog.addEventListener("click", (e) => {
e.preventDefault();
const username = formlog.username.value;
const password = formlog.password.value;
if (username === "admin" && password === "itsourcecode") { alert("You have successfully logged in."); location.reload(); } else { ErrorMessage.style.opacity = 1; }
})
Comment

javaScript Math.log() Method

Math.log(1);
Comment

PREVIOUS NEXT
Code Example
Javascript :: Configure the Chrome debugger react 
Javascript :: swapping variables js 
Javascript :: javascript The toString() Method 
Javascript :: Is date greater than 18 years old javascript 
Javascript :: innertext data form js 
Javascript :: vue add external script 
Javascript :: ERROR in ./node_modules/react-icons/all.js 4:0-22 
Javascript :: json full form 
Javascript :: textbox in javascript 
Javascript :: print page using js 
Javascript :: create new angular project specific version 
Javascript :: jszip create zip file 
Javascript :: moment localization 
Javascript :: launch uikit modal from php 
Javascript :: how to stop type text texbox in javascript 
Javascript :: fullcalendar react add event duration 
Javascript :: react router active link css 
Javascript :: return object list in find js 
Javascript :: how to dekete from string all "," js 
Javascript :: javascript regex named capture group 
Javascript :: usecontext react 
Javascript :: js use restrict 
Javascript :: how to deploy nextjs app on netlify 
Javascript :: react native dimensions 
Javascript :: select selectedindex jquery 
Javascript :: firebase signout 
Javascript :: execute command method 
Javascript :: months js 
Javascript :: react native flexbox 2 columns 1 fixed width 
Javascript :: send sms using twilio in node 
ADD CONTENT
Topic
Content
Source link
Name
3+6 =