Algorithm


Need to Learn the basic Data Structure of JavaScript. Please read the previous tutorial, if you've missed.

Details and Example about Data Types - https://devsenv.com/codes/javascript-practice-example-2-assign-variable-and-introducing-javascript-data-types

 

Problem Details:

Assign three variable, eg: You name, Your age, Your Designation.
And Print it in a good way,
Eg: Hello [name]. Your age is = [age]. Your designation is = [designaton]

 

Code Examples

#1 Code Example with Javascript Programming

Code - Javascript Programming


    // Assign three variables
    var name = "Maniruzzaman Akash";
    var age = 26;
    var designation = "Software Engineer";
    
    // Store these to a new variable
    var message = "Hello " + name + ". ";
    	message += "Your age is = " + age + ". ";
    	message += "Your designation is = " + designation + ".";
    
    // Print it to browser in a console.log()
    console.log(message);
Copy The Code & Try With Live Editor

Output

x
+
cmd
Hello Maniruzzaman Akash. Your age is = 26. Your designation is = Software Engineer.
Advertisements

Demonstration


Previous
JavaScript Practice Example #2 - Assign Variable and Introducing Javascript data types
Next
JavaScript - Reverse a String or Number or Array in various Ways