DSA DATA STRUCTUTRE AND ALGORITHM 1.Printing Printing and then moving cursor to next line JS console.log("hello sharpnerians"); Python print("hello sharpnerians") C++ cout<<"hello sharpnerians"<<endl; Java System.out.println("hello sharpnerians"); Printing and cursor remaining same line JS not possible Python print("hello sharpnerians", end="") C++ cout<<"hello sharpnerians"; Java System.out.print("hello sharpnerians"); 2.Variables its a placeholder to store values x=3 //x is the variable Datatype its defined type of the data to be stored primitive data type=it has value Static defined datatype: In some language, datatype should be mention e.g. int x=5 //java Dynamic defined datatype: n some language, datatype should not be mention e.g. x=5 //python Getting input from user: def calculate ( a , b , c ) : 5 """write the code ins...
Chapter 1 Introduction Client-side scripting language for web pages. Client-side (runs on users computer not web server) Scripting languages are easier than programming languages. Browser interprets JS statements. Its embedded (add a block of code(JS)in html page from outside) in html page. Its integrated with html. Quick development and easy maintenance. Well perform repetitive and event-invoked task(each time change data) Platform independent because of WWW. Its object-based language not object-oriented. Each web page as collection of several individual elements which are called objects( e.g. image, link etc) JS is not compiled like java. Variable data types not declared(loose typing). ------------------------------------------------------------------------------------------------------------------------ Chapter 2 Ways to put JS code in html Between the body tag of html Between the head tag of html External .js file Between the body tag of html ...
Comments
Post a Comment