To remove first array element, use the JavaScript shift() method. JavaScript array shift() method removes the first element from an array and returns that element.ExampleYou can try to run the following code to remove first array element and return it −Live Demo JavaScript Array shift Method var element = [30, 45, 70, 90, 110].shift(); document.write("Removed first element is : " + element ); OutputRemoved first element is : 30
To compare two date objects with JavaScript, create two dates object and get the recent date to compare it with the custom date.ExampleYou can try to run the following code to compare two dates −Live Demo var date1, date2; date1 = new Date(); document.write(date1); date2 = new Date( "Dec 10, 2015 20:15:10" ); document.write(""+date2); if (date1 > date2) { document.write("Date1 is the recent date."); } else { document.write("Date 2 is the recent date."); } OutputMon May 28 2018 09:48:49 GMT+0530 (India Standard Time) Thu Dec 10 2015 20:15:10 GMT+0530 (India Standard Time) Date1 is the recent date
To get the current year, use the getFullYear() JavaScript method. JavaScript date getFullYear() method returns the year of the specified date according to local time. The value returned by getFullYear() is an absolute number. For dates between the years 1000 and 9999, getFullYear() returns a four-digit number, for example, 2008.ExampleYou can try to run the following code to get the current year −Live Demo JavaScript getFullYear Method var dt = new Date("December 30, 2017 21:25:10"); document.write("getFullYear() : " + dt.getFullYear() ); OutputgetFullYear() : 2017
To initialize a JavaScript Date to midnight, set hours like the following −setHours(0,0,0,0);ExampleYou can try to run the following code to set a date to midnight −Live Demo var dt; dt = new Date(); dt.setHours(0,0,0,0); document.write(dt); OutputMon May 28 2018 00:00:00 GMT+0530 (India Standard Time)
If you want to remove float from an element, then Bootstrap 4 has a class called float-none.This removes the float − This text is on the left (float removed). Default is left. On setting the float-none class, the text moves on the left, which is laso the default alignment settings.You can try to run the following code to implement the float-none class −ExampleLive Demo Bootstrap Example Demo This text is on the left (on small screen). ... Read More
On different devices like small, medium, large, etc, if you want to float an element to the left, then use the float-*-left class.The following are the classes you can use −Small Devices: float-sm-left Medium Devices: float-md-left Large Devices: float-lg-leftLet us see an example to float an element to the left on different screens −ExampleLive Demo Bootstrap Example Demo This text is on the left (on small screen). This text is on the left (on medium screen). This text is on the left (on large screen). This text is on the left (on extra large screen).
To create a card in Bootstrap, use the .card class and add card body as well − Basic card You can also set the Bootstrap card title and card footer using the card-title and card-title class respectively.The following is the code to create a Bootstrap card −ExampleLive Demo Bootstrap Example Demo Card This is the body of the card.
Once HANA Modeling view is activated, you can use Data Preview option to analyze the data in HANA Modeling view. To see Data Preview, you can right-click on View name → Data PreviewYou can also click on the icon as shown in below snapshot:
Use the float-left class in Bootstrap to float an element to the left.To place it on the left − I am on the left. I am on the left. You can try to run the following code to implement the float-left class −ExampleLive Demo Bootstrap Example Text The following text is on the left: I am on the left.
To wrap flex items in reverse order on different screen sizes, you need to use the flex-*wrap-reverse class.The class gives options to reverse and wrap flex items on small, medium, large, and extra large screen sizes −Small Screen Size (flex-sm-wrap-reverse) Goal 1 Goal 2 Goal 3 Goal 4 . . . Large Screen Size (flex-lg-wrap-reverse) Goal 1 Goal 2 Goal 3 Goal 4 . . . You can try to run the following code to work with flex-*wrap-reverse class −ExampleLive Demo ... Read More
 Data Structure
 Networking
 RDBMS
 Operating System
 Java
 iOS
 HTML
 CSS
 Android
 Python
 C Programming
 C++
 C#
 MongoDB
 MySQL
 Javascript
 PHP