Let’s get started.
Perform Substitutions In console.log()
To work with perform substitutions using
console.log(), you need to pass two parameters.
String Substitutions using
To substitute string, use %s
console.log("Welcome To %s", "Online Web Tutor");
console.log("Hi, %s To %s", "Welcome", "Online Web Tutor");
Integer Substitutions using
To substitute integer, use %d
var employees = ["Sanjay","Siddharth","Dhananjay","Sanjay"]; console.log("Total Employees: %d", employees.length);
Online Web Tutor invites you to try Skillshike! Learn CakePHP, Laravel, CodeIgniter, Node Js, MySQL, Authentication, RESTful Web Services, etc into a depth level. Master the Coding Skills to Become an Expert in PHP Web Development. So, Search your favourite course and enroll now.